diff --git a/dsql-app/.local_dist/BUILD_ID b/dsql-app/.local_dist/BUILD_ID index 29825db..13077d7 100644 --- a/dsql-app/.local_dist/BUILD_ID +++ b/dsql-app/.local_dist/BUILD_ID @@ -1 +1 @@ -_A6S2Hel7pfBafC20yE1z \ No newline at end of file +Z7LjqP2xSl7zkNXSJawO7 \ No newline at end of file diff --git a/dsql-app/.local_dist/build-manifest.json b/dsql-app/.local_dist/build-manifest.json index 6797606..d8c7c03 100644 --- a/dsql-app/.local_dist/build-manifest.json +++ b/dsql-app/.local_dist/build-manifest.json @@ -5,635 +5,606 @@ "devFiles": [], "ampDevFiles": [], "lowPriorityFiles": [ - "static/_A6S2Hel7pfBafC20yE1z/_buildManifest.js", - "static/_A6S2Hel7pfBafC20yE1z/_ssgManifest.js" + "static/Z7LjqP2xSl7zkNXSJawO7/_buildManifest.js", + "static/Z7LjqP2xSl7zkNXSJawO7/_ssgManifest.js" ], "rootMainFiles": [], "rootMainFilesTree": {}, "pages": { "/": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9654-a0de90f5592a8262.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/3298-73758aefe44233a6.js", "static/css/60c48dd4b3301227.css", - "static/chunks/pages/index-55aca6f5ee5ea4e8.js" + "static/chunks/pages/index-d8f75819eb449ffc.js" ], "/404": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/404-1eace598915739ef.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/404-386ef30594132ecb.js" ], "/500": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/500-f40435ff099c3bec.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/500-81f6b715960091f2.js" ], "/_app": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", "static/css/40a7197d287e4ac0.css", - "static/chunks/pages/_app-946b7f00d529ca86.js" + "static/chunks/pages/_app-f20525907c2f070a.js" ], "/_error": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", "static/chunks/pages/_error-133b121cd6670ef3.js" ], "/about": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9654-a0de90f5592a8262.js", - "static/chunks/pages/about-35029bb377afcb90.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/3298-73758aefe44233a6.js", + "static/chunks/pages/about-69331c972566352a.js" ], "/admin": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/3616-7b41eb08ff52c809.js", - "static/chunks/820-c223e3d64da3f271.js", - "static/chunks/pages/admin-efa0744f5c14dc87.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/9950-e6be92fc61deb6e3.js", + "static/chunks/pages/admin-eaa52fa698c19034.js" ], "/admin/[user_id]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/3616-7b41eb08ff52c809.js", - "static/chunks/820-c223e3d64da3f271.js", - "static/chunks/pages/admin/[user_id]-7a323a8952bfcc9e.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/9950-e6be92fc61deb6e3.js", + "static/chunks/pages/admin/[user_id]-61bef31d3a4e9e7a.js" ], "/admin/[user_id]/api-keys": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/pages/admin/[user_id]/api-keys-2041b6f22085abeb.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/pages/admin/[user_id]/api-keys-2c8109e5388827d9.js" ], "/admin/[user_id]/connect": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/pages/admin/[user_id]/connect-b54a7d4366e0f783.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/pages/admin/[user_id]/connect-40047d3fd5229513.js" ], "/admin/[user_id]/databases": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/3616-7b41eb08ff52c809.js", - "static/chunks/pages/admin/[user_id]/databases-6b7a3f30d592000d.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/9950-e6be92fc61deb6e3.js", + "static/chunks/pages/admin/[user_id]/databases-23779acb61fbe51a.js" ], "/admin/[user_id]/databases/[single]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/pages/admin/[user_id]/databases/[single]-63b295eb9207c913.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/pages/admin/[user_id]/databases/[single]-05dbbed42a310967.js" ], "/admin/[user_id]/databases/[single]/connect": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/connect-f0141d41d59a8f0e.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/connect-3a065ea39acafd03.js" ], "/admin/[user_id]/databases/[single]/edit-database": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/6052-1f9ca3a7d2d16828.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/edit-database-c1da7cdcca0eeaec.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/3867-6732c13e333b30b2.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/edit-database-1f2bf0df5f51fa43.js" ], "/admin/[user_id]/databases/[single]/schema": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/6052-1f9ca3a7d2d16828.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/schema-135fad70f63d5f99.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/schema-8b9d66b8d3cb2a1a.js" ], "/admin/[user_id]/databases/[single]/shell": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/shell-80b1f573d72d1634.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/shell-dff01c9e4cff1d7e.js" ], "/admin/[user_id]/databases/[single]/tables": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables-ae83bb65c1facc24.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables-48fec207563f61d7.js" ], "/admin/[user_id]/databases/[single]/tables/[single_table]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", "static/chunks/94726e6d-33de6887e71ace1a.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/1391-727762e25412e6d0.js", - "static/chunks/2413-5357ac7638ad8ed0.js", - "static/chunks/2004-64a7cf1362719c72.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/6156-e0dcf7d8f002ae4a.js", - "static/chunks/2163-2888548322298e53.js", - "static/chunks/6460-3f63007c03118fc2.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]-1d13e3c577038b39.js" + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/9660-628b42bc1127aefa.js", + "static/chunks/6460-ab4ab8caec784ffc.js", + "static/chunks/2829-608af754738e12fc.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/8311-ae577d4bb030d416.js", + "static/chunks/1580-68f706d212c5eb63.js", + "static/chunks/6830-80ccce098977dfd6.js", + "static/chunks/4403-fc19b6af6ca4b3fe.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]-f34ee3fd9517cd2c.js" ], "/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", "static/chunks/94726e6d-33de6887e71ace1a.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/2413-5357ac7638ad8ed0.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/6156-e0dcf7d8f002ae4a.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table-d8262158ddb6bfc2.js" + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/6460-ab4ab8caec784ffc.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/8311-ae577d4bb030d416.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table-38aa98661e043781.js" ], "/admin/[user_id]/databases/[single]/tables/[single_table]/entries": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/1391-727762e25412e6d0.js", - "static/chunks/2004-64a7cf1362719c72.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/2163-2888548322298e53.js", - "static/chunks/6460-3f63007c03118fc2.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries-ed4516e967a3f21e.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/9660-628b42bc1127aefa.js", + "static/chunks/2829-608af754738e12fc.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/1580-68f706d212c5eb63.js", + "static/chunks/6830-80ccce098977dfd6.js", + "static/chunks/4403-fc19b6af6ca4b3fe.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries-e611979837269e2d.js" ], "/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/1391-727762e25412e6d0.js", - "static/chunks/2004-64a7cf1362719c72.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/2163-2888548322298e53.js", - "static/chunks/6460-3f63007c03118fc2.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]-380611fd56aa33ad.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/9660-628b42bc1127aefa.js", + "static/chunks/2829-608af754738e12fc.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/1580-68f706d212c5eb63.js", + "static/chunks/6830-80ccce098977dfd6.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]-7bbd383a24ee015d.js" ], "/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/1391-727762e25412e6d0.js", - "static/chunks/8779-930a59d1d1a1be5c.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/2163-2888548322298e53.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry-8d261204cffa33a9.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/9660-628b42bc1127aefa.js", + "static/chunks/7287-dadce6acb3d43d67.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/1580-68f706d212c5eb63.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry-e609e60d52830241.js" ], "/admin/[user_id]/databases/[single]/tables/[single_table]/fields": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", "static/chunks/94726e6d-33de6887e71ace1a.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/2413-5357ac7638ad8ed0.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/6156-e0dcf7d8f002ae4a.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields-fc4b3b32a4c7dff4.js" + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/6460-ab4ab8caec784ffc.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/8311-ae577d4bb030d416.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields-ab177e1e5adacaef.js" ], "/admin/[user_id]/databases/[single]/tables/add-table": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", "static/chunks/94726e6d-33de6887e71ace1a.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/2413-5357ac7638ad8ed0.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/6156-e0dcf7d8f002ae4a.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/tables/add-table-3d1f0a6e9693f671.js" + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/6460-ab4ab8caec784ffc.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/8311-ae577d4bb030d416.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/tables/add-table-e39fba476a9e1ad8.js" ], "/admin/[user_id]/databases/[single]/users": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/6836-b267904eb7c540d4.js", - "static/chunks/3857-402e95bd26a58769.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/users-9ef5271e62eabede.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/2438-aa7e9f2130cd81f0.js", + "static/chunks/6383-02bec644b1a9f0a8.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/users-5b8dd72d94432cb8.js" ], "/admin/[user_id]/databases/[single]/users/[user]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/4565-e849d55f03e474f9.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]-817858a3ef1cccd2.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]-f062b4d0b80557a7.js" ], "/admin/[user_id]/databases/[single]/users/[user]/change-password": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]/change-password-04a47157d95b361b.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]/change-password-5c6ae113aee79d1d.js" ], "/admin/[user_id]/databases/[single]/users/add-social-logins": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/4565-e849d55f03e474f9.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/users/add-social-logins-660f9e475f68c717.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/users/add-social-logins-dcc54bfad6c4818a.js" ], "/admin/[user_id]/databases/[single]/users/add-user": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/304-2b6b4eb0adbbac90.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/4565-e849d55f03e474f9.js", - "static/chunks/pages/admin/[user_id]/databases/[single]/users/add-user-18b8b63b1ba1c13d.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/8076-c34ce8d8512255e7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/pages/admin/[user_id]/databases/[single]/users/add-user-6d9f5bb6c681b082.js" ], "/admin/[user_id]/databases/add-database": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/6052-1f9ca3a7d2d16828.js", - "static/chunks/pages/admin/[user_id]/databases/add-database-fa3778d6e9bfcc7e.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/3867-6732c13e333b30b2.js", + "static/chunks/pages/admin/[user_id]/databases/add-database-276c7177adf6be55.js" ], "/admin/[user_id]/media": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/5256-56bdbb8f4109cb29.js", - "static/chunks/pages/admin/[user_id]/media-57a5450a842bec23.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/2480-c3f2e7fac796ce00.js", + "static/chunks/pages/admin/[user_id]/media-29e4886d0c31d5c3.js" ], "/admin/[user_id]/media/[...folder]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/5256-56bdbb8f4109cb29.js", - "static/chunks/pages/admin/[user_id]/media/[...folder]-fd2a6d34d0e1b059.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/2480-c3f2e7fac796ce00.js", + "static/chunks/pages/admin/[user_id]/media/[...folder]-c8df7e4d1118eb40.js" ], "/admin/[user_id]/schema": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/pages/admin/[user_id]/schema-22f39a31e6fc9598.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/pages/admin/[user_id]/schema-2ab99d8d3c163b57.js" ], "/admin/[user_id]/settings": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/5160-1036ca7a8eaeebea.js", - "static/chunks/3616-7b41eb08ff52c809.js", - "static/chunks/9907-e7e1d036d8444890.js", - "static/chunks/820-c223e3d64da3f271.js", - "static/chunks/4147-cebaebce870b5fb7.js", - "static/chunks/pages/admin/[user_id]/settings-5a657bc8977fb7f7.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/6999-765fb1dc8daf2756.js", + "static/chunks/4060-34ac8bf5371932b9.js", + "static/chunks/pages/admin/[user_id]/settings-203cb6b64dc51850.js" ], "/admin/[user_id]/users": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/3857-402e95bd26a58769.js", - "static/chunks/pages/admin/[user_id]/users-9947b884dd45464d.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/6383-02bec644b1a9f0a8.js", + "static/chunks/pages/admin/[user_id]/users-52b7048018746ac0.js" ], "/admin/[user_id]/users/add-user": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/pages/admin/[user_id]/users/add-user-b34fda15345c38b4.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/pages/admin/[user_id]/users/add-user-2423cd3e4b75b0ee.js" ], "/admin/[user_id]/users/databases": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/3857-402e95bd26a58769.js", - "static/chunks/pages/admin/[user_id]/users/databases-4066874afcb57801.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/6383-02bec644b1a9f0a8.js", + "static/chunks/pages/admin/[user_id]/users/databases-ef511feca7c10b56.js" ], "/admin/[user_id]/users/databases/[database]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/3857-402e95bd26a58769.js", - "static/chunks/pages/admin/[user_id]/users/databases/[database]-962b42a10b98dda3.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/6383-02bec644b1a9f0a8.js", + "static/chunks/pages/admin/[user_id]/users/databases/[database]-76e13995132a5d19.js" ], "/admin/[user_id]/users/databases/[database]/[user]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9799-abc615966398fac4.js", - "static/chunks/4565-e849d55f03e474f9.js", - "static/chunks/pages/admin/[user_id]/users/databases/[database]/[user]-2da2075136778947.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/8261-3c3582fc434ee275.js", + "static/chunks/7391-b72414be460cf0f0.js", + "static/chunks/pages/admin/[user_id]/users/databases/[database]/[user]-096740ae36fd55b2.js" ], "/blog": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/blog-86a57f87f960d208.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/blog-8c70d46c8352664e.js" ], "/contact": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/contact-cd1dacd74efe270e.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/contact-f2a4f3c2e97b25fb.js" ], "/create-account": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9907-e7e1d036d8444890.js", - "static/chunks/4147-cebaebce870b5fb7.js", - "static/chunks/pages/create-account-93cce1fe65377589.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6999-765fb1dc8daf2756.js", + "static/chunks/4060-34ac8bf5371932b9.js", + "static/chunks/pages/create-account-59f89a25241640f4.js" ], "/docs": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/docs-21d1067cb26803ef.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/docs-5ec48702f4389bb8.js" ], "/docs/[page]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/docs/[page]-f26a582ab816687d.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/docs/[page]-da7ad3c132fd4976.js" ], "/docs/[page]/[sub-page]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/docs/[page]/[sub-page]-d986893c235e6d5b.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/docs/[page]/[sub-page]-73abfdd601bfe01c.js" ], "/email-verification": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/email-verification-b622c0527271a373.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/email-verification-fec9fecfdcb56e8d.js" ], "/login": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/9907-e7e1d036d8444890.js", - "static/chunks/pages/login-4cd0b4a8e9124058.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6999-765fb1dc8daf2756.js", + "static/chunks/pages/login-f10f3645e54e61fd.js" ], "/logout": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/logout-b8a4207f3314e897.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/logout-60a2b37f5fe2427f.js" ], "/privacy": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/privacy-85269bae0ca39885.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/privacy-3a1d5e267140271e.js" ], "/redirect": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/redirect-f5ba2244ad574804.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/redirect-28627072d73850c2.js" ], "/reset-password": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/29107295-a5c0cca9b8761d61.js", - "static/chunks/pages/reset-password-bf3706a70e969a34.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/reset-password-404836a50d6e9e32.js" ], "/send-password-reset-link": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/send-password-reset-link-40c349141dc68707.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/send-password-reset-link-01b2509dfe7be8b2.js" ], "/su": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su-aef540ca8a9d0d26.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su-56e8a64a3be59f73.js" ], "/su/backups": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su/backups-515e155cc25fc6e2.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/backups-033362c47c6541f4.js" ], "/su/console": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", "static/chunks/ed150ef9-468dbc55986083e4.js", - "static/chunks/2793-2960a1457850c87f.js", - "static/chunks/2016-d9bbef83b5278263.js", + "static/chunks/2793-d85659f470ce8842.js", + "static/chunks/5810-7c3a3c4731750dc7.js", "static/css/85fa6dafca566008.css", - "static/chunks/pages/su/console-b4070a91c4a61e92.js" + "static/chunks/pages/su/console-c8b9bd49e5191033.js" ], "/su/docs": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/5165-f1a837469292e394.js", - "static/chunks/pages/su/docs-2d31693f0537ec1b.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/6099-150cc189810f2bfd.js", + "static/chunks/pages/su/docs-49dc94fa2828f090.js" ], "/su/docs/create-page": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/1391-727762e25412e6d0.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/3061-4daacb81cd42c700.js", - "static/chunks/6803-fe4ad60e4db387da.js", - "static/chunks/pages/su/docs/create-page-e5da0607ae76879e.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/9660-628b42bc1127aefa.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/4261-1181ad7559234ce0.js", + "static/chunks/pages/su/docs/create-page-3b58b3bb388f340b.js" ], "/su/docs/edit-page": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/1391-727762e25412e6d0.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/3061-4daacb81cd42c700.js", - "static/chunks/6803-fe4ad60e4db387da.js", - "static/chunks/pages/su/docs/edit-page-19991b2455a27bda.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/9660-628b42bc1127aefa.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/4261-1181ad7559234ce0.js", + "static/chunks/pages/su/docs/edit-page-85a0ca0be5537063.js" ], "/su/docs/pages": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/5165-f1a837469292e394.js", - "static/chunks/pages/su/docs/pages-09cc22003ca2977d.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/6099-150cc189810f2bfd.js", + "static/chunks/pages/su/docs/pages-2a88e2094d85ce52.js" ], "/su/docs/pages/[id]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/1391-727762e25412e6d0.js", - "static/chunks/5414-904c4e3b277b1a40.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/3061-4daacb81cd42c700.js", - "static/chunks/6803-fe4ad60e4db387da.js", - "static/chunks/pages/su/docs/pages/[id]-aa63805a266c145f.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/9660-628b42bc1127aefa.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/9268-6ca91a807cecf2b4.js", + "static/chunks/4261-1181ad7559234ce0.js", + "static/chunks/pages/su/docs/pages/[id]-4d39f3debc44f352.js" ], "/su/envar": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su/envar-cf23a0d85f1b95f7.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/envar-8c4d450d1932f9d6.js" ], "/su/error-logs": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su/error-logs-bd760a695db3aa94.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/error-logs-d4ffbb81ddac6cec.js" ], "/su/load-balancing": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su/load-balancing-0968f396408769a2.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/load-balancing-d0b790d61a50a4ef.js" ], "/su/login": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/su/login-9f0c33ff7a724b80.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/su/login-218c9150552b8800.js" ], "/su/servers": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su/servers-9c5cb37918bc40b1.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/servers-d48477ad4489744d.js" ], "/su/users": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su/users-bb0e572a5ae16760.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/users-519384d02df33446.js" ], "/su/users/[single]": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/8717-aea4be023740276e.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/3061-4daacb81cd42c700.js", - "static/chunks/pages/su/users/[single]-77865aec8f94f04d.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/6428-c106bf6efb539d8c.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/users/[single]-a95d897a2dad7f62.js" ], "/su/users/new": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/2016-d9bbef83b5278263.js", - "static/chunks/pages/su/users/new-7f43159b182edbb0.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/5810-7c3a3c4731750dc7.js", + "static/chunks/pages/su/users/new-8a739402db28044b.js" ], "/terms": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/terms-02b626fbae43ff93.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/terms-37fb4519d728aa13.js" ], "/unsubscribe": [ "static/chunks/webpack-5381863dc66a9c32.js", - "static/chunks/framework-898697981b1ca118.js", - "static/chunks/main-36f93e1764e6ea94.js", - "static/chunks/pages/unsubscribe-60eb94424d6846c1.js" + "static/chunks/framework-5f43af1a76a0211a.js", + "static/chunks/main-96e9b4333635008a.js", + "static/chunks/pages/unsubscribe-e6a608d5b8cea536.js" ] }, "ampFirstPages": [] diff --git a/dsql-app/.local_dist/cache/config.json b/dsql-app/.local_dist/cache/config.json index abf0f2c..65a85da 100644 --- a/dsql-app/.local_dist/cache/config.json +++ b/dsql-app/.local_dist/cache/config.json @@ -1,7 +1,7 @@ { "telemetry": { - "notifiedAt": "1734263693167", - "anonymousId": "2aded3f991a3d123c6bc099431ec5a717e4f082a0a124ed6a413f270938fce7d", - "salt": "cfcebeb50958602f8e583ff51c159e65" + "notifiedAt": "1736755040414", + "anonymousId": "a9ca3af707721fc174a1115c56d15ade798944fd72b338d8af323b58d320d9eb", + "salt": "ec32f85f7ba9b5e75dc1ad0ac559b18b" } } \ No newline at end of file diff --git a/dsql-app/.local_dist/cache/webpack/client-production/0.pack b/dsql-app/.local_dist/cache/webpack/client-production/0.pack index 8451c08..31580ee 100644 Binary files a/dsql-app/.local_dist/cache/webpack/client-production/0.pack and b/dsql-app/.local_dist/cache/webpack/client-production/0.pack differ diff --git a/dsql-app/.local_dist/cache/webpack/client-production/index.pack b/dsql-app/.local_dist/cache/webpack/client-production/index.pack index 06ef781..1474145 100644 Binary files a/dsql-app/.local_dist/cache/webpack/client-production/index.pack and b/dsql-app/.local_dist/cache/webpack/client-production/index.pack differ diff --git a/dsql-app/.local_dist/cache/webpack/edge-server-production/index.pack b/dsql-app/.local_dist/cache/webpack/edge-server-production/index.pack index 6b30179..f5fa210 100644 Binary files a/dsql-app/.local_dist/cache/webpack/edge-server-production/index.pack and b/dsql-app/.local_dist/cache/webpack/edge-server-production/index.pack differ diff --git a/dsql-app/.local_dist/cache/webpack/server-production/0.pack b/dsql-app/.local_dist/cache/webpack/server-production/0.pack index 5ae8ac9..a70fe5f 100644 Binary files a/dsql-app/.local_dist/cache/webpack/server-production/0.pack and b/dsql-app/.local_dist/cache/webpack/server-production/0.pack differ diff --git a/dsql-app/.local_dist/cache/webpack/server-production/index.pack b/dsql-app/.local_dist/cache/webpack/server-production/index.pack index d3f2863..32cdd5d 100644 Binary files a/dsql-app/.local_dist/cache/webpack/server-production/index.pack and b/dsql-app/.local_dist/cache/webpack/server-production/index.pack differ diff --git a/dsql-app/.local_dist/diagnostics/framework.json b/dsql-app/.local_dist/diagnostics/framework.json index c9d2db9..875be3d 100644 --- a/dsql-app/.local_dist/diagnostics/framework.json +++ b/dsql-app/.local_dist/diagnostics/framework.json @@ -1 +1 @@ -{"name":"Next.js","version":"15.0.3"} \ No newline at end of file +{"name":"Next.js","version":"15.1.4"} \ No newline at end of file diff --git a/dsql-app/.local_dist/dynamic-css-manifest.json b/dsql-app/.local_dist/dynamic-css-manifest.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/dsql-app/.local_dist/dynamic-css-manifest.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/dsql-app/.local_dist/next-minimal-server.js.nft.json b/dsql-app/.local_dist/next-minimal-server.js.nft.json index 66cdb1e..57271bd 100644 --- a/dsql-app/.local_dist/next-minimal-server.js.nft.json +++ b/dsql-app/.local_dist/next-minimal-server.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../node_modules/styled-jsx/index.js","../node_modules/styled-jsx/package.json","../node_modules/styled-jsx/dist/index/index.js","../node_modules/react/package.json","../node_modules/react/index.js","../node_modules/client-only/package.json","../node_modules/react/cjs/react.production.min.js","../node_modules/client-only/index.js","../node_modules/styled-jsx/style.js","../node_modules/next/dist/compiled/next-server/server.runtime.prod.js","../node_modules/next/package.json","../node_modules/next/dist/lib/is-error.js","../node_modules/next/dist/server/body-streams.js","../node_modules/next/dist/lib/constants.js","../node_modules/next/dist/shared/lib/constants.js","../node_modules/next/dist/server/web/utils.js","../node_modules/next/dist/client/components/app-router-headers.js","../node_modules/next/dist/server/lib/trace/tracer.js","../node_modules/next/dist/server/lib/trace/constants.js","../node_modules/next/dist/shared/lib/is-plain-object.js","../node_modules/next/dist/lib/picocolors.js","../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../node_modules/next/dist/shared/lib/is-thenable.js","../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../node_modules/@swc/helpers/_/_interop_require_default/package.json","../node_modules/next/dist/shared/lib/runtime-config.external.js","../node_modules/next/dist/server/after/builtin-request-context.js","../node_modules/next/dist/server/app-render/work-async-storage.external.js","../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../node_modules/@swc/helpers/package.json","../node_modules/next/dist/compiled/jsonwebtoken/package.json","../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../node_modules/next/dist/compiled/ws/package.json","../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../node_modules/next/dist/server/app-render/async-local-storage.js","../node_modules/next/dist/compiled/jsonwebtoken/index.js","../node_modules/next/dist/shared/lib/error-source.js","../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../node_modules/next/dist/client/components/react-dev-overlay/server/middleware.js","../node_modules/next/dist/compiled/ws/index.js","../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../node_modules/next/dist/client/components/react-dev-overlay/server/shared.js","../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../node_modules/next/dist/compiled/debug/package.json","../node_modules/next/dist/build/next-dir-paths.js","../node_modules/next/dist/lib/semver-noop.js","../node_modules/next/dist/shared/lib/is-internal.js","../node_modules/next/dist/compiled/debug/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-from-file.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/launchEditor.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-stack.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/node-stack-frames.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/webpack-module-path.js","../node_modules/next/dist/compiled/babel/code-frame.js","../node_modules/next/dist/compiled/source-map08/package.json","../node_modules/next/dist/compiled/babel/package.json","../node_modules/next/dist/compiled/source-map08/source-map.js","../node_modules/next/dist/client/components/is-hydration-error.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-url.js","../node_modules/next/dist/compiled/babel/bundle.js","../node_modules/next/dist/compiled/data-uri-to-buffer/package.json","../node_modules/next/dist/compiled/shell-quote/package.json","../node_modules/next/dist/compiled/stacktrace-parser/package.json","../node_modules/next/dist/compiled/data-uri-to-buffer/index.js","../node_modules/next/dist/compiled/shell-quote/index.js","../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../node_modules/next/dist/compiled/browserslist/package.json","../node_modules/next/dist/compiled/json5/package.json","../node_modules/next/dist/compiled/lru-cache/package.json","../node_modules/next/dist/compiled/semver/package.json","../node_modules/next/dist/compiled/babel-packages/package.json","../node_modules/next/dist/compiled/browserslist/index.js","../node_modules/next/dist/compiled/json5/index.js","../node_modules/next/dist/compiled/lru-cache/index.js","../node_modules/next/dist/compiled/semver/index.js","../node_modules/next/dist/compiled/babel-packages/packages-bundle.js","../node_modules/caniuse-lite/dist/unpacker/agents.js","../node_modules/caniuse-lite/dist/unpacker/feature.js","../node_modules/caniuse-lite/dist/unpacker/region.js","../node_modules/caniuse-lite/package.json","../node_modules/next/dist/compiled/babel/parser.js","../node_modules/next/dist/compiled/babel/core.js","../node_modules/next/dist/compiled/babel/traverse.js","../node_modules/next/dist/compiled/babel/types.js","../node_modules/caniuse-lite/data/agents.js","../node_modules/caniuse-lite/dist/unpacker/browsers.js","../node_modules/caniuse-lite/dist/unpacker/browserVersions.js","../node_modules/caniuse-lite/dist/lib/statuses.js","../node_modules/caniuse-lite/dist/lib/supported.js","../node_modules/caniuse-lite/data/browsers.js","../node_modules/caniuse-lite/data/browserVersions.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/app-page/module.compiled.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/pages/module.compiled.js"]} \ No newline at end of file +{"version":1,"files":["../node_modules/styled-jsx/index.js","../node_modules/styled-jsx/package.json","../node_modules/react/package.json","../node_modules/styled-jsx/dist/index/index.js","../node_modules/react/index.js","../node_modules/client-only/package.json","../node_modules/react/cjs/react.production.min.js","../node_modules/client-only/index.js","../node_modules/styled-jsx/style.js","../node_modules/next/dist/compiled/next-server/server.runtime.prod.js","../node_modules/next/package.json","../node_modules/next/dist/lib/is-error.js","../node_modules/next/dist/server/body-streams.js","../node_modules/next/dist/lib/constants.js","../node_modules/next/dist/shared/lib/constants.js","../node_modules/next/dist/server/web/utils.js","../node_modules/next/dist/client/components/app-router-headers.js","../node_modules/next/dist/server/lib/trace/constants.js","../node_modules/next/dist/server/lib/trace/tracer.js","../node_modules/next/dist/shared/lib/is-plain-object.js","../node_modules/next/dist/lib/picocolors.js","../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../node_modules/next/dist/shared/lib/is-thenable.js","../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../node_modules/next/dist/server/patch-error-inspect.js","../node_modules/next/dist/shared/lib/runtime-config.external.js","../node_modules/next/dist/server/after/builtin-request-context.js","../node_modules/next/dist/server/app-render/work-async-storage.external.js","../node_modules/@swc/helpers/_/_interop_require_default/package.json","../node_modules/next/dist/compiled/jsonwebtoken/package.json","../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../node_modules/@swc/helpers/package.json","../node_modules/next/dist/server/app-render/async-local-storage.js","../node_modules/next/dist/compiled/jsonwebtoken/index.js","../node_modules/next/dist/compiled/ws/package.json","../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../node_modules/next/dist/shared/lib/error-source.js","../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../node_modules/next/dist/client/components/react-dev-overlay/server/middleware-webpack.js","../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../node_modules/next/dist/client/components/react-dev-overlay/server/shared.js","../node_modules/next/dist/compiled/ws/index.js","../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../node_modules/next/dist/compiled/source-map/package.json","../node_modules/next/dist/shared/lib/is-internal.js","../node_modules/next/dist/compiled/source-map/source-map.js","../node_modules/next/dist/compiled/debug/package.json","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/launchEditor.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-from-file.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/node-stack-frames.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/webpack-module-path.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-stack.js","../node_modules/next/dist/lib/semver-noop.js","../node_modules/next/dist/compiled/debug/index.js","../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../node_modules/next/dist/compiled/babel/code-frame.js","../node_modules/next/dist/compiled/source-map08/package.json","../node_modules/next/dist/compiled/babel/package.json","../node_modules/next/dist/client/components/is-hydration-error.js","../node_modules/next/dist/compiled/source-map08/source-map.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-url.js","../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../node_modules/next/dist/compiled/babel/bundle.js","../node_modules/next/dist/compiled/shell-quote/package.json","../node_modules/next/dist/compiled/stacktrace-parser/package.json","../node_modules/next/dist/compiled/data-uri-to-buffer/package.json","../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../node_modules/next/dist/compiled/shell-quote/index.js","../node_modules/next/dist/compiled/data-uri-to-buffer/index.js","../node_modules/next/dist/compiled/lru-cache/package.json","../node_modules/next/dist/compiled/json5/package.json","../node_modules/next/dist/compiled/babel-packages/package.json","../node_modules/next/dist/compiled/browserslist/package.json","../node_modules/next/dist/compiled/semver/package.json","../node_modules/next/dist/compiled/lru-cache/index.js","../node_modules/next/dist/compiled/json5/index.js","../node_modules/next/dist/compiled/browserslist/index.js","../node_modules/next/dist/compiled/babel-packages/packages-bundle.js","../node_modules/next/dist/compiled/semver/index.js","../node_modules/caniuse-lite/dist/unpacker/feature.js","../node_modules/caniuse-lite/dist/unpacker/agents.js","../node_modules/caniuse-lite/dist/unpacker/region.js","../node_modules/next/dist/compiled/babel/parser.js","../node_modules/next/dist/compiled/babel/types.js","../node_modules/caniuse-lite/package.json","../node_modules/next/dist/compiled/babel/traverse.js","../node_modules/next/dist/compiled/babel/core.js","../node_modules/caniuse-lite/data/agents.js","../node_modules/caniuse-lite/dist/lib/statuses.js","../node_modules/caniuse-lite/dist/unpacker/browserVersions.js","../node_modules/caniuse-lite/dist/unpacker/browsers.js","../node_modules/caniuse-lite/dist/lib/supported.js","../node_modules/caniuse-lite/data/browsers.js","../node_modules/caniuse-lite/data/browserVersions.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/app-page/module.compiled.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js","../node_modules/next/dist/server/route-modules/pages/module.compiled.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/next-server.js.nft.json b/dsql-app/.local_dist/next-server.js.nft.json index a03a2a5..a23485e 100644 --- a/dsql-app/.local_dist/next-server.js.nft.json +++ b/dsql-app/.local_dist/next-server.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../node_modules/styled-jsx/index.js","../node_modules/styled-jsx/package.json","../node_modules/styled-jsx/dist/index/index.js","../node_modules/react/package.json","../node_modules/react/index.js","../node_modules/client-only/package.json","../node_modules/react/cjs/react.production.min.js","../node_modules/client-only/index.js","../node_modules/styled-jsx/style.js","../node_modules/next/dist/server/next-server.js","../node_modules/next/package.json","../node_modules/next/dist/server/base-server.js","../node_modules/next/dist/server/node-environment.js","../node_modules/next/dist/server/require-hook.js","../node_modules/next/dist/server/node-polyfill-crypto.js","../node_modules/next/dist/server/request-meta.js","../node_modules/next/dist/lib/find-pages-dir.js","../node_modules/next/dist/server/send-payload.js","../node_modules/next/dist/server/require.js","../node_modules/next/dist/server/load-components.js","../node_modules/next/dist/lib/is-error.js","../node_modules/next/dist/server/body-streams.js","../node_modules/next/dist/server/setup-http-agent-env.js","../node_modules/next/dist/lib/constants.js","../node_modules/next/dist/server/pipe-readable.js","../node_modules/next/dist/server/load-manifest.js","../node_modules/next/dist/lib/interop-default.js","../node_modules/next/dist/lib/format-dynamic-import-path.js","../node_modules/next/dist/lib/generate-interception-routes-rewrites.js","../node_modules/next/dist/server/route-kind.js","../node_modules/next/dist/server/image-optimizer.js","../node_modules/next/dist/server/serve-static.js","../node_modules/next/dist/lib/format-server-error.js","../node_modules/next/dist/shared/lib/utils.js","../node_modules/next/dist/shared/lib/constants.js","../node_modules/next/dist/server/base-http/node.js","../node_modules/next/dist/build/output/log.js","../node_modules/next/dist/server/web/utils.js","../node_modules/next/dist/server/route-matches/pages-api-route-match.js","../node_modules/next/dist/server/lib/node-fs-methods.js","../node_modules/next/dist/server/lib/mock-request.js","../node_modules/next/dist/client/components/app-router-headers.js","../node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js","../node_modules/next/dist/shared/lib/page-path/normalize-page-path.js","../node_modules/next/dist/server/lib/trace/tracer.js","../node_modules/next/dist/server/lib/trace/constants.js","../node_modules/next/dist/server/lib/module-loader/route-module-loader.js","../node_modules/next/dist/server/route-modules/app-page/module.render.js","../node_modules/next/dist/server/route-modules/pages/module.render.js","../node_modules/next/dist/shared/lib/router/utils/route-matcher.js","../node_modules/next/dist/shared/lib/router/utils/parse-url.js","../node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js","../node_modules/next/dist/shared/lib/router/utils/querystring.js","../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js","../node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js","../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../node_modules/next/dist/shared/lib/router/utils/route-regex.js","../node_modules/next/dist/server/web/spec-extension/adapters/next-request.js","../node_modules/react-dom/package.json","../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../node_modules/react/jsx-runtime.js","../node_modules/next/dist/server/api-utils/index.js","../node_modules/next/dist/server/response-cache/index.js","../node_modules/sharp/package.json","../node_modules/next/dist/server/lib/incremental-cache/index.js","../node_modules/next/dist/experimental/testmode/server.js","../node_modules/next/dist/server/web/sandbox/index.js","../node_modules/@next/env/package.json","../node_modules/sharp/lib/index.js","../node_modules/react-dom/index.js","../node_modules/next/dist/server/node-environment-baseline.js","../node_modules/next/dist/lib/wait.js","../node_modules/next/dist/lib/detached-promise.js","../node_modules/next/dist/server/client-component-renderer-logger.js","../node_modules/next/dist/lib/url.js","../node_modules/@next/env/dist/index.js","../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../node_modules/next/dist/server/node-environment-extensions/random.js","../node_modules/next/dist/server/node-environment-extensions/date.js","../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../node_modules/next/dist/server/lib/etag.js","../node_modules/next/dist/server/lib/revalidate.js","../node_modules/next/dist/server/lib/lru-cache.js","../node_modules/next/dist/server/app-render/encryption-utils.js","../node_modules/next/dist/server/app-render/action-utils.js","../node_modules/next/dist/lib/metadata/is-metadata-route.js","../node_modules/next/dist/shared/lib/is-plain-object.js","../node_modules/next/dist/shared/lib/deep-freeze.js","../node_modules/next/dist/server/lib/interception-routes.js","../node_modules/next/dist/shared/lib/image-blur-svg.js","../node_modules/next/dist/shared/lib/match-local-pattern.js","../node_modules/next/dist/shared/lib/match-remote-pattern.js","../node_modules/next/dist/lib/picocolors.js","../node_modules/next/dist/shared/lib/head.js","../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js","../node_modules/next/dist/server/base-http/index.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../node_modules/next/dist/shared/lib/is-thenable.js","../node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js","../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../node_modules/next/dist/server/route-modules/app-page/module.compiled.js","../node_modules/next/dist/server/route-modules/pages/module.compiled.js","../node_modules/next/dist/server/lib/module-loader/node-module-loader.js","../node_modules/next/dist/shared/lib/segment.js","../node_modules/next/dist/shared/lib/escape-regexp.js","../node_modules/next/dist/server/base-http/helpers.js","../node_modules/next/dist/lib/batcher.js","../node_modules/next/dist/lib/scheduler.js","../node_modules/next/dist/server/web/spec-extension/request.js","../node_modules/next/dist/server/response-cache/types.js","../node_modules/next/dist/server/response-cache/utils.js","../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js","../node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js","../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js","../node_modules/next/dist/shared/lib/router/utils/prepare-destination.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/next/dist/experimental/testmode/context.js","../node_modules/next/dist/experimental/testmode/fetch.js","../node_modules/next/dist/experimental/testmode/httpget.js","../node_modules/next/dist/server/lib/to-route.js","../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../node_modules/next/dist/server/web/spec-extension/adapters/headers.js","../node_modules/next/dist/compiled/fresh/package.json","../node_modules/next/dist/compiled/path-to-regexp/package.json","../node_modules/next/dist/compiled/image-size/package.json","../node_modules/next/dist/compiled/content-disposition/package.json","../node_modules/next/dist/compiled/is-animated/package.json","../node_modules/next/dist/compiled/send/package.json","../node_modules/next/dist/server/lib/incremental-cache/fetch-cache.js","../node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js","../node_modules/next/dist/server/lib/incremental-cache/shared-revalidate-timings.js","../node_modules/next/dist/server/web/sandbox/sandbox.js","../node_modules/next/dist/server/web/sandbox/context.js","../node_modules/next/dist/lib/redirect-status.js","../node_modules/next/dist/lib/is-edge-runtime.js","../node_modules/next/dist/server/utils.js","../node_modules/next/dist/server/render-result.js","../node_modules/next/dist/server/server-utils.js","../node_modules/next/dist/server/send-response.js","../node_modules/next/dist/lib/fallback.js","../node_modules/next/dist/compiled/@hapi/accept/package.json","../node_modules/next/dist/shared/lib/router/utils/index.js","../node_modules/@swc/helpers/_/_interop_require_default/package.json","../node_modules/next/dist/server/request/fallback-params.js","../node_modules/next/dist/server/lib/format-hostname.js","../node_modules/next/dist/shared/lib/runtime-config.external.js","../node_modules/next/dist/shared/lib/get-hostname.js","../node_modules/next/dist/server/normalizers/locale-route-normalizer.js","../node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js","../node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js","../node_modules/next/dist/server/lib/i18n-provider.js","../node_modules/next/dist/server/lib/match-next-data-pathname.js","../node_modules/next/dist/server/app-render/strip-flight-headers.js","../node_modules/next/dist/server/route-modules/checks.js","../node_modules/next/dist/server/lib/server-action-request-meta.js","../node_modules/next/dist/server/lib/patch-set-header.js","../node_modules/next/dist/server/after/builtin-request-context.js","../node_modules/next/dist/server/stream-utils/encodedTags.js","../node_modules/next/dist/server/web/adapter.js","../node_modules/next/dist/server/instrumentation/utils.js","../node_modules/next/dist/server/resume-data-cache/resume-data-cache.js","../node_modules/next/dist/server/patch-error-inspect.js","../node_modules/next/dist/server/lib/router-utils/decode-path-params.js","../node_modules/next/dist/server/normalizers/request/rsc.js","../node_modules/next/dist/server/normalizers/request/prefetch-rsc.js","../node_modules/next/dist/server/normalizers/request/next-data.js","../node_modules/next/dist/server/lib/experimental/ppr.js","../node_modules/next/dist/server/api-utils/node/try-get-preview-data.js","../node_modules/next/dist/server/node-environment-extensions/utils.js","../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js","../node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js","../node_modules/next/dist/shared/lib/invariant-error.js","../node_modules/next/dist/server/app-render/work-async-storage.external.js","../node_modules/react-dom/server.browser.js","../node_modules/next/dist/compiled/fresh/index.js","../node_modules/next/dist/compiled/path-to-regexp/index.js","../node_modules/next/dist/shared/lib/side-effect.js","../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../node_modules/next/dist/shared/lib/amp-mode.js","../node_modules/next/dist/compiled/image-size/index.js","../node_modules/next/dist/compiled/content-disposition/index.js","../node_modules/next/dist/compiled/is-animated/index.js","../node_modules/next/dist/compiled/send/index.js","../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../node_modules/next/dist/client/components/redirect-status-code.js","../node_modules/next/dist/server/api-utils/get-cookie-parser.js","../node_modules/next/dist/shared/lib/utils/warn-once.js","../node_modules/@swc/helpers/package.json","../node_modules/next/dist/compiled/cookie/package.json","../node_modules/next/dist/compiled/jsonwebtoken/package.json","../node_modules/next/dist/compiled/@hapi/accept/index.js","../node_modules/next/dist/server/web/next-url.js","../node_modules/next/dist/server/web/error.js","../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../node_modules/next/dist/compiled/ws/package.json","../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../node_modules/next/dist/server/web/spec-extension/cookies.js","../node_modules/next/dist/compiled/cookie/index.js","../node_modules/next/dist/server/app-render/async-local-storage.js","../node_modules/next/dist/compiled/jsonwebtoken/index.js","../node_modules/next/dist/lib/pick.js","../node_modules/next/dist/server/stream-utils/node-web-streams-helper.js","../node_modules/next/dist/shared/lib/error-source.js","../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../node_modules/next/dist/compiled/picomatch/package.json","../node_modules/next/dist/lib/is-app-page-route.js","../node_modules/next/dist/lib/is-app-route-route.js","../node_modules/next/dist/lib/is-api-route.js","../node_modules/next/dist/shared/lib/router/utils/parse-path.js","../node_modules/next/dist/server/internal-utils.js","../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../node_modules/next/dist/shared/lib/isomorphic/path.js","../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js","../node_modules/next/dist/server/web/sandbox/resource-managers.js","../node_modules/@img/sharp-libvips-linux-x64/package.json","../node_modules/@img/sharp-libvips-linux-x64/versions.json","../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../node_modules/@img/sharp-linux-x64/LICENSE","../node_modules/@img/sharp-linux-x64/package.json","../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../node_modules/@img/sharp-linuxmusl-x64/package.json","../node_modules/next/dist/server/lib/is-ipv6.js","../node_modules/next/dist/server/route-matchers/app-page-route-matcher.js","../node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js","../node_modules/next/dist/server/route-matchers/locale-route-matcher.js","../node_modules/next/dist/server/route-matchers/app-route-route-matcher.js","../node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js","../node_modules/next/dist/server/route-matchers/pages-route-matcher.js","../node_modules/next/dist/server/resume-data-cache/cache-store.js","../node_modules/next/dist/server/web/globals.js","../node_modules/next/dist/server/async-storage/request-store.js","../node_modules/next/dist/server/async-storage/work-store.js","../node_modules/next/dist/server/web/web-on-close.js","../node_modules/next/dist/server/web/get-edge-preview-props.js","../node_modules/scheduler/package.json","../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../node_modules/next/dist/server/crypto-utils.js","../node_modules/next/dist/server/web/spec-extension/adapters/reflect.js","../node_modules/next/dist/shared/lib/router/utils/path-match.js","../node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js","../node_modules/next/dist/client/components/react-dev-overlay/server/middleware.js","../node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js","../node_modules/next/dist/server/web/spec-extension/fetch-event.js","../node_modules/next/dist/server/web/spec-extension/response.js","../node_modules/next/dist/compiled/ws/index.js","../node_modules/next/dist/server/route-modules/pages/module.js","../node_modules/next/dist/server/route-modules/app-page/module.js","../node_modules/next/dist/server/app-render/dynamic-rendering.js","../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../node_modules/next/dist/shared/lib/router/utils/relativize-url.js","../node_modules/next/dist/server/normalizers/request/suffix.js","../node_modules/next/dist/server/normalizers/request/prefix.js","../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js","../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js","../node_modules/next/dist/client/components/react-dev-overlay/server/shared.js","../node_modules/scheduler/index.js","../node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js","../node_modules/next/dist/compiled/picomatch/index.js","../node_modules/sharp/lib/constructor.js","../node_modules/sharp/lib/input.js","../node_modules/sharp/lib/resize.js","../node_modules/sharp/lib/composite.js","../node_modules/sharp/lib/operation.js","../node_modules/sharp/lib/colour.js","../node_modules/sharp/lib/channel.js","../node_modules/sharp/lib/output.js","../node_modules/sharp/lib/utility.js","../node_modules/next/dist/experimental/testmode/server-edge.js","../node_modules/next/dist/server/normalizers/built/app/index.js","../node_modules/next/dist/server/normalizers/built/pages/index.js","../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json","../node_modules/next/dist/compiled/edge-runtime/package.json","../node_modules/next/dist/compiled/source-map/package.json","../node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js","../node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js","../node_modules/next/dist/server/stream-utils/uint8array-helpers.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/cjs/scheduler.development.js","../node_modules/next/dist/compiled/debug/package.json","../node_modules/next/dist/server/route-matchers/route-matcher.js","../node_modules/next/dist/server/after/after-context.js","../node_modules/next/dist/server/async-storage/draft-mode-provider.js","../node_modules/next/dist/build/next-dir-paths.js","../node_modules/next/dist/compiled/edge-runtime/index.js","../node_modules/next/dist/server/dynamic-rendering-utils.js","../node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js","../node_modules/next/dist/server/render.js","../node_modules/sharp/lib/is.js","../node_modules/sharp/lib/sharp.js","../node_modules/sharp/lib/libvips.js","../node_modules/next/dist/compiled/source-map/source-map.js","../node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js","../node_modules/next/dist/client/components/hooks-server-context.js","../node_modules/next/dist/client/components/static-generation-bailout.js","../node_modules/next/dist/lib/metadata/metadata-constants.js","../node_modules/next/dist/server/route-modules/route-module.js","../node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js","../node_modules/next/dist/server/app-render/app-render.js","../node_modules/next/dist/lib/semver-noop.js","../node_modules/next/dist/shared/lib/is-internal.js","../node_modules/next/dist/compiled/debug/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-from-file.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/launchEditor.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-stack.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/node-stack-frames.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/webpack-module-path.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js","../node_modules/next/dist/compiled/@edge-runtime/cookies/package.json","../node_modules/next/dist/compiled/bytes/package.json","../node_modules/next/dist/compiled/path-browserify/package.json","../node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js","../node_modules/next/dist/server/app-render/action-async-storage.external.js","../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../node_modules/next/dist/compiled/babel/code-frame.js","../node_modules/next/dist/compiled/source-map08/package.json","../node_modules/detect-libc/package.json","../node_modules/next/dist/lib/is-serializable-props.js","../node_modules/next/dist/server/post-process.js","../node_modules/next/dist/server/after/revalidation-utils.js","../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js","../node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js","../node_modules/next/dist/shared/lib/router/utils/add-locale.js","../node_modules/next/dist/compiled/@edge-runtime/cookies/index.js","../node_modules/next/dist/shared/lib/loadable.shared-runtime.js","../node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js","../node_modules/next/dist/shared/lib/router-context.shared-runtime.js","../node_modules/next/dist/shared/lib/html-context.shared-runtime.js","../node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js","../node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js","../node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js","../node_modules/color/index.js","../node_modules/next/dist/compiled/babel/package.json","../node_modules/next/dist/shared/lib/router/adapters.js","../node_modules/next/dist/compiled/bytes/index.js","../node_modules/next/dist/compiled/path-browserify/index.js","../node_modules/next/dist/lib/metadata/metadata-context.js","../node_modules/next/dist/client/components/not-found.js","../node_modules/next/dist/server/lib/implicit-tags.js","../node_modules/next/dist/client/components/redirect.js","../node_modules/next/dist/server/app-render/flight-render-result.js","../node_modules/next/dist/server/app-render/create-error-handler.js","../node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js","../node_modules/next/dist/server/app-render/get-segment-param.js","../node_modules/next/dist/server/app-render/get-script-nonce-from-header.js","../node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js","../node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js","../node_modules/next/dist/server/app-render/action-handler.js","../node_modules/next/dist/server/app-render/server-inserted-html.js","../node_modules/next/dist/server/app-render/required-scripts.js","../node_modules/next/dist/server/app-render/make-get-server-inserted-html.js","../node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js","../node_modules/next/dist/server/app-render/create-component-tree.js","../node_modules/next/dist/server/app-render/get-asset-query-string.js","../node_modules/next/dist/server/app-render/postponed-state.js","../node_modules/next/dist/server/app-render/use-flight-response.js","../node_modules/next/dist/client/components/app-router.js","../node_modules/next/dist/server/app-render/app-render-prerender-utils.js","../node_modules/next/dist/server/app-render/prospective-render-utils.js","../node_modules/next/dist/server/app-render/app-render-render-utils.js","../node_modules/next/dist/server/app-render/cache-signal.js","../node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js","../node_modules/next/dist/server/app-render/parse-loader-tree.js","../node_modules/next/dist/client/components/dev-root-not-found-boundary.js","../node_modules/color/package.json","../node_modules/detect-libc/lib/detect-libc.js","../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js","../node_modules/next/dist/shared/lib/router/action-queue.js","../node_modules/next/dist/server/lib/trace/utils.js","../node_modules/next/dist/compiled/source-map08/source-map.js","../node_modules/sharp/node_modules/semver/functions/gte.js","../node_modules/sharp/node_modules/semver/functions/coerce.js","../node_modules/sharp/node_modules/semver/functions/satisfies.js","../node_modules/next/dist/server/ReactDOMServerPages.js","../node_modules/next/dist/client/components/is-hydration-error.js","../node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js","../node_modules/sharp/node_modules/semver/package.json","../node_modules/next/dist/compiled/strip-ansi/package.json","../node_modules/next/dist/compiled/react-is/package.json","../node_modules/next/dist/compiled/p-queue/package.json","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-url.js","../node_modules/next/dist/lib/page-types.js","../node_modules/next/dist/server/normalizers/prefixing-normalizer.js","../node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js","../node_modules/next/dist/server/normalizers/normalizers.js","../node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js","../node_modules/next/dist/server/normalizers/underscore-normalizer.js","../node_modules/next/dist/lib/non-nullable.js","../node_modules/next/dist/server/optimize-amp.js","../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../node_modules/next/dist/compiled/nanoid/package.json","../node_modules/next/dist/compiled/babel/bundle.js","../node_modules/detect-libc/lib/process.js","../node_modules/detect-libc/lib/filesystem.js","../node_modules/next/dist/shared/lib/image-config.js","../node_modules/next/dist/server/htmlescape.js","../node_modules/next/dist/lib/client-reference.js","../node_modules/next/dist/client/add-base-path.js","../node_modules/next/dist/client/remove-base-path.js","../node_modules/next/dist/client/has-base-path.js","../node_modules/next/dist/client/app-call-server.js","../node_modules/next/dist/compiled/strip-ansi/index.js","../node_modules/next/dist/compiled/react-is/index.js","../node_modules/next/dist/compiled/p-queue/index.js","../node_modules/next/dist/server/app-render/types.js","../node_modules/next/dist/client/components/is-next-router-error.js","../node_modules/next/dist/server/app-render/csrf-protection.js","../node_modules/next/dist/server/app-render/react-server.node.js","../node_modules/next/dist/shared/lib/encode-uri-path.js","../node_modules/next/dist/client/components/match-segments.js","../node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js","../node_modules/next/dist/server/app-render/get-preloadable-fonts.js","../node_modules/next/dist/server/app-render/has-loading-component-in-tree.js","../node_modules/next/dist/server/lib/app-dir-module.js","../node_modules/next/dist/server/app-render/interop-default.js","../node_modules/next/dist/server/app-render/get-layer-assets.js","../node_modules/next/dist/server/lib/patch-fetch.js","../node_modules/next/dist/client/components/parallel-route-default.js","../node_modules/next/dist/client/components/use-reducer.js","../node_modules/next/dist/client/components/error-boundary.js","../node_modules/next/dist/client/components/app-router-announcer.js","../node_modules/next/dist/client/components/redirect-boundary.js","../node_modules/next/dist/client/components/unresolved-thenable.js","../node_modules/next/dist/client/components/nav-failure-handler.js","../node_modules/next/dist/client/components/not-found-boundary.js","../node_modules/react/jsx-dev-runtime.js","../node_modules/next/dist/client/flight-data-helpers.js","../node_modules/next/dist/server/lib/server-ipc/utils.js","../node_modules/next/dist/client/components/router-reducer/router-reducer-types.js","../node_modules/next/dist/client/components/router-reducer/create-href-from-url.js","../node_modules/next/dist/client/components/router-reducer/compute-changed-path.js","../node_modules/next/dist/compiled/nanoid/index.cjs","../node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js","../node_modules/next/dist/compiled/data-uri-to-buffer/package.json","../node_modules/next/dist/compiled/shell-quote/package.json","../node_modules/next/dist/compiled/stacktrace-parser/package.json","../node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js","../node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js","../node_modules/next/dist/client/components/router-reducer/router-reducer.js","../node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js","../node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js","../node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js","../node_modules/sharp/node_modules/semver/functions/compare.js","../node_modules/sharp/node_modules/semver/classes/semver.js","../node_modules/sharp/node_modules/semver/internal/re.js","../node_modules/sharp/node_modules/semver/functions/parse.js","../node_modules/sharp/node_modules/semver/classes/range.js","../node_modules/busboy/package.json","../node_modules/color-string/index.js","../node_modules/color-convert/index.js","../node_modules/next/dist/compiled/data-uri-to-buffer/index.js","../node_modules/next/dist/compiled/shell-quote/index.js","../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../node_modules/color-string/package.json","../node_modules/color-convert/package.json","../node_modules/next/dist/compiled/string-hash/package.json","../node_modules/next/dist/compiled/superstruct/package.json","../node_modules/react/cjs/react-jsx-dev-runtime.production.min.js","../node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js","../node_modules/busboy/lib/index.js","../node_modules/next/dist/client/normalize-trailing-slash.js","../node_modules/next/dist/compiled/react-is/cjs/react-is.production.js","../node_modules/next/dist/compiled/react-is/cjs/react-is.development.js","../node_modules/next/dist/server/lib/dedupe-fetch.js","../node_modules/next/dist/client/components/navigation-untracked.js","../node_modules/next/dist/client/components/navigation.js","../node_modules/next/dist/compiled/string-hash/index.js","../node_modules/next/dist/compiled/superstruct/index.cjs","../node_modules/color-convert/conversions.js","../node_modules/color-convert/route.js","../node_modules/sharp/node_modules/semver/internal/debug.js","../node_modules/sharp/node_modules/semver/internal/constants.js","../node_modules/sharp/node_modules/semver/internal/parse-options.js","../node_modules/sharp/node_modules/semver/internal/identifiers.js","../node_modules/sharp/node_modules/semver/internal/lrucache.js","../node_modules/sharp/node_modules/semver/classes/comparator.js","../node_modules/next/dist/server/dev/hot-reloader-types.js","../node_modules/next/dist/server/dev/extract-modules-from-turbopack-message.js","../node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js","../node_modules/next/dist/client/components/router-reducer/apply-flight-data.js","../node_modules/next/dist/client/components/router-reducer/fetch-server-response.js","../node_modules/next/dist/client/components/react-dev-overlay/shared.js","../node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js","../node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js","../node_modules/next/dist/compiled/browserslist/package.json","../node_modules/next/dist/compiled/json5/package.json","../node_modules/next/dist/compiled/lru-cache/package.json","../node_modules/next/dist/compiled/semver/package.json","../node_modules/next/dist/compiled/babel-packages/package.json","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/format-webpack-messages.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-error-handler.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/runtime-error-handler.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-websocket.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-component-stack.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stitched-error.js","../node_modules/busboy/lib/utils.js","../node_modules/busboy/lib/types/multipart.js","../node_modules/busboy/lib/types/urlencoded.js","../node_modules/color-name/package.json","../node_modules/next/dist/lib/metadata/get-metadata-route.js","../node_modules/next/dist/compiled/browserslist/index.js","../node_modules/next/dist/compiled/json5/index.js","../node_modules/next/dist/compiled/lru-cache/index.js","../node_modules/next/dist/compiled/semver/index.js","../node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js","../node_modules/next/dist/compiled/babel-packages/packages-bundle.js","../node_modules/simple-swizzle/index.js","../node_modules/color-name/index.js","../node_modules/next/dist/client/components/navigation.react-server.js","../node_modules/next/dist/client/components/bailout-to-client-rendering.js","../node_modules/simple-swizzle/package.json","../node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js","../node_modules/sharp/node_modules/semver/functions/cmp.js","../node_modules/next/dist/client/app-find-source-map-url.js","../node_modules/next/dist/shared/lib/hash.js","../node_modules/next/dist/client/assign-location.js","../node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js","../node_modules/next/dist/client/components/promise-queue.js","../node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js","../node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js","../node_modules/next/dist/client/components/router-reducer/handle-mutable.js","../node_modules/next/dist/client/components/router-reducer/ppr-navigations.js","../node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js","../node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js","../node_modules/next/dist/client/components/router-reducer/clear-cache-node-data-for-segment-path.js","../node_modules/next/dist/client/components/router-reducer/aliased-prefetch-navigations.js","../node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js","../node_modules/next/dist/client/lib/console.js","../node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/StaticIndicator.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/styles/Base.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/styles/ComponentStyles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/styles/CssReset.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/root-layout-missing-tags-error.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-socket-url.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/attach-hydration-error-state.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/hydration-error-info.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/console-error.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/enqueue-client-error.js","../node_modules/next/dist/client/components/unstable-rethrow.js","../node_modules/streamsearch/package.json","../node_modules/sharp/node_modules/semver/functions/eq.js","../node_modules/sharp/node_modules/semver/functions/neq.js","../node_modules/sharp/node_modules/semver/functions/gt.js","../node_modules/sharp/node_modules/semver/functions/lt.js","../node_modules/sharp/node_modules/semver/functions/lte.js","../node_modules/caniuse-lite/dist/unpacker/agents.js","../node_modules/caniuse-lite/dist/unpacker/feature.js","../node_modules/caniuse-lite/dist/unpacker/region.js","../node_modules/streamsearch/lib/sbmh.js","../node_modules/simple-swizzle/node_modules/is-arrayish/index.js","../node_modules/caniuse-lite/package.json","../node_modules/next/dist/compiled/babel/parser.js","../node_modules/next/dist/compiled/babel/core.js","../node_modules/next/dist/compiled/babel/traverse.js","../node_modules/next/dist/compiled/babel/types.js","../node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js","../node_modules/simple-swizzle/node_modules/is-arrayish/package.json","../node_modules/next/dist/shared/lib/normalized-asset-prefix.js","../node_modules/next/dist/export/helpers/is-dynamic-usage-error.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/icons/LightningBolt.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CloseIcon.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-error-by-type.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/nodejs-inspector.js","../node_modules/caniuse-lite/data/agents.js","../node_modules/next/dist/server/lib/router-utils/is-postpone.js","../node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json","../node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.js","../node_modules/caniuse-lite/dist/unpacker/browsers.js","../node_modules/caniuse-lite/dist/unpacker/browserVersions.js","../node_modules/caniuse-lite/dist/lib/statuses.js","../node_modules/caniuse-lite/dist/lib/supported.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/copy-button/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js","../node_modules/@swc/helpers/_/_tagged_template_literal_loose/package.json","../node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs","../node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs","../node_modules/caniuse-lite/data/browsers.js","../node_modules/caniuse-lite/data/browserVersions.js","../node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CollapseIcon.js","../node_modules/next/dist/shared/lib/magic-identifier.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/group-stack-frames-by-framework.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/GroupedStackFrames.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/hooks/use-on-click-outside.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/icons/FrameworkIcon.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js","../node_modules/next/dist/compiled/anser/package.json","../node_modules/next/dist/compiled/anser/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js","../node_modules/next/dist/compiled/platform/package.json","../node_modules/next/dist/compiled/css.escape/package.json","../node_modules/next/dist/compiled/platform/platform.js","../node_modules/next/dist/compiled/css.escape/css.escape.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js"]} \ No newline at end of file +{"version":1,"files":["../node_modules/styled-jsx/index.js","../node_modules/styled-jsx/package.json","../node_modules/react/package.json","../node_modules/styled-jsx/dist/index/index.js","../node_modules/react/index.js","../node_modules/client-only/package.json","../node_modules/react/cjs/react.production.min.js","../node_modules/client-only/index.js","../node_modules/styled-jsx/style.js","../node_modules/next/dist/server/next-server.js","../node_modules/next/package.json","../node_modules/next/dist/server/base-server.js","../node_modules/next/dist/server/node-environment.js","../node_modules/next/dist/server/require-hook.js","../node_modules/next/dist/server/node-polyfill-crypto.js","../node_modules/next/dist/server/request-meta.js","../node_modules/next/dist/lib/find-pages-dir.js","../node_modules/next/dist/server/send-payload.js","../node_modules/next/dist/server/load-components.js","../node_modules/next/dist/server/require.js","../node_modules/next/dist/lib/is-error.js","../node_modules/next/dist/server/body-streams.js","../node_modules/next/dist/server/setup-http-agent-env.js","../node_modules/next/dist/lib/constants.js","../node_modules/next/dist/server/pipe-readable.js","../node_modules/next/dist/server/load-manifest.js","../node_modules/next/dist/lib/interop-default.js","../node_modules/next/dist/server/route-kind.js","../node_modules/next/dist/lib/format-dynamic-import-path.js","../node_modules/next/dist/lib/generate-interception-routes-rewrites.js","../node_modules/next/dist/server/image-optimizer.js","../node_modules/next/dist/server/serve-static.js","../node_modules/next/dist/lib/format-server-error.js","../node_modules/react-dom/package.json","../node_modules/next/dist/shared/lib/utils.js","../node_modules/next/dist/shared/lib/constants.js","../node_modules/next/dist/server/base-http/node.js","../node_modules/next/dist/build/output/log.js","../node_modules/next/dist/server/web/utils.js","../node_modules/next/dist/server/route-matches/pages-api-route-match.js","../node_modules/next/dist/server/lib/node-fs-methods.js","../node_modules/next/dist/server/lib/mock-request.js","../node_modules/next/dist/client/components/app-router-headers.js","../node_modules/next/dist/shared/lib/invariant-error.js","../node_modules/next/dist/server/after/awaiter.js","../node_modules/next/dist/server/lib/async-callback-set.js","../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../node_modules/next/dist/shared/lib/page-path/normalize-page-path.js","../node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js","../node_modules/next/dist/server/lib/trace/constants.js","../node_modules/next/dist/server/lib/trace/tracer.js","../node_modules/next/dist/server/route-modules/app-page/module.render.js","../node_modules/next/dist/server/lib/module-loader/route-module-loader.js","../node_modules/next/dist/server/route-modules/pages/module.render.js","../node_modules/react/jsx-runtime.js","../node_modules/sharp/package.json","../node_modules/next/dist/shared/lib/router/utils/route-matcher.js","../node_modules/next/dist/shared/lib/router/utils/parse-url.js","../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js","../node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js","../node_modules/next/dist/shared/lib/router/utils/querystring.js","../node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js","../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../node_modules/next/dist/shared/lib/router/utils/route-regex.js","../node_modules/next/dist/server/web/spec-extension/adapters/next-request.js","../node_modules/next/dist/server/response-cache/index.js","../node_modules/next/dist/server/api-utils/index.js","../node_modules/sharp/lib/index.js","../node_modules/react-dom/index.js","../node_modules/next/dist/server/lib/incremental-cache/index.js","../node_modules/next/dist/server/web/sandbox/index.js","../node_modules/@next/env/package.json","../node_modules/next/dist/shared/lib/head.js","../node_modules/next/dist/server/node-environment-baseline.js","../node_modules/next/dist/lib/wait.js","../node_modules/next/dist/lib/detached-promise.js","../node_modules/next/dist/server/client-component-renderer-logger.js","../node_modules/next/dist/lib/url.js","../node_modules/next/dist/experimental/testmode/server.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../node_modules/next/dist/server/node-environment-extensions/random.js","../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../node_modules/next/dist/server/node-environment-extensions/date.js","../node_modules/next/dist/server/lib/etag.js","../node_modules/next/dist/server/lib/revalidate.js","../node_modules/next/dist/lib/metadata/is-metadata-route.js","../node_modules/next/dist/server/app-render/action-utils.js","../node_modules/next/dist/server/app-render/encryption-utils.js","../node_modules/next/dist/server/lib/lru-cache.js","../node_modules/next/dist/shared/lib/is-plain-object.js","../node_modules/next/dist/shared/lib/deep-freeze.js","../node_modules/next/dist/server/lib/interception-routes.js","../node_modules/next/dist/shared/lib/image-blur-svg.js","../node_modules/next/dist/shared/lib/match-remote-pattern.js","../node_modules/next/dist/shared/lib/match-local-pattern.js","../node_modules/next/dist/lib/picocolors.js","../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js","../node_modules/next/dist/server/base-http/index.js","../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../node_modules/@next/env/dist/index.js","../node_modules/next/dist/shared/lib/is-thenable.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js","../node_modules/next/dist/server/route-modules/app-page/module.compiled.js","../node_modules/next/dist/server/route-modules/pages/module.compiled.js","../node_modules/next/dist/server/lib/module-loader/node-module-loader.js","../node_modules/next/dist/shared/lib/segment.js","../node_modules/next/dist/shared/lib/escape-regexp.js","../node_modules/next/dist/server/base-http/helpers.js","../node_modules/next/dist/lib/batcher.js","../node_modules/next/dist/lib/scheduler.js","../node_modules/next/dist/server/web/spec-extension/request.js","../node_modules/next/dist/server/response-cache/types.js","../node_modules/next/dist/server/response-cache/utils.js","../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js","../node_modules/next/dist/shared/lib/router/utils/prepare-destination.js","../node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js","../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js","../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../node_modules/next/dist/server/lib/to-route.js","../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../node_modules/next/dist/server/web/spec-extension/adapters/headers.js","../node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js","../node_modules/next/dist/server/lib/incremental-cache/fetch-cache.js","../node_modules/next/dist/server/lib/incremental-cache/shared-revalidate-timings.js","../node_modules/next/dist/server/web/sandbox/context.js","../node_modules/next/dist/server/web/sandbox/sandbox.js","../node_modules/next/dist/lib/is-edge-runtime.js","../node_modules/next/dist/lib/redirect-status.js","../node_modules/next/dist/server/utils.js","../node_modules/next/dist/server/render-result.js","../node_modules/next/dist/server/server-utils.js","../node_modules/next/dist/server/send-response.js","../node_modules/next/dist/lib/fallback.js","../node_modules/next/dist/shared/lib/amp-mode.js","../node_modules/next/dist/shared/lib/side-effect.js","../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../node_modules/next/dist/shared/lib/router/utils/index.js","../node_modules/next/dist/compiled/fresh/package.json","../node_modules/next/dist/compiled/send/package.json","../node_modules/next/dist/compiled/path-to-regexp/package.json","../node_modules/next/dist/compiled/image-size/package.json","../node_modules/next/dist/compiled/content-disposition/package.json","../node_modules/next/dist/compiled/is-animated/package.json","../node_modules/next/dist/server/patch-error-inspect.js","../node_modules/next/dist/server/request/fallback-params.js","../node_modules/next/dist/server/lib/format-hostname.js","../node_modules/next/dist/shared/lib/runtime-config.external.js","../node_modules/next/dist/shared/lib/get-hostname.js","../node_modules/next/dist/server/normalizers/locale-route-normalizer.js","../node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js","../node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js","../node_modules/next/dist/server/lib/i18n-provider.js","../node_modules/next/dist/server/lib/match-next-data-pathname.js","../node_modules/next/dist/server/app-render/strip-flight-headers.js","../node_modules/next/dist/server/route-modules/checks.js","../node_modules/next/dist/server/lib/server-action-request-meta.js","../node_modules/next/dist/server/lib/patch-set-header.js","../node_modules/next/dist/server/after/builtin-request-context.js","../node_modules/next/dist/server/stream-utils/encodedTags.js","../node_modules/next/dist/server/web/adapter.js","../node_modules/next/dist/server/instrumentation/utils.js","../node_modules/next/dist/experimental/testmode/context.js","../node_modules/next/dist/experimental/testmode/fetch.js","../node_modules/next/dist/experimental/testmode/httpget.js","../node_modules/next/dist/shared/lib/utils/warn-once.js","../node_modules/next/dist/server/node-environment-extensions/utils.js","../node_modules/next/dist/server/normalizers/request/rsc.js","../node_modules/next/dist/server/lib/router-utils/decode-path-params.js","../node_modules/next/dist/server/normalizers/request/prefetch-rsc.js","../node_modules/next/dist/server/normalizers/request/next-data.js","../node_modules/next/dist/server/lib/experimental/ppr.js","../node_modules/next/dist/server/api-utils/node/try-get-preview-data.js","../node_modules/next/dist/server/app-render/work-async-storage.external.js","../node_modules/next/dist/compiled/@hapi/accept/package.json","../node_modules/@swc/helpers/_/_interop_require_default/package.json","../node_modules/react-dom/server.browser.js","../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js","../node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js","../node_modules/next/dist/server/api-utils/get-cookie-parser.js","../node_modules/next/dist/client/components/redirect-status-code.js","../node_modules/next/dist/compiled/jsonwebtoken/package.json","../node_modules/next/dist/compiled/fresh/index.js","../node_modules/next/dist/compiled/send/index.js","../node_modules/next/dist/compiled/path-to-regexp/index.js","../node_modules/next/dist/compiled/image-size/index.js","../node_modules/next/dist/compiled/is-animated/index.js","../node_modules/next/dist/compiled/content-disposition/index.js","../node_modules/scheduler/package.json","../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../node_modules/@swc/helpers/package.json","../node_modules/next/dist/compiled/cookie/package.json","../node_modules/next/dist/server/web/next-url.js","../node_modules/next/dist/server/web/error.js","../node_modules/next/dist/compiled/@hapi/accept/index.js","../node_modules/scheduler/index.js","../node_modules/next/dist/server/web/spec-extension/cookies.js","../node_modules/next/dist/server/app-render/async-local-storage.js","../node_modules/@img/sharp-libvips-linux-x64/package.json","../node_modules/@img/sharp-libvips-linux-x64/versions.json","../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../node_modules/@img/sharp-linux-x64/LICENSE","../node_modules/@img/sharp-linux-x64/package.json","../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../node_modules/@img/sharp-linuxmusl-x64/package.json","../node_modules/next/dist/lib/pick.js","../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../node_modules/next/dist/compiled/jsonwebtoken/index.js","../node_modules/next/dist/compiled/ws/package.json","../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../node_modules/next/dist/server/stream-utils/node-web-streams-helper.js","../node_modules/next/dist/shared/lib/error-source.js","../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../node_modules/next/dist/lib/is-app-page-route.js","../node_modules/next/dist/lib/is-app-route-route.js","../node_modules/next/dist/lib/is-api-route.js","../node_modules/next/dist/server/internal-utils.js","../node_modules/next/dist/shared/lib/router/utils/parse-path.js","../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../node_modules/next/dist/shared/lib/isomorphic/path.js","../node_modules/next/dist/compiled/cookie/index.js","../node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js","../node_modules/next/dist/server/web/sandbox/resource-managers.js","../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../node_modules/next/dist/server/lib/is-ipv6.js","../node_modules/next/dist/server/route-matchers/locale-route-matcher.js","../node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js","../node_modules/next/dist/server/route-matchers/app-page-route-matcher.js","../node_modules/next/dist/server/route-matchers/app-route-route-matcher.js","../node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js","../node_modules/next/dist/server/route-matchers/pages-route-matcher.js","../node_modules/next/dist/server/async-storage/request-store.js","../node_modules/next/dist/server/web/globals.js","../node_modules/next/dist/server/async-storage/work-store.js","../node_modules/next/dist/server/web/web-on-close.js","../node_modules/next/dist/server/web/get-edge-preview-props.js","../node_modules/next/dist/server/crypto-utils.js","../node_modules/next/dist/server/web/spec-extension/adapters/reflect.js","../node_modules/next/dist/compiled/picomatch/package.json","../node_modules/next/dist/shared/lib/router/utils/path-match.js","../node_modules/next/dist/client/components/react-dev-overlay/server/middleware-webpack.js","../node_modules/next/dist/server/app-render/dynamic-rendering.js","../node_modules/next/dist/server/web/spec-extension/response.js","../node_modules/next/dist/server/web/spec-extension/fetch-event.js","../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../node_modules/sharp/lib/resize.js","../node_modules/sharp/lib/constructor.js","../node_modules/sharp/lib/composite.js","../node_modules/sharp/lib/input.js","../node_modules/sharp/lib/operation.js","../node_modules/sharp/lib/colour.js","../node_modules/sharp/lib/channel.js","../node_modules/sharp/lib/utility.js","../node_modules/sharp/lib/output.js","../node_modules/next/dist/client/components/react-dev-overlay/server/shared.js","../node_modules/next/dist/shared/lib/router/utils/relativize-url.js","../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js","../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js","../node_modules/next/dist/server/normalizers/request/suffix.js","../node_modules/next/dist/server/normalizers/request/prefix.js","../node_modules/next/dist/compiled/ws/index.js","../node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js","../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js","../node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/cjs/scheduler.development.js","../node_modules/next/dist/server/route-modules/app-page/module.js","../node_modules/next/dist/compiled/picomatch/index.js","../node_modules/next/dist/server/route-modules/pages/module.js","../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../node_modules/next/dist/server/normalizers/built/app/index.js","../node_modules/next/dist/server/normalizers/built/pages/index.js","../node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js","../node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js","../node_modules/next/dist/compiled/source-map/package.json","../node_modules/next/dist/experimental/testmode/server-edge.js","../node_modules/next/dist/server/stream-utils/uint8array-helpers.js","../node_modules/next/dist/compiled/edge-runtime/package.json","../node_modules/sharp/lib/is.js","../node_modules/sharp/lib/sharp.js","../node_modules/sharp/lib/libvips.js","../node_modules/next/dist/server/dynamic-rendering-utils.js","../node_modules/next/dist/server/route-matchers/route-matcher.js","../node_modules/next/dist/server/after/after-context.js","../node_modules/next/dist/server/async-storage/draft-mode-provider.js","../node_modules/next/dist/client/components/hooks-server-context.js","../node_modules/next/dist/client/components/static-generation-bailout.js","../node_modules/next/dist/lib/metadata/metadata-constants.js","../node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js","../node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js","../node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json","../node_modules/next/dist/shared/lib/is-internal.js","../node_modules/next/dist/compiled/source-map/source-map.js","../node_modules/next/dist/compiled/edge-runtime/index.js","../node_modules/color/index.js","../node_modules/next/dist/compiled/debug/package.json","../node_modules/next/dist/server/render.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/launchEditor.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-from-file.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/node-stack-frames.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/webpack-module-path.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-stack.js","../node_modules/color/package.json","../node_modules/next/dist/lib/semver-noop.js","../node_modules/next/dist/server/app-render/app-render.js","../node_modules/next/dist/server/route-modules/route-module.js","../node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js","../node_modules/next/dist/compiled/debug/index.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js","../node_modules/next/dist/compiled/@edge-runtime/cookies/package.json","../node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js","../node_modules/semver/functions/gte.js","../node_modules/semver/functions/coerce.js","../node_modules/semver/functions/satisfies.js","../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../node_modules/next/dist/server/after/revalidation-utils.js","../node_modules/next/dist/compiled/path-browserify/package.json","../node_modules/next/dist/compiled/bytes/package.json","../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js","../node_modules/next/dist/shared/lib/router/utils/add-locale.js","../node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js","../node_modules/semver/package.json","../node_modules/next/dist/compiled/babel/code-frame.js","../node_modules/next/dist/compiled/source-map08/package.json","../node_modules/next/dist/lib/is-serializable-props.js","../node_modules/next/dist/server/post-process.js","../node_modules/next/dist/compiled/@edge-runtime/cookies/index.js","../node_modules/next/dist/shared/lib/loadable.shared-runtime.js","../node_modules/next/dist/shared/lib/router-context.shared-runtime.js","../node_modules/next/dist/shared/lib/html-context.shared-runtime.js","../node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js","../node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js","../node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js","../node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js","../node_modules/color-convert/index.js","../node_modules/color-string/index.js","../node_modules/next/dist/compiled/babel/package.json","../node_modules/next/dist/compiled/path-browserify/index.js","../node_modules/next/dist/compiled/bytes/index.js","../node_modules/next/dist/shared/lib/router/adapters.js","../node_modules/next/dist/lib/metadata/metadata-context.js","../node_modules/next/dist/client/components/redirect.js","../node_modules/next/dist/server/app-render/flight-render-result.js","../node_modules/next/dist/client/components/redirect-error.js","../node_modules/next/dist/server/lib/implicit-tags.js","../node_modules/next/dist/server/app-render/get-segment-param.js","../node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js","../node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js","../node_modules/next/dist/server/app-render/get-script-nonce-from-header.js","../node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js","../node_modules/next/dist/server/app-render/action-handler.js","../node_modules/next/dist/server/app-render/create-error-handler.js","../node_modules/next/dist/server/app-render/server-inserted-html.js","../node_modules/next/dist/server/app-render/required-scripts.js","../node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js","../node_modules/next/dist/server/app-render/get-asset-query-string.js","../node_modules/next/dist/server/app-render/create-component-tree.js","../node_modules/next/dist/server/app-render/postponed-state.js","../node_modules/next/dist/server/app-render/make-get-server-inserted-html.js","../node_modules/next/dist/server/app-render/use-flight-response.js","../node_modules/next/dist/client/components/app-router.js","../node_modules/next/dist/server/app-render/app-render-prerender-utils.js","../node_modules/next/dist/server/app-render/app-render-render-utils.js","../node_modules/next/dist/server/app-render/prospective-render-utils.js","../node_modules/next/dist/server/app-render/cache-signal.js","../node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js","../node_modules/next/dist/server/resume-data-cache/resume-data-cache.js","../node_modules/next/dist/server/app-render/parse-loader-tree.js","../node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js","../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../node_modules/next/dist/client/components/is-hydration-error.js","../node_modules/next/dist/server/app-render/action-async-storage.external.js","../node_modules/color-convert/package.json","../node_modules/color-string/package.json","../node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js","../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js","../node_modules/next/dist/shared/lib/router/action-queue.js","../node_modules/next/dist/server/lib/trace/utils.js","../node_modules/next/dist/compiled/source-map08/source-map.js","../node_modules/semver/functions/compare.js","../node_modules/semver/internal/re.js","../node_modules/semver/functions/parse.js","../node_modules/semver/classes/range.js","../node_modules/semver/classes/semver.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-source-map-url.js","../node_modules/next/dist/lib/page-types.js","../node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js","../node_modules/next/dist/server/normalizers/normalizers.js","../node_modules/next/dist/server/normalizers/prefixing-normalizer.js","../node_modules/next/dist/server/normalizers/underscore-normalizer.js","../node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js","../node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js","../node_modules/next/dist/compiled/p-queue/package.json","../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../node_modules/next/dist/server/ReactDOMServerPages.js","../node_modules/color-convert/conversions.js","../node_modules/color-convert/route.js","../node_modules/next/dist/server/optimize-amp.js","../node_modules/next/dist/lib/non-nullable.js","../node_modules/next/dist/compiled/babel/bundle.js","../node_modules/next/dist/compiled/strip-ansi/package.json","../node_modules/next/dist/compiled/react-is/package.json","../node_modules/color-name/package.json","../node_modules/next/dist/compiled/p-queue/index.js","../node_modules/next/dist/shared/lib/image-config.js","../node_modules/semver/internal/debug.js","../node_modules/semver/internal/constants.js","../node_modules/semver/internal/lrucache.js","../node_modules/semver/internal/parse-options.js","../node_modules/semver/classes/comparator.js","../node_modules/semver/internal/identifiers.js","../node_modules/next/dist/server/htmlescape.js","../node_modules/next/dist/lib/client-reference.js","../node_modules/next/dist/client/add-base-path.js","../node_modules/next/dist/client/app-call-server.js","../node_modules/next/dist/client/remove-base-path.js","../node_modules/next/dist/client/has-base-path.js","../node_modules/next/dist/compiled/nanoid/package.json","../node_modules/next/dist/server/app-render/types.js","../node_modules/next/dist/client/components/is-next-router-error.js","../node_modules/next/dist/server/app-render/csrf-protection.js","../node_modules/next/dist/server/app-render/react-server.node.js","../node_modules/next/dist/shared/lib/encode-uri-path.js","../node_modules/next/dist/server/app-render/get-preloadable-fonts.js","../node_modules/next/dist/client/components/match-segments.js","../node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js","../node_modules/next/dist/server/app-render/has-loading-component-in-tree.js","../node_modules/next/dist/server/app-render/get-layer-assets.js","../node_modules/next/dist/server/app-render/interop-default.js","../node_modules/next/dist/server/lib/app-dir-module.js","../node_modules/next/dist/client/components/parallel-route-default.js","../node_modules/next/dist/server/lib/patch-fetch.js","../node_modules/next/dist/client/components/app-router-announcer.js","../node_modules/next/dist/client/components/redirect-boundary.js","../node_modules/next/dist/client/components/error-boundary.js","../node_modules/next/dist/client/components/use-reducer.js","../node_modules/next/dist/client/components/nav-failure-handler.js","../node_modules/next/dist/client/components/unresolved-thenable.js","../node_modules/next/dist/server/app-render/render-css-resource.js","../node_modules/next/dist/server/resume-data-cache/cache-store.js","../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../node_modules/simple-swizzle/index.js","../node_modules/next/dist/client/flight-data-helpers.js","../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../node_modules/next/dist/server/lib/server-ipc/utils.js","../node_modules/next/dist/client/components/router-reducer/create-href-from-url.js","../node_modules/next/dist/client/components/router-reducer/router-reducer-types.js","../node_modules/next/dist/client/components/segment-cache/prefetch.js","../node_modules/next/dist/client/components/router-reducer/compute-changed-path.js","../node_modules/next/dist/client/components/http-access-fallback/error-boundary.js","../node_modules/color-name/index.js","../node_modules/next/dist/compiled/shell-quote/package.json","../node_modules/next/dist/compiled/stacktrace-parser/package.json","../node_modules/next/dist/compiled/data-uri-to-buffer/package.json","../node_modules/simple-swizzle/package.json","../node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js","../node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js","../node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js","../node_modules/next/dist/compiled/strip-ansi/index.js","../node_modules/next/dist/compiled/react-is/index.js","../node_modules/next/dist/client/components/router-reducer/router-reducer.js","../node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js","../node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js","../node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js","../node_modules/react/jsx-dev-runtime.js","../node_modules/next/dist/compiled/nanoid/index.cjs","../node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js","../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../node_modules/next/dist/compiled/shell-quote/index.js","../node_modules/next/dist/compiled/data-uri-to-buffer/index.js","../node_modules/busboy/package.json","../node_modules/semver/functions/cmp.js","../node_modules/next/dist/client/normalize-trailing-slash.js","../node_modules/busboy/lib/index.js","../node_modules/next/dist/compiled/superstruct/package.json","../node_modules/next/dist/compiled/string-hash/package.json","../node_modules/react/cjs/react-jsx-dev-runtime.production.min.js","../node_modules/next/dist/client/components/not-found.js","../node_modules/next/dist/server/lib/dedupe-fetch.js","../node_modules/next/dist/client/components/navigation.js","../node_modules/next/dist/server/lib/clone-response.js","../node_modules/next/dist/client/components/navigation-untracked.js","../node_modules/is-arrayish/index.js","../node_modules/next/dist/client/components/segment-cache/scheduler.js","../node_modules/next/dist/client/components/segment-cache/cache-key.js","../node_modules/next/dist/server/dev/extract-modules-from-turbopack-message.js","../node_modules/next/dist/server/dev/hot-reloader-types.js","../node_modules/next/dist/compiled/react-is/cjs/react-is.development.js","../node_modules/next/dist/compiled/react-is/cjs/react-is.production.js","../node_modules/is-arrayish/package.json","../node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js","../node_modules/next/dist/client/components/react-dev-overlay/shared.js","../node_modules/next/dist/client/components/router-reducer/fetch-server-response.js","../node_modules/next/dist/client/components/router-reducer/apply-flight-data.js","../node_modules/next/dist/compiled/superstruct/index.cjs","../node_modules/next/dist/compiled/string-hash/index.js","../node_modules/semver/functions/neq.js","../node_modules/semver/functions/gt.js","../node_modules/semver/functions/lt.js","../node_modules/semver/functions/eq.js","../node_modules/semver/functions/lte.js","../node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js","../node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/format-webpack-messages.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/runtime-error-handler.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-error-handler.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-component-stack.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-websocket.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stitched-error.js","../node_modules/next/dist/lib/metadata/get-metadata-route.js","../node_modules/next/dist/compiled/lru-cache/package.json","../node_modules/next/dist/compiled/json5/package.json","../node_modules/next/dist/compiled/babel-packages/package.json","../node_modules/next/dist/compiled/browserslist/package.json","../node_modules/next/dist/compiled/semver/package.json","../node_modules/busboy/lib/utils.js","../node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js","../node_modules/busboy/lib/types/multipart.js","../node_modules/busboy/lib/types/urlencoded.js","../node_modules/next/dist/client/components/navigation.react-server.js","../node_modules/next/dist/client/components/bailout-to-client-rendering.js","../node_modules/next/dist/compiled/lru-cache/index.js","../node_modules/next/dist/compiled/json5/index.js","../node_modules/next/dist/compiled/browserslist/index.js","../node_modules/next/dist/compiled/babel-packages/packages-bundle.js","../node_modules/next/dist/compiled/semver/index.js","../node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js","../node_modules/next/dist/client/app-find-source-map-url.js","../node_modules/next/dist/client/app-build-id.js","../node_modules/next/dist/client/components/segment-cache/cache.js","../node_modules/next/dist/shared/lib/hash.js","../node_modules/next/dist/client/assign-location.js","../node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js","../node_modules/next/dist/client/components/promise-queue.js","../node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js","../node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js","../node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js","../node_modules/next/dist/client/components/router-reducer/handle-mutable.js","../node_modules/next/dist/client/components/router-reducer/ppr-navigations.js","../node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js","../node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js","../node_modules/next/dist/client/components/router-reducer/aliased-prefetch-navigations.js","../node_modules/next/dist/client/components/router-reducer/clear-cache-node-data-for-segment-path.js","../node_modules/next/dist/client/components/segment-cache/navigation.js","../node_modules/next/dist/client/lib/console.js","../node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js","../node_modules/next/dist/client/components/router-reducer/reducers/server-reference-info.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/styles/Base.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/styles/ComponentStyles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/styles/CssReset.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/root-layout-missing-tags-error.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/StaticIndicator.js","../node_modules/streamsearch/package.json","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/enqueue-client-error.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/hydration-error-info.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/console-error.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/attach-hydration-error-state.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-socket-url.js","../node_modules/next/dist/client/components/forbidden.js","../node_modules/next/dist/client/components/unauthorized.js","../node_modules/next/dist/client/components/unstable-rethrow.js","../node_modules/streamsearch/lib/sbmh.js","../node_modules/next/dist/client/components/segment-cache/tuple-map.js","../node_modules/next/dist/client/components/segment-cache/lru.js","../node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js","../node_modules/caniuse-lite/dist/unpacker/feature.js","../node_modules/caniuse-lite/dist/unpacker/agents.js","../node_modules/caniuse-lite/dist/unpacker/region.js","../node_modules/next/dist/compiled/babel/parser.js","../node_modules/next/dist/compiled/babel/types.js","../node_modules/caniuse-lite/package.json","../node_modules/next/dist/compiled/babel/traverse.js","../node_modules/next/dist/compiled/babel/core.js","../node_modules/next/dist/export/helpers/is-dynamic-usage-error.js","../node_modules/next/dist/shared/lib/normalized-asset-prefix.js","../node_modules/next/dist/server/lib/router-utils/is-postpone.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-error-by-type.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CloseIcon.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/nodejs-inspector.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/icons/LightningBolt.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.js","../node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json","../node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json","../node_modules/caniuse-lite/data/agents.js","../node_modules/caniuse-lite/dist/lib/statuses.js","../node_modules/caniuse-lite/dist/unpacker/browserVersions.js","../node_modules/caniuse-lite/dist/unpacker/browsers.js","../node_modules/caniuse-lite/dist/lib/supported.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/copy-button/index.js","../node_modules/@swc/helpers/_/_tagged_template_literal_loose/package.json","../node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs","../node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs","../node_modules/caniuse-lite/data/browsers.js","../node_modules/caniuse-lite/data/browserVersions.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CollapseIcon.js","../node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs","../node_modules/next/dist/shared/lib/magic-identifier.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/hooks/use-on-click-outside.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js","../node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js","../node_modules/next/dist/compiled/anser/package.json","../node_modules/next/dist/compiled/anser/index.js","../node_modules/next/dist/compiled/css.escape/package.json","../node_modules/next/dist/compiled/platform/package.json","../node_modules/next/dist/compiled/css.escape/css.escape.js","../node_modules/next/dist/compiled/platform/platform.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/prerender-manifest.json b/dsql-app/.local_dist/prerender-manifest.json index 302f387..1225ad1 100644 --- a/dsql-app/.local_dist/prerender-manifest.json +++ b/dsql-app/.local_dist/prerender-manifest.json @@ -1 +1 @@ -{"version":4,"routes":{"/docs/gui-reference/getting-started":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]/[sub-page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/gui-reference/getting-started.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/gui-reference/upload-media":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]/[sub-page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/gui-reference/upload-media.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/api-reference/get":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]/[sub-page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/api-reference/get.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/api-reference/post":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]/[sub-page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/api-reference/post.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/database-reference/data-types":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]/[sub-page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/database-reference/data-types.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/database-reference/querying-data":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]/[sub-page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/database-reference/querying-data.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/quick-start":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/quick-start.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/gui-reference":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/gui-reference.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/api-reference":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/api-reference.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/getting-started":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/getting-started.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/database-reference":{"initialRevalidateSeconds":false,"srcRoute":"/docs/[page]","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/database-reference.json","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]}},"dynamicRoutes":{"/docs/[page]/[sub-page]":{"routeRegex":"^/docs/([^/]+?)/([^/]+?)(?:/)?$","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/[page]/[sub-page].json","fallback":false,"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/docs/([^/]+?)/([^/]+?)\\.json$","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/[page]":{"routeRegex":"^/docs/([^/]+?)(?:/)?$","dataRoute":"/_next/data/_A6S2Hel7pfBafC20yE1z/docs/[page].json","fallback":false,"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/docs/([^/]+?)\\.json$","allowHeader":["x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]}},"notFoundRoutes":[],"preview":{"previewModeId":"53c741779e563963c4b10baf6a025fae","previewModeSigningKey":"8fe8d490cf836a34f68977c386ec26a620fa59c036607c40fa9af66fb6ebb997","previewModeEncryptionKey":"6bd3483006fdc943a70c9aea460c90202c8279b940a0b82b81040a7baf960415"}} \ No newline at end of file +{"version":4,"routes":{},"dynamicRoutes":{"/docs/[page]/[sub-page]":{"routeRegex":"^/docs/([^/]+?)/([^/]+?)(?:/)?$","dataRoute":"/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/[page]/[sub-page].json","fallback":false,"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/([^/]+?)/([^/]+?)\\.json$","allowHeader":["host","x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]},"/docs/[page]":{"routeRegex":"^/docs/([^/]+?)(?:/)?$","dataRoute":"/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/[page].json","fallback":false,"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/([^/]+?)\\.json$","allowHeader":["host","x-matched-path","x-prerender-revalidate","x-prerender-revalidate-if-generated","x-next-revalidated-tags","x-next-revalidate-tag-token"]}},"notFoundRoutes":[],"preview":{"previewModeId":"474c821cf0c407af9db3b66c01c3f9a5","previewModeSigningKey":"435d5eb279b841f99e72e642a9c5b5bbdebb3aaf2bc5dc70a6bb972d6b494e50","previewModeEncryptionKey":"3936a12a2f0acb097dd4d615fca0d69ce1660985b373e72f57af70e8adda06e7"}} \ No newline at end of file diff --git a/dsql-app/.local_dist/required-server-files.json b/dsql-app/.local_dist/required-server-files.json index c49a3f3..75baffa 100644 --- a/dsql-app/.local_dist/required-server-files.json +++ b/dsql-app/.local_dist/required-server-files.json @@ -1 +1 @@ -{"version":1,"config":{"env":{},"eslint":{"ignoreDuringBuilds":true},"typescript":{"ignoreBuildErrors":true,"tsconfigPath":"tsconfig.json"},"distDir":".local_dist","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.js","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["js","jsx","ts","tsx","md","mdx"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","remotePatterns":[],"unoptimized":false},"devIndicators":{"appIsrStatus":true,"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactProductionProfiling":false,"reactStrictMode":true,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/app","experimental":{"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":0,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":4294967294}},"cacheHandlers":{},"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"serverSourceMaps":false,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","middlewarePrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":15,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"turbo":{"rules":{"*.mdx":{"loaders":[{"loader":"/app/node_modules/@mdx-js/loader/index.cjs","options":{"providerImportSource":"next-mdx-import-source-file"}}],"as":"*.tsx"}},"resolveAlias":{"next-mdx-import-source-file":"@vercel/turbopack-next/mdx-import-source"},"root":"/app"},"typedRoutes":false,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"reactOwnerStack":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"useEarlyImport":false,"staleTimes":{"dynamic":0,"static":300},"after":false,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"dynamicIO":false,"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-squlite-node","@effect/sql-squlite-bun","@effect/sql-squlite-wasm","@effect/sql-squlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"bundlePagesRouterDependencies":false,"configFileName":"next.config.js"},"appDir":"/app","relativeAppDir":"","files":[".local_dist/routes-manifest.json",".local_dist/server/pages-manifest.json",".local_dist/build-manifest.json",".local_dist/prerender-manifest.json",".local_dist/server/middleware-manifest.json",".local_dist/server/middleware-build-manifest.js",".local_dist/server/middleware-react-loadable-manifest.js",".local_dist/react-loadable-manifest.json",".local_dist/BUILD_ID",".local_dist/server/next-font-manifest.js",".local_dist/server/next-font-manifest.json"],"ignore":["node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*"]} \ No newline at end of file +{"version":1,"config":{"env":{},"eslint":{"ignoreDuringBuilds":true},"typescript":{"ignoreBuildErrors":true,"tsconfigPath":"tsconfig.json"},"distDir":".local_dist","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.js","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["js","jsx","ts","tsx","md","mdx"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","remotePatterns":[],"unoptimized":false},"devIndicators":{"appIsrStatus":true,"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactProductionProfiling":false,"reactStrictMode":true,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/app","experimental":{"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":0,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":4294967294}},"cacheHandlers":{},"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"serverSourceMaps":false,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"clientSegmentCache":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","middlewarePrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":15,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"turbo":{"root":"/app"},"typedRoutes":false,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"reactOwnerStack":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"useEarlyImport":false,"staleTimes":{"dynamic":0,"static":300},"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"dynamicIO":false,"inlineCss":false,"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-squlite-node","@effect/sql-squlite-bun","@effect/sql-squlite-wasm","@effect/sql-squlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"bundlePagesRouterDependencies":false,"configFileName":"next.config.js"},"appDir":"/app","relativeAppDir":"","files":[".local_dist/routes-manifest.json",".local_dist/server/pages-manifest.json",".local_dist/build-manifest.json",".local_dist/prerender-manifest.json",".local_dist/server/middleware-manifest.json",".local_dist/server/middleware-build-manifest.js",".local_dist/server/middleware-react-loadable-manifest.js",".local_dist/dynamic-css-manifest.json",".local_dist/server/dynamic-css-manifest.js",".local_dist/react-loadable-manifest.json",".local_dist/BUILD_ID",".local_dist/server/next-font-manifest.js",".local_dist/server/next-font-manifest.json"],"ignore":["node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/routes-manifest.json b/dsql-app/.local_dist/routes-manifest.json index 8632ef9..6a894a9 100644 --- a/dsql-app/.local_dist/routes-manifest.json +++ b/dsql-app/.local_dist/routes-manifest.json @@ -1 +1 @@ -{"version":3,"pages404":true,"caseSensitive":false,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/admin/[user_id]","regex":"^/admin/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/api-keys","regex":"^/admin/([^/]+?)/api\\-keys(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/api\\-keys(?:/)?$"},{"page":"/admin/[user_id]/connect","regex":"^/admin/([^/]+?)/connect(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/connect(?:/)?$"},{"page":"/admin/[user_id]/databases","regex":"^/admin/([^/]+?)/databases(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/databases(?:/)?$"},{"page":"/admin/[user_id]/databases/add-database","regex":"^/admin/([^/]+?)/databases/add\\-database(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/databases/add\\-database(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]","regex":"^/admin/([^/]+?)/databases/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/connect","regex":"^/admin/([^/]+?)/databases/([^/]+?)/connect(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/connect(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/edit-database","regex":"^/admin/([^/]+?)/databases/([^/]+?)/edit\\-database(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/edit\\-database(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/schema","regex":"^/admin/([^/]+?)/databases/([^/]+?)/schema(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/schema(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/shell","regex":"^/admin/([^/]+?)/databases/([^/]+?)/shell(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/shell(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/add-table","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/add\\-table(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/add\\-table(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/edit\\-table(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/edit\\-table(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/add\\-entry(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/add\\-entry(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table","nxtPsingle_entry":"nxtPsingle_entry"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/fields","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/fields(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/fields(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/add-social-logins","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/add\\-social\\-logins(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-social\\-logins(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/add-user","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/add\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-user(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]/change-password","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)/change\\-password(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)/change\\-password(?:/)?$"},{"page":"/admin/[user_id]/media","regex":"^/admin/([^/]+?)/media(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/media(?:/)?$"},{"page":"/admin/[user_id]/media/[...folder]","regex":"^/admin/([^/]+?)/media/(.+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPfolder":"nxtPfolder"},"namedRegex":"^/admin/(?[^/]+?)/media/(?.+?)(?:/)?$"},{"page":"/admin/[user_id]/schema","regex":"^/admin/([^/]+?)/schema(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/schema(?:/)?$"},{"page":"/admin/[user_id]/settings","regex":"^/admin/([^/]+?)/settings(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/settings(?:/)?$"},{"page":"/admin/[user_id]/users","regex":"^/admin/([^/]+?)/users(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/users(?:/)?$"},{"page":"/admin/[user_id]/users/add-user","regex":"^/admin/([^/]+?)/users/add\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/users/add\\-user(?:/)?$"},{"page":"/admin/[user_id]/users/databases","regex":"^/admin/([^/]+?)/users/databases(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/users/databases(?:/)?$"},{"page":"/admin/[user_id]/users/databases/[database]","regex":"^/admin/([^/]+?)/users/databases/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase"},"namedRegex":"^/admin/(?[^/]+?)/users/databases/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/users/databases/[database]/[user]","regex":"^/admin/([^/]+?)/users/databases/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase","nxtPuser":"nxtPuser"},"namedRegex":"^/admin/(?[^/]+?)/users/databases/(?[^/]+?)/(?[^/]+?)(?:/)?$"},{"page":"/api/admin/docs/[action]","regex":"^/api/admin/docs/([^/]+?)(?:/)?$","routeKeys":{"nxtPaction":"nxtPaction"},"namedRegex":"^/api/admin/docs/(?[^/]+?)(?:/)?$"},{"page":"/api/query/[user_id]/add-file","regex":"^/api/query/([^/]+?)/add\\-file(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/add\\-file(?:/)?$"},{"page":"/api/query/[user_id]/add-image","regex":"^/api/query/([^/]+?)/add\\-image(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/add\\-image(?:/)?$"},{"page":"/api/query/[user_id]/delete-file","regex":"^/api/query/([^/]+?)/delete\\-file(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/delete\\-file(?:/)?$"},{"page":"/api/query/[user_id]/get","regex":"^/api/query/([^/]+?)/get(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/get(?:/)?$"},{"page":"/api/query/[user_id]/get-private-file","regex":"^/api/query/([^/]+?)/get\\-private\\-file(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/get\\-private\\-file(?:/)?$"},{"page":"/api/query/[user_id]/get-schema","regex":"^/api/query/([^/]+?)/get\\-schema(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/get\\-schema(?:/)?$"},{"page":"/api/query/[user_id]/post","regex":"^/api/query/([^/]+?)/post(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/post(?:/)?$"},{"page":"/api/query/[user_id]/update-schema-from-single-database","regex":"^/api/query/([^/]+?)/update\\-schema\\-from\\-single\\-database(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/update\\-schema\\-from\\-single\\-database(?:/)?$"},{"page":"/api/stream/[path]","regex":"^/api/stream/([^/]+?)(?:/)?$","routeKeys":{"nxtPpath":"nxtPpath"},"namedRegex":"^/api/stream/(?[^/]+?)(?:/)?$"},{"page":"/api/user/[user_id]/add-user","regex":"^/api/user/([^/]+?)/add\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/add\\-user(?:/)?$"},{"page":"/api/user/[user_id]/delete-user","regex":"^/api/user/([^/]+?)/delete\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/delete\\-user(?:/)?$"},{"page":"/api/user/[user_id]/get-user","regex":"^/api/user/([^/]+?)/get\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/get\\-user(?:/)?$"},{"page":"/api/user/[user_id]/github-login","regex":"^/api/user/([^/]+?)/github\\-login(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/github\\-login(?:/)?$"},{"page":"/api/user/[user_id]/google-login","regex":"^/api/user/([^/]+?)/google\\-login(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/google\\-login(?:/)?$"},{"page":"/api/user/[user_id]/grab-google-user-from-token","regex":"^/api/user/([^/]+?)/grab\\-google\\-user\\-from\\-token(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/grab\\-google\\-user\\-from\\-token(?:/)?$"},{"page":"/api/user/[user_id]/login-user","regex":"^/api/user/([^/]+?)/login\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/login\\-user(?:/)?$"},{"page":"/api/user/[user_id]/reauth-user","regex":"^/api/user/([^/]+?)/reauth\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/reauth\\-user(?:/)?$"},{"page":"/api/user/[user_id]/send-email-code","regex":"^/api/user/([^/]+?)/send\\-email\\-code(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/send\\-email\\-code(?:/)?$"},{"page":"/api/user/[user_id]/update-user","regex":"^/api/user/([^/]+?)/update\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/update\\-user(?:/)?$"},{"page":"/docs/[page]","regex":"^/docs/([^/]+?)(?:/)?$","routeKeys":{"nxtPpage":"nxtPpage"},"namedRegex":"^/docs/(?[^/]+?)(?:/)?$"},{"page":"/docs/[page]/[sub-page]","regex":"^/docs/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nxtPpage":"nxtPpage","nxtPsubpage":"nxtPsub-page"},"namedRegex":"^/docs/(?[^/]+?)/(?[^/]+?)(?:/)?$"},{"page":"/su/docs/pages/[id]","regex":"^/su/docs/pages/([^/]+?)(?:/)?$","routeKeys":{"nxtPid":"nxtPid"},"namedRegex":"^/su/docs/pages/(?[^/]+?)(?:/)?$"},{"page":"/su/users/[single]","regex":"^/su/users/([^/]+?)(?:/)?$","routeKeys":{"nxtPsingle":"nxtPsingle"},"namedRegex":"^/su/users/(?[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"},{"page":"/500","regex":"^/500(?:/)?$","routeKeys":{},"namedRegex":"^/500(?:/)?$"},{"page":"/about","regex":"^/about(?:/)?$","routeKeys":{},"namedRegex":"^/about(?:/)?$"},{"page":"/admin","regex":"^/admin(?:/)?$","routeKeys":{},"namedRegex":"^/admin(?:/)?$"},{"page":"/blog","regex":"^/blog(?:/)?$","routeKeys":{},"namedRegex":"^/blog(?:/)?$"},{"page":"/contact","regex":"^/contact(?:/)?$","routeKeys":{},"namedRegex":"^/contact(?:/)?$"},{"page":"/create-account","regex":"^/create\\-account(?:/)?$","routeKeys":{},"namedRegex":"^/create\\-account(?:/)?$"},{"page":"/docs","regex":"^/docs(?:/)?$","routeKeys":{},"namedRegex":"^/docs(?:/)?$"},{"page":"/email-verification","regex":"^/email\\-verification(?:/)?$","routeKeys":{},"namedRegex":"^/email\\-verification(?:/)?$"},{"page":"/login","regex":"^/login(?:/)?$","routeKeys":{},"namedRegex":"^/login(?:/)?$"},{"page":"/logout","regex":"^/logout(?:/)?$","routeKeys":{},"namedRegex":"^/logout(?:/)?$"},{"page":"/privacy","regex":"^/privacy(?:/)?$","routeKeys":{},"namedRegex":"^/privacy(?:/)?$"},{"page":"/redirect","regex":"^/redirect(?:/)?$","routeKeys":{},"namedRegex":"^/redirect(?:/)?$"},{"page":"/reset-password","regex":"^/reset\\-password(?:/)?$","routeKeys":{},"namedRegex":"^/reset\\-password(?:/)?$"},{"page":"/send-password-reset-link","regex":"^/send\\-password\\-reset\\-link(?:/)?$","routeKeys":{},"namedRegex":"^/send\\-password\\-reset\\-link(?:/)?$"},{"page":"/su","regex":"^/su(?:/)?$","routeKeys":{},"namedRegex":"^/su(?:/)?$"},{"page":"/su/backups","regex":"^/su/backups(?:/)?$","routeKeys":{},"namedRegex":"^/su/backups(?:/)?$"},{"page":"/su/console","regex":"^/su/console(?:/)?$","routeKeys":{},"namedRegex":"^/su/console(?:/)?$"},{"page":"/su/docs","regex":"^/su/docs(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs(?:/)?$"},{"page":"/su/docs/create-page","regex":"^/su/docs/create\\-page(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs/create\\-page(?:/)?$"},{"page":"/su/docs/edit-page","regex":"^/su/docs/edit\\-page(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs/edit\\-page(?:/)?$"},{"page":"/su/docs/pages","regex":"^/su/docs/pages(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs/pages(?:/)?$"},{"page":"/su/envar","regex":"^/su/envar(?:/)?$","routeKeys":{},"namedRegex":"^/su/envar(?:/)?$"},{"page":"/su/error-logs","regex":"^/su/error\\-logs(?:/)?$","routeKeys":{},"namedRegex":"^/su/error\\-logs(?:/)?$"},{"page":"/su/load-balancing","regex":"^/su/load\\-balancing(?:/)?$","routeKeys":{},"namedRegex":"^/su/load\\-balancing(?:/)?$"},{"page":"/su/login","regex":"^/su/login(?:/)?$","routeKeys":{},"namedRegex":"^/su/login(?:/)?$"},{"page":"/su/servers","regex":"^/su/servers(?:/)?$","routeKeys":{},"namedRegex":"^/su/servers(?:/)?$"},{"page":"/su/users","regex":"^/su/users(?:/)?$","routeKeys":{},"namedRegex":"^/su/users(?:/)?$"},{"page":"/su/users/new","regex":"^/su/users/new(?:/)?$","routeKeys":{},"namedRegex":"^/su/users/new(?:/)?$"},{"page":"/terms","regex":"^/terms(?:/)?$","routeKeys":{},"namedRegex":"^/terms(?:/)?$"},{"page":"/unsubscribe","regex":"^/unsubscribe(?:/)?$","routeKeys":{},"namedRegex":"^/unsubscribe(?:/)?$"}],"dataRoutes":[{"page":"/admin","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin.json$"},{"page":"/admin/[user_id]","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/api-keys","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/api\\-keys\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/api\\-keys\\.json$"},{"page":"/admin/[user_id]/connect","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/connect\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/connect\\.json$"},{"page":"/admin/[user_id]/databases","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases\\.json$"},{"page":"/admin/[user_id]/databases/add-database","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/add\\-database\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/add\\-database\\.json$"},{"page":"/admin/[user_id]/databases/[single]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/connect","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/connect\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/connect\\.json$"},{"page":"/admin/[user_id]/databases/[single]/edit-database","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/edit\\-database\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/edit\\-database\\.json$"},{"page":"/admin/[user_id]/databases/[single]/schema","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/schema\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/schema\\.json$"},{"page":"/admin/[user_id]/databases/[single]/shell","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/shell\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/shell\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/add-table","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables/add\\-table\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/add\\-table\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/edit\\-table\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/edit\\-table\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/add\\-entry\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/add\\-entry\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table","nxtPsingle_entry":"nxtPsingle_entry"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/fields","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/fields\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/fields\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/users\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/users\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/add-social-logins","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/users/add\\-social\\-logins\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-social\\-logins\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/add-user","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/users/add\\-user\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-user\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]/change-password","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)/change\\-password\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)/change\\-password\\.json$"},{"page":"/admin/[user_id]/media","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/media\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/media\\.json$"},{"page":"/admin/[user_id]/media/[...folder]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPfolder":"nxtPfolder"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/media/(.+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/media/(?.+?)\\.json$"},{"page":"/admin/[user_id]/schema","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/schema\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/schema\\.json$"},{"page":"/admin/[user_id]/settings","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/settings\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/settings\\.json$"},{"page":"/admin/[user_id]/users","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/users\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/users\\.json$"},{"page":"/admin/[user_id]/users/add-user","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/users/add\\-user\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/users/add\\-user\\.json$"},{"page":"/admin/[user_id]/users/databases","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/users/databases\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/users/databases\\.json$"},{"page":"/admin/[user_id]/users/databases/[database]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/users/databases/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/users/databases/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/users/databases/[database]/[user]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase","nxtPuser":"nxtPuser"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/([^/]+?)/users/databases/([^/]+?)/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/admin/(?[^/]+?)/users/databases/(?[^/]+?)/(?[^/]+?)\\.json$"},{"page":"/create-account","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/create-account.json$"},{"page":"/docs","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/docs.json$"},{"page":"/docs/[page]","routeKeys":{"nxtPpage":"nxtPpage"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/docs/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/docs/(?[^/]+?)\\.json$"},{"page":"/docs/[page]/[sub-page]","routeKeys":{"nxtPpage":"nxtPpage","nxtPsubpage":"nxtPsub-page"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/docs/([^/]+?)/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/docs/(?[^/]+?)/(?[^/]+?)\\.json$"},{"page":"/email-verification","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/email-verification.json$"},{"page":"/login","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/login.json$"},{"page":"/logout","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/logout.json$"},{"page":"/reset-password","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/reset-password.json$"},{"page":"/send-password-reset-link","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/send-password-reset-link.json$"},{"page":"/su","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su.json$"},{"page":"/su/backups","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/backups.json$"},{"page":"/su/console","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/console.json$"},{"page":"/su/docs","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/docs.json$"},{"page":"/su/docs/create-page","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/docs/create-page.json$"},{"page":"/su/docs/edit-page","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/docs/edit-page.json$"},{"page":"/su/docs/pages","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/docs/pages.json$"},{"page":"/su/docs/pages/[id]","routeKeys":{"nxtPid":"nxtPid"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/docs/pages/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/docs/pages/(?[^/]+?)\\.json$"},{"page":"/su/envar","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/envar.json$"},{"page":"/su/error-logs","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/error-logs.json$"},{"page":"/su/load-balancing","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/load-balancing.json$"},{"page":"/su/login","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/login.json$"},{"page":"/su/servers","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/servers.json$"},{"page":"/su/users","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/users.json$"},{"page":"/su/users/new","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/users/new.json$"},{"page":"/su/users/[single]","routeKeys":{"nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/users/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/su/users/(?[^/]+?)\\.json$"},{"page":"/unsubscribe","dataRouteRegex":"^/_next/data/_A6S2Hel7pfBafC20yE1z/unsubscribe.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch","prefetchHeader":"Next-Router-Prefetch","didPostponeHeader":"x-nextjs-postponed","contentTypeHeader":"text/x-component","suffix":".rsc","prefetchSuffix":".prefetch.rsc"},"rewrites":[]} \ No newline at end of file +{"version":3,"pages404":true,"caseSensitive":false,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/admin/[user_id]","regex":"^/admin/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/api-keys","regex":"^/admin/([^/]+?)/api\\-keys(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/api\\-keys(?:/)?$"},{"page":"/admin/[user_id]/connect","regex":"^/admin/([^/]+?)/connect(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/connect(?:/)?$"},{"page":"/admin/[user_id]/databases","regex":"^/admin/([^/]+?)/databases(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/databases(?:/)?$"},{"page":"/admin/[user_id]/databases/add-database","regex":"^/admin/([^/]+?)/databases/add\\-database(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/databases/add\\-database(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]","regex":"^/admin/([^/]+?)/databases/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/connect","regex":"^/admin/([^/]+?)/databases/([^/]+?)/connect(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/connect(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/edit-database","regex":"^/admin/([^/]+?)/databases/([^/]+?)/edit\\-database(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/edit\\-database(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/schema","regex":"^/admin/([^/]+?)/databases/([^/]+?)/schema(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/schema(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/shell","regex":"^/admin/([^/]+?)/databases/([^/]+?)/shell(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/shell(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/add-table","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/add\\-table(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/add\\-table(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/edit\\-table(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/edit\\-table(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/add\\-entry(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/add\\-entry(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table","nxtPsingle_entry":"nxtPsingle_entry"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/fields","regex":"^/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/fields(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/fields(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/add-social-logins","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/add\\-social\\-logins(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-social\\-logins(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/add-user","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/add\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-user(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]/change-password","regex":"^/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)/change\\-password(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"namedRegex":"^/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)/change\\-password(?:/)?$"},{"page":"/admin/[user_id]/media","regex":"^/admin/([^/]+?)/media(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/media(?:/)?$"},{"page":"/admin/[user_id]/media/[...folder]","regex":"^/admin/([^/]+?)/media/(.+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPfolder":"nxtPfolder"},"namedRegex":"^/admin/(?[^/]+?)/media/(?.+?)(?:/)?$"},{"page":"/admin/[user_id]/schema","regex":"^/admin/([^/]+?)/schema(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/schema(?:/)?$"},{"page":"/admin/[user_id]/settings","regex":"^/admin/([^/]+?)/settings(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/settings(?:/)?$"},{"page":"/admin/[user_id]/users","regex":"^/admin/([^/]+?)/users(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/users(?:/)?$"},{"page":"/admin/[user_id]/users/add-user","regex":"^/admin/([^/]+?)/users/add\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/users/add\\-user(?:/)?$"},{"page":"/admin/[user_id]/users/databases","regex":"^/admin/([^/]+?)/users/databases(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/admin/(?[^/]+?)/users/databases(?:/)?$"},{"page":"/admin/[user_id]/users/databases/[database]","regex":"^/admin/([^/]+?)/users/databases/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase"},"namedRegex":"^/admin/(?[^/]+?)/users/databases/(?[^/]+?)(?:/)?$"},{"page":"/admin/[user_id]/users/databases/[database]/[user]","regex":"^/admin/([^/]+?)/users/databases/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase","nxtPuser":"nxtPuser"},"namedRegex":"^/admin/(?[^/]+?)/users/databases/(?[^/]+?)/(?[^/]+?)(?:/)?$"},{"page":"/api/admin/docs/[action]","regex":"^/api/admin/docs/([^/]+?)(?:/)?$","routeKeys":{"nxtPaction":"nxtPaction"},"namedRegex":"^/api/admin/docs/(?[^/]+?)(?:/)?$"},{"page":"/api/query/[user_id]/add-file","regex":"^/api/query/([^/]+?)/add\\-file(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/add\\-file(?:/)?$"},{"page":"/api/query/[user_id]/add-image","regex":"^/api/query/([^/]+?)/add\\-image(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/add\\-image(?:/)?$"},{"page":"/api/query/[user_id]/delete-file","regex":"^/api/query/([^/]+?)/delete\\-file(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/delete\\-file(?:/)?$"},{"page":"/api/query/[user_id]/get","regex":"^/api/query/([^/]+?)/get(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/get(?:/)?$"},{"page":"/api/query/[user_id]/get-private-file","regex":"^/api/query/([^/]+?)/get\\-private\\-file(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/get\\-private\\-file(?:/)?$"},{"page":"/api/query/[user_id]/get-schema","regex":"^/api/query/([^/]+?)/get\\-schema(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/get\\-schema(?:/)?$"},{"page":"/api/query/[user_id]/post","regex":"^/api/query/([^/]+?)/post(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/post(?:/)?$"},{"page":"/api/query/[user_id]/update-schema-from-single-database","regex":"^/api/query/([^/]+?)/update\\-schema\\-from\\-single\\-database(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/query/(?[^/]+?)/update\\-schema\\-from\\-single\\-database(?:/)?$"},{"page":"/api/stream/[path]","regex":"^/api/stream/([^/]+?)(?:/)?$","routeKeys":{"nxtPpath":"nxtPpath"},"namedRegex":"^/api/stream/(?[^/]+?)(?:/)?$"},{"page":"/api/user/[user_id]/add-user","regex":"^/api/user/([^/]+?)/add\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/add\\-user(?:/)?$"},{"page":"/api/user/[user_id]/delete-user","regex":"^/api/user/([^/]+?)/delete\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/delete\\-user(?:/)?$"},{"page":"/api/user/[user_id]/get-user","regex":"^/api/user/([^/]+?)/get\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/get\\-user(?:/)?$"},{"page":"/api/user/[user_id]/github-login","regex":"^/api/user/([^/]+?)/github\\-login(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/github\\-login(?:/)?$"},{"page":"/api/user/[user_id]/google-login","regex":"^/api/user/([^/]+?)/google\\-login(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/google\\-login(?:/)?$"},{"page":"/api/user/[user_id]/grab-google-user-from-token","regex":"^/api/user/([^/]+?)/grab\\-google\\-user\\-from\\-token(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/grab\\-google\\-user\\-from\\-token(?:/)?$"},{"page":"/api/user/[user_id]/login-user","regex":"^/api/user/([^/]+?)/login\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/login\\-user(?:/)?$"},{"page":"/api/user/[user_id]/reauth-user","regex":"^/api/user/([^/]+?)/reauth\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/reauth\\-user(?:/)?$"},{"page":"/api/user/[user_id]/send-email-code","regex":"^/api/user/([^/]+?)/send\\-email\\-code(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/send\\-email\\-code(?:/)?$"},{"page":"/api/user/[user_id]/update-user","regex":"^/api/user/([^/]+?)/update\\-user(?:/)?$","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"namedRegex":"^/api/user/(?[^/]+?)/update\\-user(?:/)?$"},{"page":"/docs/[page]","regex":"^/docs/([^/]+?)(?:/)?$","routeKeys":{"nxtPpage":"nxtPpage"},"namedRegex":"^/docs/(?[^/]+?)(?:/)?$"},{"page":"/docs/[page]/[sub-page]","regex":"^/docs/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nxtPpage":"nxtPpage","nxtPsubpage":"nxtPsub-page"},"namedRegex":"^/docs/(?[^/]+?)/(?[^/]+?)(?:/)?$"},{"page":"/su/docs/pages/[id]","regex":"^/su/docs/pages/([^/]+?)(?:/)?$","routeKeys":{"nxtPid":"nxtPid"},"namedRegex":"^/su/docs/pages/(?[^/]+?)(?:/)?$"},{"page":"/su/users/[single]","regex":"^/su/users/([^/]+?)(?:/)?$","routeKeys":{"nxtPsingle":"nxtPsingle"},"namedRegex":"^/su/users/(?[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"},{"page":"/500","regex":"^/500(?:/)?$","routeKeys":{},"namedRegex":"^/500(?:/)?$"},{"page":"/about","regex":"^/about(?:/)?$","routeKeys":{},"namedRegex":"^/about(?:/)?$"},{"page":"/admin","regex":"^/admin(?:/)?$","routeKeys":{},"namedRegex":"^/admin(?:/)?$"},{"page":"/blog","regex":"^/blog(?:/)?$","routeKeys":{},"namedRegex":"^/blog(?:/)?$"},{"page":"/contact","regex":"^/contact(?:/)?$","routeKeys":{},"namedRegex":"^/contact(?:/)?$"},{"page":"/create-account","regex":"^/create\\-account(?:/)?$","routeKeys":{},"namedRegex":"^/create\\-account(?:/)?$"},{"page":"/docs","regex":"^/docs(?:/)?$","routeKeys":{},"namedRegex":"^/docs(?:/)?$"},{"page":"/email-verification","regex":"^/email\\-verification(?:/)?$","routeKeys":{},"namedRegex":"^/email\\-verification(?:/)?$"},{"page":"/login","regex":"^/login(?:/)?$","routeKeys":{},"namedRegex":"^/login(?:/)?$"},{"page":"/logout","regex":"^/logout(?:/)?$","routeKeys":{},"namedRegex":"^/logout(?:/)?$"},{"page":"/privacy","regex":"^/privacy(?:/)?$","routeKeys":{},"namedRegex":"^/privacy(?:/)?$"},{"page":"/redirect","regex":"^/redirect(?:/)?$","routeKeys":{},"namedRegex":"^/redirect(?:/)?$"},{"page":"/reset-password","regex":"^/reset\\-password(?:/)?$","routeKeys":{},"namedRegex":"^/reset\\-password(?:/)?$"},{"page":"/send-password-reset-link","regex":"^/send\\-password\\-reset\\-link(?:/)?$","routeKeys":{},"namedRegex":"^/send\\-password\\-reset\\-link(?:/)?$"},{"page":"/su","regex":"^/su(?:/)?$","routeKeys":{},"namedRegex":"^/su(?:/)?$"},{"page":"/su/backups","regex":"^/su/backups(?:/)?$","routeKeys":{},"namedRegex":"^/su/backups(?:/)?$"},{"page":"/su/console","regex":"^/su/console(?:/)?$","routeKeys":{},"namedRegex":"^/su/console(?:/)?$"},{"page":"/su/docs","regex":"^/su/docs(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs(?:/)?$"},{"page":"/su/docs/create-page","regex":"^/su/docs/create\\-page(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs/create\\-page(?:/)?$"},{"page":"/su/docs/edit-page","regex":"^/su/docs/edit\\-page(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs/edit\\-page(?:/)?$"},{"page":"/su/docs/pages","regex":"^/su/docs/pages(?:/)?$","routeKeys":{},"namedRegex":"^/su/docs/pages(?:/)?$"},{"page":"/su/envar","regex":"^/su/envar(?:/)?$","routeKeys":{},"namedRegex":"^/su/envar(?:/)?$"},{"page":"/su/error-logs","regex":"^/su/error\\-logs(?:/)?$","routeKeys":{},"namedRegex":"^/su/error\\-logs(?:/)?$"},{"page":"/su/load-balancing","regex":"^/su/load\\-balancing(?:/)?$","routeKeys":{},"namedRegex":"^/su/load\\-balancing(?:/)?$"},{"page":"/su/login","regex":"^/su/login(?:/)?$","routeKeys":{},"namedRegex":"^/su/login(?:/)?$"},{"page":"/su/servers","regex":"^/su/servers(?:/)?$","routeKeys":{},"namedRegex":"^/su/servers(?:/)?$"},{"page":"/su/users","regex":"^/su/users(?:/)?$","routeKeys":{},"namedRegex":"^/su/users(?:/)?$"},{"page":"/su/users/new","regex":"^/su/users/new(?:/)?$","routeKeys":{},"namedRegex":"^/su/users/new(?:/)?$"},{"page":"/terms","regex":"^/terms(?:/)?$","routeKeys":{},"namedRegex":"^/terms(?:/)?$"},{"page":"/unsubscribe","regex":"^/unsubscribe(?:/)?$","routeKeys":{},"namedRegex":"^/unsubscribe(?:/)?$"}],"dataRoutes":[{"page":"/admin","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin.json$"},{"page":"/admin/[user_id]","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/api-keys","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/api\\-keys\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/api\\-keys\\.json$"},{"page":"/admin/[user_id]/connect","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/connect\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/connect\\.json$"},{"page":"/admin/[user_id]/databases","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases\\.json$"},{"page":"/admin/[user_id]/databases/add-database","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/add\\-database\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/add\\-database\\.json$"},{"page":"/admin/[user_id]/databases/[single]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/connect","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/connect\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/connect\\.json$"},{"page":"/admin/[user_id]/databases/[single]/edit-database","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/edit\\-database\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/edit\\-database\\.json$"},{"page":"/admin/[user_id]/databases/[single]/schema","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/schema\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/schema\\.json$"},{"page":"/admin/[user_id]/databases/[single]/shell","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/shell\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/shell\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/add-table","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables/add\\-table\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/add\\-table\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/edit\\-table\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/edit\\-table\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/add\\-entry\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/add\\-entry\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table","nxtPsingle_entry":"nxtPsingle_entry"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/entries/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/entries/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/tables/[single_table]/fields","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPsingle_table":"nxtPsingle_table"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/tables/([^/]+?)/fields\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/tables/(?[^/]+?)/fields\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/users\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/users\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/add-social-logins","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/users/add\\-social\\-logins\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-social\\-logins\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/add-user","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/users/add\\-user\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/users/add\\-user\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/databases/[single]/users/[user]/change-password","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPsingle":"nxtPsingle","nxtPuser":"nxtPuser"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/databases/([^/]+?)/users/([^/]+?)/change\\-password\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/databases/(?[^/]+?)/users/(?[^/]+?)/change\\-password\\.json$"},{"page":"/admin/[user_id]/media","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/media\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/media\\.json$"},{"page":"/admin/[user_id]/media/[...folder]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPfolder":"nxtPfolder"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/media/(.+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/media/(?.+?)\\.json$"},{"page":"/admin/[user_id]/schema","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/schema\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/schema\\.json$"},{"page":"/admin/[user_id]/settings","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/settings\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/settings\\.json$"},{"page":"/admin/[user_id]/users","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/users\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/users\\.json$"},{"page":"/admin/[user_id]/users/add-user","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/users/add\\-user\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/users/add\\-user\\.json$"},{"page":"/admin/[user_id]/users/databases","routeKeys":{"nxtPuser_id":"nxtPuser_id"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/users/databases\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/users/databases\\.json$"},{"page":"/admin/[user_id]/users/databases/[database]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/users/databases/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/users/databases/(?[^/]+?)\\.json$"},{"page":"/admin/[user_id]/users/databases/[database]/[user]","routeKeys":{"nxtPuser_id":"nxtPuser_id","nxtPdatabase":"nxtPdatabase","nxtPuser":"nxtPuser"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/([^/]+?)/users/databases/([^/]+?)/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/admin/(?[^/]+?)/users/databases/(?[^/]+?)/(?[^/]+?)\\.json$"},{"page":"/create-account","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/create-account.json$"},{"page":"/docs","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs.json$"},{"page":"/docs/[page]","routeKeys":{"nxtPpage":"nxtPpage"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/(?[^/]+?)\\.json$"},{"page":"/docs/[page]/[sub-page]","routeKeys":{"nxtPpage":"nxtPpage","nxtPsubpage":"nxtPsub-page"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/([^/]+?)/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/docs/(?[^/]+?)/(?[^/]+?)\\.json$"},{"page":"/email-verification","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/email-verification.json$"},{"page":"/login","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/login.json$"},{"page":"/logout","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/logout.json$"},{"page":"/reset-password","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/reset-password.json$"},{"page":"/send-password-reset-link","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/send-password-reset-link.json$"},{"page":"/su","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su.json$"},{"page":"/su/backups","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/backups.json$"},{"page":"/su/console","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/console.json$"},{"page":"/su/docs","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/docs.json$"},{"page":"/su/docs/create-page","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/docs/create-page.json$"},{"page":"/su/docs/edit-page","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/docs/edit-page.json$"},{"page":"/su/docs/pages","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/docs/pages.json$"},{"page":"/su/docs/pages/[id]","routeKeys":{"nxtPid":"nxtPid"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/docs/pages/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/docs/pages/(?[^/]+?)\\.json$"},{"page":"/su/envar","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/envar.json$"},{"page":"/su/error-logs","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/error-logs.json$"},{"page":"/su/load-balancing","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/load-balancing.json$"},{"page":"/su/login","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/login.json$"},{"page":"/su/servers","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/servers.json$"},{"page":"/su/users","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/users.json$"},{"page":"/su/users/new","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/users/new.json$"},{"page":"/su/users/[single]","routeKeys":{"nxtPsingle":"nxtPsingle"},"dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/users/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/su/users/(?[^/]+?)\\.json$"},{"page":"/unsubscribe","dataRouteRegex":"^/_next/data/Z7LjqP2xSl7zkNXSJawO7/unsubscribe.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch","prefetchHeader":"Next-Router-Prefetch","didPostponeHeader":"x-nextjs-postponed","contentTypeHeader":"text/x-component","suffix":".rsc","prefetchSuffix":".prefetch.rsc"},"rewrites":[]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/_error.js b/dsql-app/.local_dist/server/_error.js deleted file mode 100644 index 6ab9623..0000000 --- a/dsql-app/.local_dist/server/_error.js +++ /dev/null @@ -1,377 +0,0 @@ -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -(() => { -var exports = {}; -exports.id = "/_error"; -exports.ids = ["/_error"]; -exports.modules = { - -/***/ "__barrel_optimize__?names=ChevronDown!=!./node_modules/lucide-react/dist/esm/lucide-react.js": -/*!****************************************************************************************************!*\ - !*** __barrel_optimize__?names=ChevronDown!=!./node_modules/lucide-react/dist/esm/lucide-react.js ***! - \****************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ChevronDown: () => (/* reexport safe */ _icons_chevron_down_js__WEBPACK_IMPORTED_MODULE_0__["default"]) -/* harmony export */ }); -/* harmony import */ var _icons_chevron_down_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./icons/chevron-down.js */ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js"); - - - -/***/ }), - -/***/ "__barrel_optimize__?names=ChevronUp!=!./node_modules/lucide-react/dist/esm/lucide-react.js": -/*!**************************************************************************************************!*\ - !*** __barrel_optimize__?names=ChevronUp!=!./node_modules/lucide-react/dist/esm/lucide-react.js ***! - \**************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ChevronUp: () => (/* reexport safe */ _icons_chevron_up_js__WEBPACK_IMPORTED_MODULE_0__["default"]) -/* harmony export */ }); -/* harmony import */ var _icons_chevron_up_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./icons/chevron-up.js */ "./node_modules/lucide-react/dist/esm/icons/chevron-up.js"); - - - -/***/ }), - -/***/ "__barrel_optimize__?names=CircleGauge!=!./node_modules/lucide-react/dist/esm/lucide-react.js": -/*!****************************************************************************************************!*\ - !*** __barrel_optimize__?names=CircleGauge!=!./node_modules/lucide-react/dist/esm/lucide-react.js ***! - \****************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ CircleGauge: () => (/* reexport safe */ _icons_circle_gauge_js__WEBPACK_IMPORTED_MODULE_0__["default"]) -/* harmony export */ }); -/* harmony import */ var _icons_circle_gauge_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./icons/circle-gauge.js */ "./node_modules/lucide-react/dist/esm/icons/circle-gauge.js"); - - - -/***/ }), - -/***/ "__barrel_optimize__?names=Menu!=!./node_modules/lucide-react/dist/esm/lucide-react.js": -/*!*********************************************************************************************!*\ - !*** __barrel_optimize__?names=Menu!=!./node_modules/lucide-react/dist/esm/lucide-react.js ***! - \*********************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ Menu: () => (/* reexport safe */ _icons_menu_js__WEBPACK_IMPORTED_MODULE_0__["default"]) -/* harmony export */ }); -/* harmony import */ var _icons_menu_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./icons/menu.js */ "./node_modules/lucide-react/dist/esm/icons/menu.js"); - - - -/***/ }), - -/***/ "./node_modules/next/dist/build/webpack/loaders/next-route-loader/index.js?kind=PAGES&page=%2F_error&preferredRegion=&absolutePagePath=.%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&absoluteAppPath=private-next-pages%2F_app&absoluteDocumentPath=private-next-pages%2F_document&middlewareConfigBase64=e30%3D!": -/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/next/dist/build/webpack/loaders/next-route-loader/index.js?kind=PAGES&page=%2F_error&preferredRegion=&absolutePagePath=.%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&absoluteAppPath=private-next-pages%2F_app&absoluteDocumentPath=private-next-pages%2F_document&middlewareConfigBase64=e30%3D! ***! - \*****************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ config: () => (/* binding */ config),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ getServerSideProps: () => (/* binding */ getServerSideProps),\n/* harmony export */ getStaticPaths: () => (/* binding */ getStaticPaths),\n/* harmony export */ getStaticProps: () => (/* binding */ getStaticProps),\n/* harmony export */ reportWebVitals: () => (/* binding */ reportWebVitals),\n/* harmony export */ routeModule: () => (/* binding */ routeModule),\n/* harmony export */ unstable_getServerProps: () => (/* binding */ unstable_getServerProps),\n/* harmony export */ unstable_getServerSideProps: () => (/* binding */ unstable_getServerSideProps),\n/* harmony export */ unstable_getStaticParams: () => (/* binding */ unstable_getStaticParams),\n/* harmony export */ unstable_getStaticPaths: () => (/* binding */ unstable_getStaticPaths),\n/* harmony export */ unstable_getStaticProps: () => (/* binding */ unstable_getStaticProps)\n/* harmony export */ });\n/* harmony import */ var next_dist_server_route_modules_pages_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! next/dist/server/route-modules/pages/module.compiled */ \"./node_modules/next/dist/server/route-modules/pages/module.compiled.js\");\n/* harmony import */ var next_dist_server_route_modules_pages_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_pages_module_compiled__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! next/dist/server/route-kind */ \"./node_modules/next/dist/server/route-kind.js\");\n/* harmony import */ var next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/dist/build/templates/helpers */ \"./node_modules/next/dist/build/templates/helpers.js\");\n/* harmony import */ var private_next_pages_document__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! private-next-pages/_document */ \"./pages/_document.js\");\n/* harmony import */ var private_next_pages_app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! private-next-pages/_app */ \"./pages/_app.js\");\n/* harmony import */ var _node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/next/dist/pages/_error.js */ \"./node_modules/next/dist/pages/_error.js\");\n/* harmony import */ var _node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n// Import the app and document modules.\n\n\n// Import the userland code.\n\n// Re-export the component (should be the default export).\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'default'));\n// Re-export methods.\nconst getStaticProps = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'getStaticProps');\nconst getStaticPaths = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'getStaticPaths');\nconst getServerSideProps = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'getServerSideProps');\nconst config = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'config');\nconst reportWebVitals = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'reportWebVitals');\n// Re-export legacy methods.\nconst unstable_getStaticProps = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'unstable_getStaticProps');\nconst unstable_getStaticPaths = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'unstable_getStaticPaths');\nconst unstable_getStaticParams = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'unstable_getStaticParams');\nconst unstable_getServerProps = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'unstable_getServerProps');\nconst unstable_getServerSideProps = (0,next_dist_build_templates_helpers__WEBPACK_IMPORTED_MODULE_2__.hoist)(_node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__, 'unstable_getServerSideProps');\n// Create and export the route module that will be consumed.\nconst routeModule = new next_dist_server_route_modules_pages_module_compiled__WEBPACK_IMPORTED_MODULE_0__.PagesRouteModule({\n definition: {\n kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.PAGES,\n page: \"/_error\",\n pathname: \"/_error\",\n // The following aren't used in production.\n bundlePath: '',\n filename: ''\n },\n components: {\n // default export might not exist when optimized for data only\n App: private_next_pages_app__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n Document: private_next_pages_document__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n userland: _node_modules_next_dist_pages_error_js__WEBPACK_IMPORTED_MODULE_5__\n});\n\n//# sourceMappingURL=pages.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3dlYnBhY2svbG9hZGVycy9uZXh0LXJvdXRlLWxvYWRlci9pbmRleC5qcz9raW5kPVBBR0VTJnBhZ2U9JTJGX2Vycm9yJnByZWZlcnJlZFJlZ2lvbj0mYWJzb2x1dGVQYWdlUGF0aD0uJTJGbm9kZV9tb2R1bGVzJTJGbmV4dCUyRmRpc3QlMkZwYWdlcyUyRl9lcnJvci5qcyZhYnNvbHV0ZUFwcFBhdGg9cHJpdmF0ZS1uZXh0LXBhZ2VzJTJGX2FwcCZhYnNvbHV0ZURvY3VtZW50UGF0aD1wcml2YXRlLW5leHQtcGFnZXMlMkZfZG9jdW1lbnQmbWlkZGxld2FyZUNvbmZpZ0Jhc2U2ND1lMzAlM0QhIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQXdGO0FBQ2hDO0FBQ0U7QUFDMUQ7QUFDeUQ7QUFDVjtBQUMvQztBQUNxRTtBQUNyRTtBQUNBLGlFQUFlLHdFQUFLLENBQUMsbUVBQVEsWUFBWSxFQUFDO0FBQzFDO0FBQ08sdUJBQXVCLHdFQUFLLENBQUMsbUVBQVE7QUFDckMsdUJBQXVCLHdFQUFLLENBQUMsbUVBQVE7QUFDckMsMkJBQTJCLHdFQUFLLENBQUMsbUVBQVE7QUFDekMsZUFBZSx3RUFBSyxDQUFDLG1FQUFRO0FBQzdCLHdCQUF3Qix3RUFBSyxDQUFDLG1FQUFRO0FBQzdDO0FBQ08sZ0NBQWdDLHdFQUFLLENBQUMsbUVBQVE7QUFDOUMsZ0NBQWdDLHdFQUFLLENBQUMsbUVBQVE7QUFDOUMsaUNBQWlDLHdFQUFLLENBQUMsbUVBQVE7QUFDL0MsZ0NBQWdDLHdFQUFLLENBQUMsbUVBQVE7QUFDOUMsb0NBQW9DLHdFQUFLLENBQUMsbUVBQVE7QUFDekQ7QUFDTyx3QkFBd0Isa0dBQWdCO0FBQy9DO0FBQ0EsY0FBYyxrRUFBUztBQUN2QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQSxhQUFhLDhEQUFXO0FBQ3hCLGtCQUFrQixtRUFBZ0I7QUFDbEMsS0FBSztBQUNMLFlBQVk7QUFDWixDQUFDOztBQUVEIiwic291cmNlcyI6WyIiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGFnZXNSb3V0ZU1vZHVsZSB9IGZyb20gXCJuZXh0L2Rpc3Qvc2VydmVyL3JvdXRlLW1vZHVsZXMvcGFnZXMvbW9kdWxlLmNvbXBpbGVkXCI7XG5pbXBvcnQgeyBSb3V0ZUtpbmQgfSBmcm9tIFwibmV4dC9kaXN0L3NlcnZlci9yb3V0ZS1raW5kXCI7XG5pbXBvcnQgeyBob2lzdCB9IGZyb20gXCJuZXh0L2Rpc3QvYnVpbGQvdGVtcGxhdGVzL2hlbHBlcnNcIjtcbi8vIEltcG9ydCB0aGUgYXBwIGFuZCBkb2N1bWVudCBtb2R1bGVzLlxuaW1wb3J0ICogYXMgZG9jdW1lbnQgZnJvbSBcInByaXZhdGUtbmV4dC1wYWdlcy9fZG9jdW1lbnRcIjtcbmltcG9ydCAqIGFzIGFwcCBmcm9tIFwicHJpdmF0ZS1uZXh0LXBhZ2VzL19hcHBcIjtcbi8vIEltcG9ydCB0aGUgdXNlcmxhbmQgY29kZS5cbmltcG9ydCAqIGFzIHVzZXJsYW5kIGZyb20gXCIuL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvcGFnZXMvX2Vycm9yLmpzXCI7XG4vLyBSZS1leHBvcnQgdGhlIGNvbXBvbmVudCAoc2hvdWxkIGJlIHRoZSBkZWZhdWx0IGV4cG9ydCkuXG5leHBvcnQgZGVmYXVsdCBob2lzdCh1c2VybGFuZCwgJ2RlZmF1bHQnKTtcbi8vIFJlLWV4cG9ydCBtZXRob2RzLlxuZXhwb3J0IGNvbnN0IGdldFN0YXRpY1Byb3BzID0gaG9pc3QodXNlcmxhbmQsICdnZXRTdGF0aWNQcm9wcycpO1xuZXhwb3J0IGNvbnN0IGdldFN0YXRpY1BhdGhzID0gaG9pc3QodXNlcmxhbmQsICdnZXRTdGF0aWNQYXRocycpO1xuZXhwb3J0IGNvbnN0IGdldFNlcnZlclNpZGVQcm9wcyA9IGhvaXN0KHVzZXJsYW5kLCAnZ2V0U2VydmVyU2lkZVByb3BzJyk7XG5leHBvcnQgY29uc3QgY29uZmlnID0gaG9pc3QodXNlcmxhbmQsICdjb25maWcnKTtcbmV4cG9ydCBjb25zdCByZXBvcnRXZWJWaXRhbHMgPSBob2lzdCh1c2VybGFuZCwgJ3JlcG9ydFdlYlZpdGFscycpO1xuLy8gUmUtZXhwb3J0IGxlZ2FjeSBtZXRob2RzLlxuZXhwb3J0IGNvbnN0IHVuc3RhYmxlX2dldFN0YXRpY1Byb3BzID0gaG9pc3QodXNlcmxhbmQsICd1bnN0YWJsZV9nZXRTdGF0aWNQcm9wcycpO1xuZXhwb3J0IGNvbnN0IHVuc3RhYmxlX2dldFN0YXRpY1BhdGhzID0gaG9pc3QodXNlcmxhbmQsICd1bnN0YWJsZV9nZXRTdGF0aWNQYXRocycpO1xuZXhwb3J0IGNvbnN0IHVuc3RhYmxlX2dldFN0YXRpY1BhcmFtcyA9IGhvaXN0KHVzZXJsYW5kLCAndW5zdGFibGVfZ2V0U3RhdGljUGFyYW1zJyk7XG5leHBvcnQgY29uc3QgdW5zdGFibGVfZ2V0U2VydmVyUHJvcHMgPSBob2lzdCh1c2VybGFuZCwgJ3Vuc3RhYmxlX2dldFNlcnZlclByb3BzJyk7XG5leHBvcnQgY29uc3QgdW5zdGFibGVfZ2V0U2VydmVyU2lkZVByb3BzID0gaG9pc3QodXNlcmxhbmQsICd1bnN0YWJsZV9nZXRTZXJ2ZXJTaWRlUHJvcHMnKTtcbi8vIENyZWF0ZSBhbmQgZXhwb3J0IHRoZSByb3V0ZSBtb2R1bGUgdGhhdCB3aWxsIGJlIGNvbnN1bWVkLlxuZXhwb3J0IGNvbnN0IHJvdXRlTW9kdWxlID0gbmV3IFBhZ2VzUm91dGVNb2R1bGUoe1xuICAgIGRlZmluaXRpb246IHtcbiAgICAgICAga2luZDogUm91dGVLaW5kLlBBR0VTLFxuICAgICAgICBwYWdlOiBcIi9fZXJyb3JcIixcbiAgICAgICAgcGF0aG5hbWU6IFwiL19lcnJvclwiLFxuICAgICAgICAvLyBUaGUgZm9sbG93aW5nIGFyZW4ndCB1c2VkIGluIHByb2R1Y3Rpb24uXG4gICAgICAgIGJ1bmRsZVBhdGg6ICcnLFxuICAgICAgICBmaWxlbmFtZTogJydcbiAgICB9LFxuICAgIGNvbXBvbmVudHM6IHtcbiAgICAgICAgLy8gZGVmYXVsdCBleHBvcnQgbWlnaHQgbm90IGV4aXN0IHdoZW4gb3B0aW1pemVkIGZvciBkYXRhIG9ubHlcbiAgICAgICAgQXBwOiBhcHAuZGVmYXVsdCxcbiAgICAgICAgRG9jdW1lbnQ6IGRvY3VtZW50LmRlZmF1bHRcbiAgICB9LFxuICAgIHVzZXJsYW5kXG59KTtcblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9cGFnZXMuanMubWFwIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/next/dist/build/webpack/loaders/next-route-loader/index.js?kind=PAGES&page=%2F_error&preferredRegion=&absolutePagePath=.%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&absoluteAppPath=private-next-pages%2F_app&absoluteDocumentPath=private-next-pages%2F_document&middlewareConfigBase64=e30%3D!\n"); - -/***/ }), - -/***/ "./components/ErrorBoundary.jsx": -/*!**************************************!*\ - !*** ./components/ErrorBoundary.jsx ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _functions_frontend_fetchApi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../functions/frontend/fetchApi */ \"./functions/frontend/fetchApi.js\");\n/* harmony import */ var _layouts_GeneralLayout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../layouts/GeneralLayout */ \"./layouts/GeneralLayout.jsx\");\n/* harmony import */ var _general_PageHeadTags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./general/PageHeadTags */ \"./components/general/PageHeadTags.jsx\");\n// @ts-check\n\n\n\n\n\nclass ErrorBoundary extends (react__WEBPACK_IMPORTED_MODULE_1___default().Component) {\n constructor(/** @type {any} */ props){\n super(props);\n // Define a state variable to track whether is an error or not\n this.state = {\n hasError: false\n };\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ const pageTitle = \"Error | Datasquirel\";\n const pageDescription = \"Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.\";\n let head = /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"title\", {\n children: pageTitle\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 26,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"description\",\n content: pageDescription\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 27,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_general_PageHeadTags__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n pageTitle: pageTitle,\n pageDescription: pageDescription,\n pagePathname: \"/\"\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 28,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 25,\n columnNumber: 13\n }, this);\n // @ts-ignore\n this.state.head = head;\n }\n static getDerivedStateFromError() {\n return {\n hasError: true\n };\n }\n componentDidCatch(/** @type {any} */ error, /** @type {any} */ errorInfo) {\n (0,_functions_frontend_fetchApi__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\"/api/admin/clientError\", {\n method: \"post\",\n body: {\n component: \"ErrorBoundary-class-component\",\n message: error.message + \" ==== Error Info => \" + errorInfo,\n user: {}\n }\n });\n }\n render() {\n // Check if the error is thrown\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_layouts_GeneralLayout__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n // @ts-ignore\n head: this.state.head,\n user: null,\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"paper items-center px-20\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h2\", {\n className: \"text-base text-slate-400 m-0\",\n children: \"Application Error!\"\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 66,\n columnNumber: 25\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h1\", {\n className: \"text-2xl m-0 mb-4\",\n children: \"Please try again!\"\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 69,\n columnNumber: 25\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/\",\n className: \"button outlined\",\n children: \"Home\"\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 72,\n columnNumber: 29\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n onClick: (e)=>{\n window.history.back();\n },\n children: \"Go Back\"\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 75,\n columnNumber: 29\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 71,\n columnNumber: 25\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 65,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: \"/app/components/ErrorBoundary.jsx\",\n lineNumber: 60,\n columnNumber: 17\n }, this);\n }\n // Return children components in case of no error\n return this.props.children;\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ErrorBoundary);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9jb21wb25lbnRzL0Vycm9yQm91bmRhcnkuanN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsWUFBWTs7QUFFYztBQUM0QjtBQUNEO0FBQ0g7QUFFbEQsTUFBTUksc0JBQXNCSix3REFBZTtJQUN2Q00sWUFBWSxnQkFBZ0IsR0FBR0MsS0FBSyxDQUFFO1FBQ2xDLEtBQUssQ0FBQ0E7UUFFTiw4REFBOEQ7UUFDOUQsSUFBSSxDQUFDQyxLQUFLLEdBQUc7WUFBRUMsVUFBVTtRQUFNO1FBRS9COzs7O1NBSUMsR0FDRCxNQUFNQyxZQUFZO1FBQ2xCLE1BQU1DLGtCQUNGO1FBRUosSUFBSUMscUJBQ0EsOERBQUNaLHVEQUFjOzs4QkFDWCw4REFBQ2M7OEJBQU9KOzs7Ozs7OEJBQ1IsOERBQUNLO29CQUFLQyxNQUFLO29CQUFjQyxTQUFTTjs7Ozs7OzhCQUNsQyw4REFBQ1IsNkRBQVlBO29CQUNUTyxXQUFXQTtvQkFDWEMsaUJBQWlCQTtvQkFDakJPLGNBQWE7Ozs7Ozs7Ozs7OztRQUt6QixhQUFhO1FBQ2IsSUFBSSxDQUFDVixLQUFLLENBQUNJLElBQUksR0FBR0E7SUFDdEI7SUFFQSxPQUFPTywyQkFBMkI7UUFDOUIsT0FBTztZQUFFVixVQUFVO1FBQUs7SUFDNUI7SUFFQVcsa0JBQWtCLGdCQUFnQixHQUFHQyxLQUFLLEVBQUUsZ0JBQWdCLEdBQUdDLFNBQVMsRUFBRTtRQUN0RXJCLHdFQUFRQSxDQUFDLDBCQUEwQjtZQUMvQnNCLFFBQVE7WUFDUkMsTUFBTTtnQkFDRkMsV0FBVztnQkFDWEMsU0FBU0wsTUFBTUssT0FBTyxHQUFHLHlCQUF5Qko7Z0JBQ2xESyxNQUFNLENBQUM7WUFDWDtRQUNKO0lBQ0o7SUFFQUMsU0FBUztRQUNMLCtCQUErQjtRQUMvQixJQUFJLElBQUksQ0FBQ3BCLEtBQUssQ0FBQ0MsUUFBUSxFQUFFO1lBQ3JCLHdDQUF3QztZQUN4QyxxQkFDSSw4REFBQ1AsOERBQWFBO2dCQUNWLGFBQWE7Z0JBQ2JVLE1BQU0sSUFBSSxDQUFDSixLQUFLLENBQUNJLElBQUk7Z0JBQ3JCZSxNQUFNOzBCQUVOLDRFQUFDRTtvQkFBSUMsV0FBVTs7c0NBQ1gsOERBQUNDOzRCQUFHRCxXQUFVO3NDQUErQjs7Ozs7O3NDQUc3Qyw4REFBQ0U7NEJBQUdGLFdBQVU7c0NBQW9COzs7Ozs7c0NBRWxDLDhEQUFDRDs7OENBQ0csOERBQUNJO29DQUFFQyxNQUFLO29DQUFJSixXQUFVOzhDQUFrQjs7Ozs7OzhDQUd4Qyw4REFBQ0s7b0NBQ0dDLFNBQVMsQ0FBQ0M7d0NBQ05DLE9BQU9DLE9BQU8sQ0FBQ0MsSUFBSTtvQ0FDdkI7OENBQ0g7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O1FBT3JCO1FBRUEsaURBQWlEO1FBQ2pELE9BQU8sSUFBSSxDQUFDakMsS0FBSyxDQUFDa0MsUUFBUTtJQUM5QjtBQUNKO0FBRUEsaUVBQWVyQyxhQUFhQSxFQUFDIiwic291cmNlcyI6WyIvYXBwL2NvbXBvbmVudHMvRXJyb3JCb3VuZGFyeS5qc3giXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQHRzLWNoZWNrXHJcblxyXG5pbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XHJcbmltcG9ydCBmZXRjaEFwaSBmcm9tIFwiLi4vZnVuY3Rpb25zL2Zyb250ZW5kL2ZldGNoQXBpXCI7XHJcbmltcG9ydCBHZW5lcmFsTGF5b3V0IGZyb20gXCIuLi9sYXlvdXRzL0dlbmVyYWxMYXlvdXRcIjtcclxuaW1wb3J0IFBhZ2VIZWFkVGFncyBmcm9tIFwiLi9nZW5lcmFsL1BhZ2VIZWFkVGFnc1wiO1xyXG5cclxuY2xhc3MgRXJyb3JCb3VuZGFyeSBleHRlbmRzIFJlYWN0LkNvbXBvbmVudCB7XHJcbiAgICBjb25zdHJ1Y3RvcigvKiogQHR5cGUge2FueX0gKi8gcHJvcHMpIHtcclxuICAgICAgICBzdXBlcihwcm9wcyk7XHJcblxyXG4gICAgICAgIC8vIERlZmluZSBhIHN0YXRlIHZhcmlhYmxlIHRvIHRyYWNrIHdoZXRoZXIgaXMgYW4gZXJyb3Igb3Igbm90XHJcbiAgICAgICAgdGhpcy5zdGF0ZSA9IHsgaGFzRXJyb3I6IGZhbHNlIH07XHJcblxyXG4gICAgICAgIC8qKlxyXG4gICAgICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgICAgICpcclxuICAgICAgICAgKiBAYWJzdHJhY3QgTm9uIGhvb2sgdmFyaWFibGVzIGFuZCBmdW5jdGlvbnNcclxuICAgICAgICAgKi9cclxuICAgICAgICBjb25zdCBwYWdlVGl0bGUgPSBcIkVycm9yIHwgRGF0YXNxdWlyZWxcIjtcclxuICAgICAgICBjb25zdCBwYWdlRGVzY3JpcHRpb24gPVxyXG4gICAgICAgICAgICBcIkRhdGFzcXVpcmVsIGlzIGEgZmFzdCBhbmQgZWZmaWNpZW50IGNsb3VkLWJhc2VkIFNRTCBkYXRhIG1hbmFnZW1lbnQgc3lzdGVtIHRoYXQgdGFrZXMgYXdheSB0aGUgZW50aXJlIGhhc3NsZSBvZiBkZWFsaW5nIHdpdGggZGF0YSBib3RoIGxvY2FsbHkgYW5kIGFjcm9zcyBkaWZmZXJlbnQgcGxhdGZvcm1zLlwiO1xyXG5cclxuICAgICAgICBsZXQgaGVhZCA9IChcclxuICAgICAgICAgICAgPFJlYWN0LkZyYWdtZW50PlxyXG4gICAgICAgICAgICAgICAgPHRpdGxlPntwYWdlVGl0bGV9PC90aXRsZT5cclxuICAgICAgICAgICAgICAgIDxtZXRhIG5hbWU9XCJkZXNjcmlwdGlvblwiIGNvbnRlbnQ9e3BhZ2VEZXNjcmlwdGlvbn0gLz5cclxuICAgICAgICAgICAgICAgIDxQYWdlSGVhZFRhZ3NcclxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU9e3BhZ2VUaXRsZX1cclxuICAgICAgICAgICAgICAgICAgICBwYWdlRGVzY3JpcHRpb249e3BhZ2VEZXNjcmlwdGlvbn1cclxuICAgICAgICAgICAgICAgICAgICBwYWdlUGF0aG5hbWU9XCIvXCJcclxuICAgICAgICAgICAgICAgIC8+XHJcbiAgICAgICAgICAgIDwvUmVhY3QuRnJhZ21lbnQ+XHJcbiAgICAgICAgKTtcclxuXHJcbiAgICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICAgIHRoaXMuc3RhdGUuaGVhZCA9IGhlYWQ7XHJcbiAgICB9XHJcblxyXG4gICAgc3RhdGljIGdldERlcml2ZWRTdGF0ZUZyb21FcnJvcigpIHtcclxuICAgICAgICByZXR1cm4geyBoYXNFcnJvcjogdHJ1ZSB9O1xyXG4gICAgfVxyXG5cclxuICAgIGNvbXBvbmVudERpZENhdGNoKC8qKiBAdHlwZSB7YW55fSAqLyBlcnJvciwgLyoqIEB0eXBlIHthbnl9ICovIGVycm9ySW5mbykge1xyXG4gICAgICAgIGZldGNoQXBpKFwiL2FwaS9hZG1pbi9jbGllbnRFcnJvclwiLCB7XHJcbiAgICAgICAgICAgIG1ldGhvZDogXCJwb3N0XCIsXHJcbiAgICAgICAgICAgIGJvZHk6IHtcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudDogXCJFcnJvckJvdW5kYXJ5LWNsYXNzLWNvbXBvbmVudFwiLFxyXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogZXJyb3IubWVzc2FnZSArIFwiID09PT0gRXJyb3IgSW5mbyA9PiBcIiArIGVycm9ySW5mbyxcclxuICAgICAgICAgICAgICAgIHVzZXI6IHt9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHJlbmRlcigpIHtcclxuICAgICAgICAvLyBDaGVjayBpZiB0aGUgZXJyb3IgaXMgdGhyb3duXHJcbiAgICAgICAgaWYgKHRoaXMuc3RhdGUuaGFzRXJyb3IpIHtcclxuICAgICAgICAgICAgLy8gWW91IGNhbiByZW5kZXIgYW55IGN1c3RvbSBmYWxsYmFjayBVSVxyXG4gICAgICAgICAgICByZXR1cm4gKFxyXG4gICAgICAgICAgICAgICAgPEdlbmVyYWxMYXlvdXRcclxuICAgICAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXHJcbiAgICAgICAgICAgICAgICAgICAgaGVhZD17dGhpcy5zdGF0ZS5oZWFkfVxyXG4gICAgICAgICAgICAgICAgICAgIHVzZXI9e251bGx9XHJcbiAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJwYXBlciBpdGVtcy1jZW50ZXIgcHgtMjBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGgyIGNsYXNzTmFtZT1cInRleHQtYmFzZSB0ZXh0LXNsYXRlLTQwMCBtLTBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcGxpY2F0aW9uIEVycm9yIVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2gyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8aDEgY2xhc3NOYW1lPVwidGV4dC0yeGwgbS0wIG1iLTRcIj5QbGVhc2UgdHJ5IGFnYWluITwvaDE+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIi9cIiBjbGFzc05hbWU9XCJidXR0b24gb3V0bGluZWRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIb21lXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KGUpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lmhpc3RvcnkuYmFjaygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR28gQmFja1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9HZW5lcmFsTGF5b3V0PlxyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gUmV0dXJuIGNoaWxkcmVuIGNvbXBvbmVudHMgaW4gY2FzZSBvZiBubyBlcnJvclxyXG4gICAgICAgIHJldHVybiB0aGlzLnByb3BzLmNoaWxkcmVuO1xyXG4gICAgfVxyXG59XHJcblxyXG5leHBvcnQgZGVmYXVsdCBFcnJvckJvdW5kYXJ5O1xyXG4iXSwibmFtZXMiOlsiUmVhY3QiLCJmZXRjaEFwaSIsIkdlbmVyYWxMYXlvdXQiLCJQYWdlSGVhZFRhZ3MiLCJFcnJvckJvdW5kYXJ5IiwiQ29tcG9uZW50IiwiY29uc3RydWN0b3IiLCJwcm9wcyIsInN0YXRlIiwiaGFzRXJyb3IiLCJwYWdlVGl0bGUiLCJwYWdlRGVzY3JpcHRpb24iLCJoZWFkIiwiRnJhZ21lbnQiLCJ0aXRsZSIsIm1ldGEiLCJuYW1lIiwiY29udGVudCIsInBhZ2VQYXRobmFtZSIsImdldERlcml2ZWRTdGF0ZUZyb21FcnJvciIsImNvbXBvbmVudERpZENhdGNoIiwiZXJyb3IiLCJlcnJvckluZm8iLCJtZXRob2QiLCJib2R5IiwiY29tcG9uZW50IiwibWVzc2FnZSIsInVzZXIiLCJyZW5kZXIiLCJkaXYiLCJjbGFzc05hbWUiLCJoMiIsImgxIiwiYSIsImhyZWYiLCJidXR0b24iLCJvbkNsaWNrIiwiZSIsIndpbmRvdyIsImhpc3RvcnkiLCJiYWNrIiwiY2hpbGRyZW4iXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./components/ErrorBoundary.jsx\n"); - -/***/ }), - -/***/ "./components/general/LoadingBlock.jsx": -/*!*********************************************!*\ - !*** ./components/general/LoadingBlock.jsx ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ LoadingBlock)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * Loading Block Functional Component\r\n * ==============================================================================\r\n * @param {{\r\n * width?: string,\r\n * position?: *,\r\n * style?: import(\"react\").CSSProperties,\r\n * borderWidth?: string,\r\n * screen?: boolean,\r\n * title?: string,\r\n * }} props - React Component Props\r\n */ function LoadingBlock({ width, position, style, borderWidth, screen, title }) {\n return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \" top-0 left-0 w-full h-full flex items-center justify-center gap-4 bg-white/80 dark:bg-slate-800/80 z-50\" + (screen ? \" fixed\" : \" absolute\"),\n style: {\n ...style,\n position: position,\n zIndex: 20000\n },\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"general_loader\",\n style: width ? {\n width: width,\n height: width,\n minWidth: width,\n borderWidth: borderWidth ? borderWidth : \"4px\"\n } : {}\n }, void 0, false, {\n fileName: \"/app/components/general/LoadingBlock.jsx\",\n lineNumber: 49,\n columnNumber: 13\n }, this),\n title ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n children: title\n }, void 0, false, {\n fileName: \"/app/components/general/LoadingBlock.jsx\",\n lineNumber: 62,\n columnNumber: 22\n }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {}, void 0, false, {\n fileName: \"/app/components/general/LoadingBlock.jsx\",\n lineNumber: 62,\n columnNumber: 45\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/general/LoadingBlock.jsx\",\n lineNumber: 38,\n columnNumber: 9\n }, this);\n} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ \n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9jb21wb25lbnRzL2dlbmVyYWwvTG9hZGluZ0Jsb2NrLmpzeCIsIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBRTFCLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBRW5GOzs7Ozs7Ozs7OztDQVdDLEdBQ2MsU0FBU0MsYUFBYSxFQUNqQ0MsS0FBSyxFQUNMQyxRQUFRLEVBQ1JDLEtBQUssRUFDTEMsV0FBVyxFQUNYQyxNQUFNLEVBQ05DLEtBQUssRUFDUjtJQUNHLHFCQUNJLDhEQUFDQztRQUNHQyxXQUNJLDZHQUNDSCxDQUFBQSxTQUFTLFdBQVcsV0FBVTtRQUVuQ0YsT0FBTztZQUNILEdBQUdBLEtBQUs7WUFDUkQsVUFBVUE7WUFDVk8sUUFBUTtRQUNaOzswQkFFQSw4REFBQ0M7Z0JBQ0dGLFdBQVU7Z0JBQ1ZMLE9BQ0lGLFFBQ007b0JBQ0lBLE9BQU9BO29CQUNQVSxRQUFRVjtvQkFDUlcsVUFBVVg7b0JBQ1ZHLGFBQWFBLGNBQWNBLGNBQWM7Z0JBQzdDLElBQ0EsQ0FBQzs7Ozs7O1lBR2RFLHNCQUFRLDhEQUFDSTswQkFBTUo7Ozs7O3FDQUFnQiw4REFBQ1AsdURBQWM7Ozs7Ozs7Ozs7O0FBRzNELEVBRUEsbUZBQW1GLElBQ25GLG1GQUFtRixJQUNuRixtRkFBbUYsSUFDbkYsbUZBQW1GLElBQ25GLG1GQUFtRixJQUNuRixtRkFBbUYiLCJzb3VyY2VzIjpbIi9hcHAvY29tcG9uZW50cy9nZW5lcmFsL0xvYWRpbmdCbG9jay5qc3giXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQHRzLWNoZWNrXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEltcG9ydHNcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqL1xyXG5pbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XHJcblxyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG5cclxuLyoqXHJcbiAqIExvYWRpbmcgQmxvY2sgRnVuY3Rpb25hbCBDb21wb25lbnRcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEBwYXJhbSB7e1xyXG4gKiAgd2lkdGg/OiBzdHJpbmcsXHJcbiAqICBwb3NpdGlvbj86ICosXHJcbiAqICBzdHlsZT86IGltcG9ydChcInJlYWN0XCIpLkNTU1Byb3BlcnRpZXMsXHJcbiAqICBib3JkZXJXaWR0aD86IHN0cmluZyxcclxuICogIHNjcmVlbj86IGJvb2xlYW4sXHJcbiAqICB0aXRsZT86IHN0cmluZyxcclxuICogfX0gcHJvcHMgLSBSZWFjdCBDb21wb25lbnQgUHJvcHNcclxuICovXHJcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIExvYWRpbmdCbG9jayh7XHJcbiAgICB3aWR0aCxcclxuICAgIHBvc2l0aW9uLFxyXG4gICAgc3R5bGUsXHJcbiAgICBib3JkZXJXaWR0aCxcclxuICAgIHNjcmVlbixcclxuICAgIHRpdGxlLFxyXG59KSB7XHJcbiAgICByZXR1cm4gKFxyXG4gICAgICAgIDxkaXZcclxuICAgICAgICAgICAgY2xhc3NOYW1lPXtcclxuICAgICAgICAgICAgICAgIFwiIHRvcC0wIGxlZnQtMCB3LWZ1bGwgaC1mdWxsIGZsZXggaXRlbXMtY2VudGVyIGp1c3RpZnktY2VudGVyIGdhcC00IGJnLXdoaXRlLzgwIGRhcms6Ymctc2xhdGUtODAwLzgwIHotNTBcIiArXHJcbiAgICAgICAgICAgICAgICAoc2NyZWVuID8gXCIgZml4ZWRcIiA6IFwiIGFic29sdXRlXCIpXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc3R5bGU9e3tcclxuICAgICAgICAgICAgICAgIC4uLnN0eWxlLFxyXG4gICAgICAgICAgICAgICAgcG9zaXRpb246IHBvc2l0aW9uLFxyXG4gICAgICAgICAgICAgICAgekluZGV4OiAyMDAwMCxcclxuICAgICAgICAgICAgfX1cclxuICAgICAgICA+XHJcbiAgICAgICAgICAgIDxzcGFuXHJcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJnZW5lcmFsX2xvYWRlclwiXHJcbiAgICAgICAgICAgICAgICBzdHlsZT17XHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGhcclxuICAgICAgICAgICAgICAgICAgICAgICAgPyB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiB3aWR0aCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiB3aWR0aCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluV2lkdGg6IHdpZHRoLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJXaWR0aDogYm9yZGVyV2lkdGggPyBib3JkZXJXaWR0aCA6IFwiNHB4XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA6IHt9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgID48L3NwYW4+XHJcbiAgICAgICAgICAgIHt0aXRsZSA/IDxzcGFuPnt0aXRsZX08L3NwYW4+IDogPFJlYWN0LkZyYWdtZW50PjwvUmVhY3QuRnJhZ21lbnQ+fVxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgKTtcclxufVxyXG5cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuIl0sIm5hbWVzIjpbIlJlYWN0IiwiTG9hZGluZ0Jsb2NrIiwid2lkdGgiLCJwb3NpdGlvbiIsInN0eWxlIiwiYm9yZGVyV2lkdGgiLCJzY3JlZW4iLCJ0aXRsZSIsImRpdiIsImNsYXNzTmFtZSIsInpJbmRleCIsInNwYW4iLCJoZWlnaHQiLCJtaW5XaWR0aCIsIkZyYWdtZW50Il0sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./components/general/LoadingBlock.jsx\n"); - -/***/ }), - -/***/ "./components/general/Logo.jsx": -/*!*************************************!*\ - !*** ./components/general/Logo.jsx ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Logo)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _barrel_optimize_names_Menu_lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! __barrel_optimize__?names=Menu!=!lucide-react */ \"__barrel_optimize__?names=Menu!=!./node_modules/lucide-react/dist/esm/lucide-react.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {{\r\n * size?: string,\r\n * adminAside?: boolean,\r\n * collapseAsideMobile?: boolean,\r\n * setCollapseAsideMobile?: React.Dispatch>,\r\n * }} props - React component props\r\n */ function Logo({ size, adminAside, collapseAsideMobile, setCollapseAsideMobile }) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/\",\n className: \"logo\",\n onClick: (e)=>{\n /** @type {*} */ const targetElement = e.target;\n if (targetElement?.closest(\"button\")) {\n return e.preventDefault();\n }\n },\n children: [\n adminAside && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n className: \"flex lg:hidden small-text mr-2 primary-light\",\n onClick: (e)=>{\n if (collapseAsideMobile && setCollapseAsideMobile) {\n setCollapseAsideMobile(false);\n } else if (setCollapseAsideMobile) {\n setCollapseAsideMobile(true);\n }\n },\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"-mt-0.5\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Menu_lucide_react__WEBPACK_IMPORTED_MODULE_2__.Menu, {}, void 0, false, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 94,\n columnNumber: 25\n }, this)\n }, void 0, false, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 93,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"dark:text-white\",\n children: \"Menu\"\n }, void 0, false, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 96,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 83,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: \"/images/logo-icon-alt-2.webp\",\n alt: \"Datasquirel Logo\",\n width: 35,\n className: \"dark:hidden -mt-1.5 -mr-1.5\"\n }, void 0, false, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 99,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: \"/images/logo-icon-alt-2.webp\",\n alt: \"Datasquirel Logo\",\n width: 35,\n className: \"hidden dark:flex -mt-1.5 -mr-1.5\"\n }, void 0, false, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 105,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"text-slate-800 dark:text-white text-[20px] font-bold hidden sm:flex -mt-[1px]\",\n children: \"Datasquirel\"\n }, void 0, false, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 111,\n columnNumber: 13\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/general/Logo.jsx\",\n lineNumber: 70,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9jb21wb25lbnRzL2dlbmVyYWwvTG9nby5qc3giLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsWUFBWTtBQUVaOzs7O0NBSUM7QUFDbUM7QUFDVjtBQUUxQixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUVuRjs7Ozs7Ozs7O0NBU0MsR0FDYyxTQUFTRSxLQUFLLEVBQ3pCQyxJQUFJLEVBQ0pDLFVBQVUsRUFDVkMsbUJBQW1CLEVBQ25CQyxzQkFBc0IsRUFDekI7SUFDRzs7OztLQUlDLEdBRUQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBQ0QscUJBQ0ksOERBQUNDO1FBQ0dDLE1BQUs7UUFDTEMsV0FBVTtRQUNWQyxTQUFTLENBQUNDO1lBQ04sY0FBYyxHQUNkLE1BQU1DLGdCQUFnQkQsRUFBRUUsTUFBTTtZQUU5QixJQUFJRCxlQUFlRSxRQUFRLFdBQVc7Z0JBQ2xDLE9BQU9ILEVBQUVJLGNBQWM7WUFDM0I7UUFDSjs7WUFFQ1gsNEJBQ0csOERBQUNZO2dCQUNHUCxXQUFVO2dCQUNWQyxTQUFTLENBQUNDO29CQUNOLElBQUlOLHVCQUF1QkMsd0JBQXdCO3dCQUMvQ0EsdUJBQXVCO29CQUMzQixPQUFPLElBQUlBLHdCQUF3Qjt3QkFDL0JBLHVCQUF1QjtvQkFDM0I7Z0JBQ0o7O2tDQUVBLDhEQUFDVzt3QkFBSVIsV0FBVTtrQ0FDWCw0RUFBQ1QsMEVBQUlBOzs7Ozs7Ozs7O2tDQUVULDhEQUFDa0I7d0JBQUtULFdBQVU7a0NBQWtCOzs7Ozs7Ozs7Ozs7MEJBRzFDLDhEQUFDVTtnQkFDR0MsS0FBSTtnQkFDSkMsS0FBSTtnQkFDSkMsT0FBTztnQkFDUGIsV0FBVTs7Ozs7OzBCQUVkLDhEQUFDVTtnQkFDR0MsS0FBSTtnQkFDSkMsS0FBSTtnQkFDSkMsT0FBTztnQkFDUGIsV0FBVTs7Ozs7OzBCQUVkLDhEQUFDUztnQkFBS1QsV0FBVTswQkFBZ0Y7Ozs7Ozs7Ozs7OztBQUt4Ryx3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUM1QyIsInNvdXJjZXMiOlsiL2FwcC9jb21wb25lbnRzL2dlbmVyYWwvTG9nby5qc3giXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQHRzLWNoZWNrXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEltcG9ydHNcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqL1xyXG5pbXBvcnQgeyBNZW51IH0gZnJvbSBcImx1Y2lkZS1yZWFjdFwiO1xyXG5pbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XHJcblxyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG5cclxuLyoqXHJcbiAqIE1haW4gQ29tcG9uZW50IHsgRnVuY3Rpb25hbCB9XHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBAcGFyYW0ge3tcclxuICogIHNpemU/OiBzdHJpbmcsXHJcbiAqICBhZG1pbkFzaWRlPzogYm9vbGVhbixcclxuICogIGNvbGxhcHNlQXNpZGVNb2JpbGU/OiBib29sZWFuLFxyXG4gKiAgc2V0Q29sbGFwc2VBc2lkZU1vYmlsZT86IFJlYWN0LkRpc3BhdGNoPFJlYWN0LlNldFN0YXRlQWN0aW9uPGJvb2xlYW4+PixcclxuICogfX0gcHJvcHMgLSBSZWFjdCBjb21wb25lbnQgcHJvcHNcclxuICovXHJcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIExvZ28oe1xyXG4gICAgc2l6ZSxcclxuICAgIGFkbWluQXNpZGUsXHJcbiAgICBjb2xsYXBzZUFzaWRlTW9iaWxlLFxyXG4gICAgc2V0Q29sbGFwc2VBc2lkZU1vYmlsZSxcclxufSkge1xyXG4gICAgLyoqXHJcbiAgICAgKiBHZXQgQ29udGV4dHNcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyBSZWFjdC51c2VDb250ZXh0IH1cclxuICAgICAqL1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE5vbiBob29rIHZhcmlhYmxlcyBhbmQgZnVuY3Rpb25zXHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZWFjdCBIb29rc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QsIHVzZVJlZiwgZXRjIC4uLiB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgTWFpbiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqL1xyXG4gICAgcmV0dXJuIChcclxuICAgICAgICA8YVxyXG4gICAgICAgICAgICBocmVmPVwiL1wiXHJcbiAgICAgICAgICAgIGNsYXNzTmFtZT1cImxvZ29cIlxyXG4gICAgICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgLyoqIEB0eXBlIHsqfSAqL1xyXG4gICAgICAgICAgICAgICAgY29uc3QgdGFyZ2V0RWxlbWVudCA9IGUudGFyZ2V0O1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICh0YXJnZXRFbGVtZW50Py5jbG9zZXN0KFwiYnV0dG9uXCIpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfX1cclxuICAgICAgICA+XHJcbiAgICAgICAgICAgIHthZG1pbkFzaWRlICYmIChcclxuICAgICAgICAgICAgICAgIDxidXR0b25cclxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJmbGV4IGxnOmhpZGRlbiBzbWFsbC10ZXh0IG1yLTIgcHJpbWFyeS1saWdodFwiXHJcbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KGUpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbGxhcHNlQXNpZGVNb2JpbGUgJiYgc2V0Q29sbGFwc2VBc2lkZU1vYmlsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0Q29sbGFwc2VBc2lkZU1vYmlsZShmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc2V0Q29sbGFwc2VBc2lkZU1vYmlsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0Q29sbGFwc2VBc2lkZU1vYmlsZSh0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH19XHJcbiAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCItbXQtMC41XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxNZW51IC8+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwiZGFyazp0ZXh0LXdoaXRlXCI+TWVudTwvc3Bhbj5cclxuICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICApfVxyXG4gICAgICAgICAgICA8aW1nXHJcbiAgICAgICAgICAgICAgICBzcmM9XCIvaW1hZ2VzL2xvZ28taWNvbi1hbHQtMi53ZWJwXCJcclxuICAgICAgICAgICAgICAgIGFsdD1cIkRhdGFzcXVpcmVsIExvZ29cIlxyXG4gICAgICAgICAgICAgICAgd2lkdGg9ezM1fVxyXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiZGFyazpoaWRkZW4gLW10LTEuNSAtbXItMS41XCJcclxuICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgPGltZ1xyXG4gICAgICAgICAgICAgICAgc3JjPVwiL2ltYWdlcy9sb2dvLWljb24tYWx0LTIud2VicFwiXHJcbiAgICAgICAgICAgICAgICBhbHQ9XCJEYXRhc3F1aXJlbCBMb2dvXCJcclxuICAgICAgICAgICAgICAgIHdpZHRoPXszNX1cclxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImhpZGRlbiBkYXJrOmZsZXggLW10LTEuNSAtbXItMS41XCJcclxuICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwidGV4dC1zbGF0ZS04MDAgZGFyazp0ZXh0LXdoaXRlIHRleHQtWzIwcHhdIGZvbnQtYm9sZCBoaWRkZW4gc206ZmxleCAtbXQtWzFweF1cIj5cclxuICAgICAgICAgICAgICAgIERhdGFzcXVpcmVsXHJcbiAgICAgICAgICAgIDwvc3Bhbj5cclxuICAgICAgICA8L2E+XHJcbiAgICApO1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG59XHJcbiJdLCJuYW1lcyI6WyJNZW51IiwiUmVhY3QiLCJMb2dvIiwic2l6ZSIsImFkbWluQXNpZGUiLCJjb2xsYXBzZUFzaWRlTW9iaWxlIiwic2V0Q29sbGFwc2VBc2lkZU1vYmlsZSIsImEiLCJocmVmIiwiY2xhc3NOYW1lIiwib25DbGljayIsImUiLCJ0YXJnZXRFbGVtZW50IiwidGFyZ2V0IiwiY2xvc2VzdCIsInByZXZlbnREZWZhdWx0IiwiYnV0dG9uIiwiZGl2Iiwic3BhbiIsImltZyIsInNyYyIsImFsdCIsIndpZHRoIl0sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./components/general/Logo.jsx\n"); - -/***/ }), - -/***/ "./components/general/PageHeadTags.jsx": -/*!*********************************************!*\ - !*** ./components/general/PageHeadTags.jsx ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ PageHeadTags)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {Object} props - Server props\r\n * @param {string} props.pageTitle\r\n * @param {string} props.pageDescription\r\n * @param {string} props.pagePathname\r\n * @param {boolean} [props.aceEditor]\r\n */ function PageHeadTags({ pageTitle, pageDescription, pagePathname, aceEditor }) {\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"link\", {\n rel: \"canonical\",\n href: \"http://localhost:7070\" + pagePathname\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 40,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n property: \"og:url\",\n content: \"http://localhost:7070\" + pagePathname\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 44,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n itemProp: \"url\",\n content: \"http://localhost:7070\" + pagePathname\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 48,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"twitter:url\",\n content: \"http://localhost:7070\" + pagePathname\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 52,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n property: \"og:title\",\n content: pageTitle\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 56,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n property: \"og:description\",\n content: pageDescription\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 57,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n itemProp: \"name\",\n content: pageTitle\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 58,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n itemProp: \"description\",\n content: pageDescription\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 59,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"twitter:title\",\n content: pageTitle\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 60,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"twitter:description\",\n content: pageDescription\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 61,\n columnNumber: 13\n }, this),\n aceEditor && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"script\", {\n src: \"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js\",\n integrity: \"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==\",\n crossOrigin: \"anonymous\",\n referrerPolicy: \"no-referrer\"\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 65,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"script\", {\n src: \"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js\",\n integrity: \"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==\",\n crossOrigin: \"anonymous\",\n referrerPolicy: \"no-referrer\"\n }, void 0, false, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 72,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 64,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/general/PageHeadTags.jsx\",\n lineNumber: 39,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ \n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9jb21wb25lbnRzL2dlbmVyYWwvUGFnZUhlYWRUYWdzLmpzeCIsIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBRTFCLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBRW5GOzs7Ozs7Ozs7Q0FTQyxHQUNjLFNBQVNDLGFBQWEsRUFDakNDLFNBQVMsRUFDVEMsZUFBZSxFQUNmQyxZQUFZLEVBQ1pDLFNBQVMsRUFDWjtJQUNHOzs7O0tBSUMsR0FDRCxxQkFDSSw4REFBQ0wsdURBQWM7OzBCQUNYLDhEQUFDTztnQkFDR0MsS0FBSTtnQkFDSkMsTUFBTUMsdUJBQWlDLEdBQUdOOzs7Ozs7MEJBRTlDLDhEQUFDUztnQkFDR0MsVUFBUztnQkFDVEMsU0FBU0wsdUJBQWlDLEdBQUdOOzs7Ozs7MEJBRWpELDhEQUFDUztnQkFDR0csVUFBUztnQkFDVEQsU0FBU0wsdUJBQWlDLEdBQUdOOzs7Ozs7MEJBRWpELDhEQUFDUztnQkFDR0ksTUFBSztnQkFDTEYsU0FBU0wsdUJBQWlDLEdBQUdOOzs7Ozs7MEJBRWpELDhEQUFDUztnQkFBS0MsVUFBUztnQkFBV0MsU0FBU2I7Ozs7OzswQkFDbkMsOERBQUNXO2dCQUFLQyxVQUFTO2dCQUFpQkMsU0FBU1o7Ozs7OzswQkFDekMsOERBQUNVO2dCQUFLRyxVQUFTO2dCQUFPRCxTQUFTYjs7Ozs7OzBCQUMvQiw4REFBQ1c7Z0JBQUtHLFVBQVM7Z0JBQWNELFNBQVNaOzs7Ozs7MEJBQ3RDLDhEQUFDVTtnQkFBS0ksTUFBSztnQkFBZ0JGLFNBQVNiOzs7Ozs7MEJBQ3BDLDhEQUFDVztnQkFBS0ksTUFBSztnQkFBc0JGLFNBQVNaOzs7Ozs7WUFFekNFLDJCQUNHLDhEQUFDTCx1REFBYzs7a0NBQ1gsOERBQUNrQjt3QkFDR0MsS0FBSTt3QkFDSkMsV0FBVTt3QkFDVkMsYUFBWTt3QkFDWkMsZ0JBQWU7Ozs7OztrQ0FHbkIsOERBQUNKO3dCQUNHQyxLQUFJO3dCQUNKQyxXQUFVO3dCQUNWQyxhQUFZO3dCQUNaQyxnQkFBZTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBTW5DLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBQzVDLEVBRUEsbUZBQW1GLElBQ25GLG1GQUFtRixJQUNuRixtRkFBbUYsSUFDbkYsbUZBQW1GLElBQ25GLG1GQUFtRixJQUNuRixtRkFBbUYiLCJzb3VyY2VzIjpbIi9hcHAvY29tcG9uZW50cy9nZW5lcmFsL1BhZ2VIZWFkVGFncy5qc3giXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQHRzLWNoZWNrXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEltcG9ydHNcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqL1xyXG5pbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XHJcblxyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBNYWluIENvbXBvbmVudCB7IEZ1bmN0aW9uYWwgfVxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gU2VydmVyIHByb3BzXHJcbiAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wcy5wYWdlVGl0bGVcclxuICogQHBhcmFtIHtzdHJpbmd9IHByb3BzLnBhZ2VEZXNjcmlwdGlvblxyXG4gKiBAcGFyYW0ge3N0cmluZ30gcHJvcHMucGFnZVBhdGhuYW1lXHJcbiAqIEBwYXJhbSB7Ym9vbGVhbn0gW3Byb3BzLmFjZUVkaXRvcl1cclxuICovXHJcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIFBhZ2VIZWFkVGFncyh7XHJcbiAgICBwYWdlVGl0bGUsXHJcbiAgICBwYWdlRGVzY3JpcHRpb24sXHJcbiAgICBwYWdlUGF0aG5hbWUsXHJcbiAgICBhY2VFZGl0b3IsXHJcbn0pIHtcclxuICAgIC8qKlxyXG4gICAgICogRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE1haW4gRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKi9cclxuICAgIHJldHVybiAoXHJcbiAgICAgICAgPFJlYWN0LkZyYWdtZW50PlxyXG4gICAgICAgICAgICA8bGlua1xyXG4gICAgICAgICAgICAgICAgcmVsPVwiY2Fub25pY2FsXCJcclxuICAgICAgICAgICAgICAgIGhyZWY9e3Byb2Nlc3MuZW52Lk5FWFRfUFVCTElDX0RTUUxfSE9TVCArIHBhZ2VQYXRobmFtZX1cclxuICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgPG1ldGFcclxuICAgICAgICAgICAgICAgIHByb3BlcnR5PVwib2c6dXJsXCJcclxuICAgICAgICAgICAgICAgIGNvbnRlbnQ9e3Byb2Nlc3MuZW52Lk5FWFRfUFVCTElDX0RTUUxfSE9TVCArIHBhZ2VQYXRobmFtZX1cclxuICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgPG1ldGFcclxuICAgICAgICAgICAgICAgIGl0ZW1Qcm9wPVwidXJsXCJcclxuICAgICAgICAgICAgICAgIGNvbnRlbnQ9e3Byb2Nlc3MuZW52Lk5FWFRfUFVCTElDX0RTUUxfSE9TVCArIHBhZ2VQYXRobmFtZX1cclxuICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgPG1ldGFcclxuICAgICAgICAgICAgICAgIG5hbWU9XCJ0d2l0dGVyOnVybFwiXHJcbiAgICAgICAgICAgICAgICBjb250ZW50PXtwcm9jZXNzLmVudi5ORVhUX1BVQkxJQ19EU1FMX0hPU1QgKyBwYWdlUGF0aG5hbWV9XHJcbiAgICAgICAgICAgIC8+XHJcbiAgICAgICAgICAgIDxtZXRhIHByb3BlcnR5PVwib2c6dGl0bGVcIiBjb250ZW50PXtwYWdlVGl0bGV9IC8+XHJcbiAgICAgICAgICAgIDxtZXRhIHByb3BlcnR5PVwib2c6ZGVzY3JpcHRpb25cIiBjb250ZW50PXtwYWdlRGVzY3JpcHRpb259IC8+XHJcbiAgICAgICAgICAgIDxtZXRhIGl0ZW1Qcm9wPVwibmFtZVwiIGNvbnRlbnQ9e3BhZ2VUaXRsZX0gLz5cclxuICAgICAgICAgICAgPG1ldGEgaXRlbVByb3A9XCJkZXNjcmlwdGlvblwiIGNvbnRlbnQ9e3BhZ2VEZXNjcmlwdGlvbn0gLz5cclxuICAgICAgICAgICAgPG1ldGEgbmFtZT1cInR3aXR0ZXI6dGl0bGVcIiBjb250ZW50PXtwYWdlVGl0bGV9IC8+XHJcbiAgICAgICAgICAgIDxtZXRhIG5hbWU9XCJ0d2l0dGVyOmRlc2NyaXB0aW9uXCIgY29udGVudD17cGFnZURlc2NyaXB0aW9ufSAvPlxyXG5cclxuICAgICAgICAgICAge2FjZUVkaXRvciAmJiAoXHJcbiAgICAgICAgICAgICAgICA8UmVhY3QuRnJhZ21lbnQ+XHJcbiAgICAgICAgICAgICAgICAgICAgPHNjcmlwdFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzcmM9XCJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9hY2UvMS4yMi4wL2FjZS5taW4uanNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ3JpdHk9XCJzaGE1MTItcTZDVEIwalMrVnVKblNjdDgyclZjV2xJMDZMR3pOamFHM0NXZW5IV1ZVbmNSdmM0VVFNRmtBM2E1SXA4ODB4citsQngzOEZjSERjbE94UGRTZytzQnc9PVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNyb3NzT3JpZ2luPVwiYW5vbnltb3VzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmZXJyZXJQb2xpY3k9XCJuby1yZWZlcnJlclwiXHJcbiAgICAgICAgICAgICAgICAgICAgPjwvc2NyaXB0PlxyXG5cclxuICAgICAgICAgICAgICAgICAgICA8c2NyaXB0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyYz1cImh0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL2FjZS8xLjIyLjAvZXh0LWxhbmd1YWdlX3Rvb2xzLm1pbi5qc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGludGVncml0eT1cInNoYTUxMi02ZzZjdm9jVjdlVC9KOEw0NGxMOGdKS3FxOW9ucVFlWUdnSk8wRG1yc1lGY0NmUmw2d1lrWUEvS0hTNzY4cjRRVlRCNEp4c0NjTVE5Z0llenhwVENadz09XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3Jvc3NPcmlnaW49XCJhbm9ueW1vdXNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZlcnJlclBvbGljeT1cIm5vLXJlZmVycmVyXCJcclxuICAgICAgICAgICAgICAgICAgICA+PC9zY3JpcHQ+XHJcbiAgICAgICAgICAgICAgICA8L1JlYWN0LkZyYWdtZW50PlxyXG4gICAgICAgICAgICApfVxyXG4gICAgICAgIDwvUmVhY3QuRnJhZ21lbnQ+XHJcbiAgICApO1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG59XHJcblxyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4iXSwibmFtZXMiOlsiUmVhY3QiLCJQYWdlSGVhZFRhZ3MiLCJwYWdlVGl0bGUiLCJwYWdlRGVzY3JpcHRpb24iLCJwYWdlUGF0aG5hbWUiLCJhY2VFZGl0b3IiLCJGcmFnbWVudCIsImxpbmsiLCJyZWwiLCJocmVmIiwicHJvY2VzcyIsImVudiIsIk5FWFRfUFVCTElDX0RTUUxfSE9TVCIsIm1ldGEiLCJwcm9wZXJ0eSIsImNvbnRlbnQiLCJpdGVtUHJvcCIsIm5hbWUiLCJzY3JpcHQiLCJzcmMiLCJpbnRlZ3JpdHkiLCJjcm9zc09yaWdpbiIsInJlZmVycmVyUG9saWN5Il0sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./components/general/PageHeadTags.jsx\n"); - -/***/ }), - -/***/ "./components/general/ThemeSelector.jsx": -/*!**********************************************!*\ - !*** ./components/general/ThemeSelector.jsx ***! - \**********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ThemeSelector)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {object} props - React component props\r\n */ function ThemeSelector(props) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ const [theme, setTheme] = react__WEBPACK_IMPORTED_MODULE_1___default().useState(\"Light Mode\");\n react__WEBPACK_IMPORTED_MODULE_1___default().useEffect({\n \"ThemeSelector.useEffect\": ()=>{\n let existingTheme = localStorage.getItem(\"theme\");\n if (existingTheme?.match(/dark/)) {\n setTheme(\"Dark Mode\");\n }\n }\n }[\"ThemeSelector.useEffect\"], []);\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"\",\n id: \"theme-selector-wrapper\",\n onClick: ()=>{\n const graphicWrapper = document.getElementById(\"theme-selector-graphic-wrapper\");\n let existingTheme = localStorage.getItem(\"theme\");\n const sunIcon = graphicWrapper?.querySelector(\"img.sun\");\n const moonIcon = graphicWrapper?.querySelector(\"img.moon\");\n ////////////////////////////////////////\n if (!existingTheme || existingTheme?.match(/light/)) {\n document.documentElement.className = \"dark\";\n localStorage.setItem(\"theme\", \"dark\");\n existingTheme = \"dark\";\n ////////////////////////////////////////\n sunIcon?.classList.add(\"hidden\");\n moonIcon?.classList.remove(\"hidden\");\n // @ts-ignore\n graphicWrapper?.firstChild?.classList.add(\"ml-auto\");\n ////////////////////////////////////////\n setTheme(\"Dark Mode\");\n ////////////////////////////////////////\n } else if (existingTheme?.match(/dark/)) {\n document.documentElement.className = \"light\";\n localStorage.setItem(\"theme\", \"light\");\n existingTheme = \"light\";\n ////////////////////////////////////////\n moonIcon?.classList.add(\"hidden\");\n sunIcon?.classList.remove(\"hidden\");\n // @ts-ignore\n graphicWrapper?.firstChild?.classList.remove(\"ml-auto\");\n ////////////////////////////////////////\n setTheme(\"Light Mode\");\n ////////////////////////////////////////\n }\n ////////////////////////////////////////\n },\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"p-1 rounded-full w-12 transition-all\",\n id: \"theme-selector-graphic-wrapper\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"pointer-events-none transition-all dark:ml-auto\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: \"/images/sun.png\",\n alt: \"Sun Icon\",\n width: 18,\n className: \"sun dark:hidden\"\n }, void 0, false, {\n fileName: \"/app/components/general/ThemeSelector.jsx\",\n lineNumber: 127,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: \"/images/new-moon.png\",\n alt: \"Sun Icon\",\n width: 18,\n className: \"moon hidden dark:flex\"\n }, void 0, false, {\n fileName: \"/app/components/general/ThemeSelector.jsx\",\n lineNumber: 133,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/components/general/ThemeSelector.jsx\",\n lineNumber: 126,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: \"/app/components/general/ThemeSelector.jsx\",\n lineNumber: 122,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: \"/app/components/general/ThemeSelector.jsx\",\n lineNumber: 69,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9jb21wb25lbnRzL2dlbmVyYWwvVGhlbWVTZWxlY3Rvci5qc3giLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxZQUFZO0FBRVo7Ozs7Q0FJQztBQUN5QjtBQUUxQixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUVuRjs7Ozs7Q0FLQyxHQUNjLFNBQVNDLGNBQWNDLEtBQUs7SUFDdkM7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBQ0QsTUFBTSxDQUFDQyxPQUFPQyxTQUFTLEdBQUdKLHFEQUFjLENBQUM7SUFFekNBLHNEQUFlO21DQUFDO1lBQ1osSUFBSU8sZ0JBQWdCQyxhQUFhQyxPQUFPLENBQUM7WUFFekMsSUFBSUYsZUFBZUcsTUFBTSxTQUFTO2dCQUM5Qk4sU0FBUztZQUNiO1FBQ0o7a0NBQUcsRUFBRTtJQUVMLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FDRCxxQkFDSSw4REFBQ087UUFDR0MsV0FBVTtRQUNWQyxJQUFHO1FBQ0hDLFNBQVM7WUFDTCxNQUFNQyxpQkFBaUJDLFNBQVNDLGNBQWMsQ0FDMUM7WUFHSixJQUFJVixnQkFBZ0JDLGFBQWFDLE9BQU8sQ0FBQztZQUN6QyxNQUFNUyxVQUFVSCxnQkFBZ0JJLGNBQWM7WUFDOUMsTUFBTUMsV0FBV0wsZ0JBQWdCSSxjQUFjO1lBRS9DLHdDQUF3QztZQUV4QyxJQUFJLENBQUNaLGlCQUFpQkEsZUFBZUcsTUFBTSxVQUFVO2dCQUNqRE0sU0FBU0ssZUFBZSxDQUFDVCxTQUFTLEdBQUc7Z0JBQ3JDSixhQUFhYyxPQUFPLENBQUMsU0FBUztnQkFDOUJmLGdCQUFnQjtnQkFDaEIsd0NBQXdDO2dCQUV4Q1csU0FBU0ssVUFBVUMsSUFBSTtnQkFDdkJKLFVBQVVHLFVBQVVFLE9BQU87Z0JBRTNCLGFBQWE7Z0JBQ2JWLGdCQUFnQlcsWUFBWUgsVUFBVUMsSUFBSTtnQkFFMUMsd0NBQXdDO2dCQUV4Q3BCLFNBQVM7WUFFVCx3Q0FBd0M7WUFDNUMsT0FBTyxJQUFJRyxlQUFlRyxNQUFNLFNBQVM7Z0JBQ3JDTSxTQUFTSyxlQUFlLENBQUNULFNBQVMsR0FBRztnQkFDckNKLGFBQWFjLE9BQU8sQ0FBQyxTQUFTO2dCQUM5QmYsZ0JBQWdCO2dCQUNoQix3Q0FBd0M7Z0JBRXhDYSxVQUFVRyxVQUFVQyxJQUFJO2dCQUN4Qk4sU0FBU0ssVUFBVUUsT0FBTztnQkFFMUIsYUFBYTtnQkFDYlYsZ0JBQWdCVyxZQUFZSCxVQUFVRSxPQUFPO2dCQUU3Qyx3Q0FBd0M7Z0JBRXhDckIsU0FBUztZQUVULHdDQUF3QztZQUM1QztRQUVBLHdDQUF3QztRQUM1QztrQkFFQSw0RUFBQ087WUFDR0MsV0FBVTtZQUNWQyxJQUFHO3NCQUVILDRFQUFDRjtnQkFBSUMsV0FBVTs7a0NBQ1gsOERBQUNlO3dCQUNHQyxLQUFJO3dCQUNKQyxLQUFJO3dCQUNKQyxPQUFPO3dCQUNQbEIsV0FBVTs7Ozs7O2tDQUVkLDhEQUFDZTt3QkFDR0MsS0FBSTt3QkFDSkMsS0FBSTt3QkFDSkMsT0FBTzt3QkFDUGxCLFdBQVU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFPOUIsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDNUMiLCJzb3VyY2VzIjpbIi9hcHAvY29tcG9uZW50cy9nZW5lcmFsL1RoZW1lU2VsZWN0b3IuanN4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIEB0cy1jaGVja1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBJbXBvcnRzXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKi9cclxuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xyXG5cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuXHJcbi8qKlxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogTWFpbiBDb21wb25lbnQgeyBGdW5jdGlvbmFsIH1cclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEBwYXJhbSB7b2JqZWN0fSBwcm9wcyAtIFJlYWN0IGNvbXBvbmVudCBwcm9wc1xyXG4gKi9cclxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gVGhlbWVTZWxlY3Rvcihwcm9wcykge1xyXG4gICAgLyoqXHJcbiAgICAgKiBHZXQgQ29udGV4dHNcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyBSZWFjdC51c2VDb250ZXh0IH1cclxuICAgICAqL1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE5vbiBob29rIHZhcmlhYmxlcyBhbmQgZnVuY3Rpb25zXHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZWFjdCBIb29rc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QsIHVzZVJlZiwgZXRjIC4uLiB9XHJcbiAgICAgKi9cclxuICAgIGNvbnN0IFt0aGVtZSwgc2V0VGhlbWVdID0gUmVhY3QudXNlU3RhdGUoXCJMaWdodCBNb2RlXCIpO1xyXG5cclxuICAgIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XHJcbiAgICAgICAgbGV0IGV4aXN0aW5nVGhlbWUgPSBsb2NhbFN0b3JhZ2UuZ2V0SXRlbShcInRoZW1lXCIpO1xyXG5cclxuICAgICAgICBpZiAoZXhpc3RpbmdUaGVtZT8ubWF0Y2goL2RhcmsvKSkge1xyXG4gICAgICAgICAgICBzZXRUaGVtZShcIkRhcmsgTW9kZVwiKTtcclxuICAgICAgICB9XHJcbiAgICB9LCBbXSk7XHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE1haW4gRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKi9cclxuICAgIHJldHVybiAoXHJcbiAgICAgICAgPGRpdlxyXG4gICAgICAgICAgICBjbGFzc05hbWU9XCJcIlxyXG4gICAgICAgICAgICBpZD1cInRoZW1lLXNlbGVjdG9yLXdyYXBwZXJcIlxyXG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBncmFwaGljV3JhcHBlciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFxyXG4gICAgICAgICAgICAgICAgICAgIFwidGhlbWUtc2VsZWN0b3ItZ3JhcGhpYy13cmFwcGVyXCJcclxuICAgICAgICAgICAgICAgICk7XHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGV4aXN0aW5nVGhlbWUgPSBsb2NhbFN0b3JhZ2UuZ2V0SXRlbShcInRoZW1lXCIpO1xyXG4gICAgICAgICAgICAgICAgY29uc3Qgc3VuSWNvbiA9IGdyYXBoaWNXcmFwcGVyPy5xdWVyeVNlbGVjdG9yKFwiaW1nLnN1blwiKTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IG1vb25JY29uID0gZ3JhcGhpY1dyYXBwZXI/LnF1ZXJ5U2VsZWN0b3IoXCJpbWcubW9vblwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCFleGlzdGluZ1RoZW1lIHx8IGV4aXN0aW5nVGhlbWU/Lm1hdGNoKC9saWdodC8pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmNsYXNzTmFtZSA9IFwiZGFya1wiO1xyXG4gICAgICAgICAgICAgICAgICAgIGxvY2FsU3RvcmFnZS5zZXRJdGVtKFwidGhlbWVcIiwgXCJkYXJrXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nVGhlbWUgPSBcImRhcmtcIjtcclxuICAgICAgICAgICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHN1bkljb24/LmNsYXNzTGlzdC5hZGQoXCJoaWRkZW5cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgbW9vbkljb24/LmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRkZW5cIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICAgICAgICAgICAgICBncmFwaGljV3JhcHBlcj8uZmlyc3RDaGlsZD8uY2xhc3NMaXN0LmFkZChcIm1sLWF1dG9cIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc2V0VGhlbWUoXCJEYXJrIE1vZGVcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXhpc3RpbmdUaGVtZT8ubWF0Y2goL2RhcmsvKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5jbGFzc05hbWUgPSBcImxpZ2h0XCI7XHJcbiAgICAgICAgICAgICAgICAgICAgbG9jYWxTdG9yYWdlLnNldEl0ZW0oXCJ0aGVtZVwiLCBcImxpZ2h0XCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nVGhlbWUgPSBcImxpZ2h0XCI7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBtb29uSWNvbj8uY2xhc3NMaXN0LmFkZChcImhpZGRlblwiKTtcclxuICAgICAgICAgICAgICAgICAgICBzdW5JY29uPy5jbGFzc0xpc3QucmVtb3ZlKFwiaGlkZGVuXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXHJcbiAgICAgICAgICAgICAgICAgICAgZ3JhcGhpY1dyYXBwZXI/LmZpcnN0Q2hpbGQ/LmNsYXNzTGlzdC5yZW1vdmUoXCJtbC1hdXRvXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHNldFRoZW1lKFwiTGlnaHQgTW9kZVwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAgICAgfX1cclxuICAgICAgICA+XHJcbiAgICAgICAgICAgIDxkaXZcclxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cInAtMSByb3VuZGVkLWZ1bGwgdy0xMiB0cmFuc2l0aW9uLWFsbFwiXHJcbiAgICAgICAgICAgICAgICBpZD1cInRoZW1lLXNlbGVjdG9yLWdyYXBoaWMtd3JhcHBlclwiXHJcbiAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicG9pbnRlci1ldmVudHMtbm9uZSB0cmFuc2l0aW9uLWFsbCBkYXJrOm1sLWF1dG9cIj5cclxuICAgICAgICAgICAgICAgICAgICA8aW1nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyYz1cIi9pbWFnZXMvc3VuLnBuZ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsdD1cIlN1biBJY29uXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg9ezE4fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJzdW4gZGFyazpoaWRkZW5cIlxyXG4gICAgICAgICAgICAgICAgICAgIC8+XHJcbiAgICAgICAgICAgICAgICAgICAgPGltZ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzcmM9XCIvaW1hZ2VzL25ldy1tb29uLnBuZ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsdD1cIlN1biBJY29uXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg9ezE4fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJtb29uIGhpZGRlbiBkYXJrOmZsZXhcIlxyXG4gICAgICAgICAgICAgICAgICAgIC8+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIHsvKiA8c3Bhbj57IHRoZW1lIH08L3NwYW4+ICovfVxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgKTtcclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxufVxyXG4iXSwibmFtZXMiOlsiUmVhY3QiLCJUaGVtZVNlbGVjdG9yIiwicHJvcHMiLCJ0aGVtZSIsInNldFRoZW1lIiwidXNlU3RhdGUiLCJ1c2VFZmZlY3QiLCJleGlzdGluZ1RoZW1lIiwibG9jYWxTdG9yYWdlIiwiZ2V0SXRlbSIsIm1hdGNoIiwiZGl2IiwiY2xhc3NOYW1lIiwiaWQiLCJvbkNsaWNrIiwiZ3JhcGhpY1dyYXBwZXIiLCJkb2N1bWVudCIsImdldEVsZW1lbnRCeUlkIiwic3VuSWNvbiIsInF1ZXJ5U2VsZWN0b3IiLCJtb29uSWNvbiIsImRvY3VtZW50RWxlbWVudCIsInNldEl0ZW0iLCJjbGFzc0xpc3QiLCJhZGQiLCJyZW1vdmUiLCJmaXJzdENoaWxkIiwiaW1nIiwic3JjIiwiYWx0Iiwid2lkdGgiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./components/general/ThemeSelector.jsx\n"); - -/***/ }), - -/***/ "./functions/frontend/fetchApi.js": -/*!****************************************!*\ - !*** ./functions/frontend/fetchApi.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ fetchApi)\n/* harmony export */ });\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Fetch Function\r\n * ==============================================================================\r\n * @async\r\n *\r\n * @param {string} url - Admin or Site page\r\n * @param {{\r\n * method: \"POST\" | \"GET\" | \"DELETE\" | \"PUT\" | \"PATCH\" | \"post\" | \"get\" | \"delete\" | \"put\" | \"patch\",\r\n * body: object | string,\r\n * headers?: HeadersInit,\r\n * } | string} [options] - options object or string: **optional\r\n * @param {boolean} [csrf] - Add CSRF?\r\n *\r\n * @returns {Promise<*>}\r\n */ async function fetchApi(url, options, csrf) {\n /** ********************* Initialize data variable */ let data;\n const finalUrl = url.match(/\\?/) ? url : url + window.location.search;\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n if (typeof options === \"string\") {\n try {\n let fetchData;\n switch(options){\n case \"post\":\n fetchData = await fetch(finalUrl, {\n method: options,\n // @ts-ignore\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-csrf-auth\": csrf ? localStorage.getItem(\"csrf\") : \"\"\n }\n });\n data = fetchData.json();\n break;\n default:\n fetchData = await fetch(finalUrl);\n data = fetchData.json();\n break;\n }\n } catch (error) {\n data = null;\n }\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n } else if (typeof options === \"object\") {\n try {\n let fetchData;\n /** ********************* Convert body to JSON if not JSON */ if (options.body && typeof options.body === \"object\") {\n let oldOptionsBody = options.body;\n options.body = JSON.stringify(oldOptionsBody);\n }\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n if (options.headers) {\n ////////////////////////////////////////\n // @ts-ignore\n options.headers[\"x-csrf-auth\"] = csrf ? localStorage.getItem(\"csrf\") : \"\";\n /** @type {any} */ const finalOptions = {\n ...options\n };\n fetchData = await fetch(finalUrl, finalOptions);\n ////////////////////////////////////////\n } else {\n fetchData = await fetch(finalUrl, {\n ...options,\n // @ts-ignore\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-csrf-auth\": csrf ? localStorage.getItem(\"csrf\") : \"\"\n }\n });\n }\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n data = fetchData.json();\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n } catch (error) {\n data = null;\n }\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n } else {\n try {\n let fetchData = await fetch(finalUrl);\n data = fetchData.json();\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n } catch (error) {\n data = null;\n }\n }\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n return data;\n}\nvar FETCH = fetchApi;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9mdW5jdGlvbnMvZnJvbnRlbmQvZmV0Y2hBcGkuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBLFlBQVk7QUFFWjs7Ozs7Ozs7Ozs7Ozs7O0NBZUMsR0FDYyxlQUFlQSxTQUFTQyxHQUFHLEVBQUVDLE9BQU8sRUFBRUMsSUFBSTtJQUNyRCxtREFBbUQsR0FDbkQsSUFBSUM7SUFDSixNQUFNQyxXQUFXSixJQUFJSyxLQUFLLENBQUMsUUFBUUwsTUFBTUEsTUFBTU0sT0FBT0MsUUFBUSxDQUFDQyxNQUFNO0lBRXJFLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDLElBQUksT0FBT1AsWUFBWSxVQUFVO1FBQzdCLElBQUk7WUFDQSxJQUFJUTtZQUNKLE9BQVFSO2dCQUNKLEtBQUs7b0JBQ0RRLFlBQVksTUFBTUMsTUFBTU4sVUFBVTt3QkFDOUJPLFFBQVFWO3dCQUNSLGFBQWE7d0JBQ2JXLFNBQVM7NEJBQ0wsZ0JBQWdCOzRCQUNoQixlQUFlVixPQUNUVyxhQUFhQyxPQUFPLENBQUMsVUFDckI7d0JBQ1Y7b0JBQ0o7b0JBQ0FYLE9BQU9NLFVBQVVNLElBQUk7b0JBQ3JCO2dCQUVKO29CQUNJTixZQUFZLE1BQU1DLE1BQU1OO29CQUN4QkQsT0FBT00sVUFBVU0sSUFBSTtvQkFDckI7WUFDUjtRQUNKLEVBQUUsT0FBT0MsT0FBTztZQUNaYixPQUFPO1FBQ1g7SUFFQSx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUM1QyxPQUFPLElBQUksT0FBT0YsWUFBWSxVQUFVO1FBQ3BDLElBQUk7WUFDQSxJQUFJUTtZQUVKLDJEQUEyRCxHQUMzRCxJQUFJUixRQUFRZ0IsSUFBSSxJQUFJLE9BQU9oQixRQUFRZ0IsSUFBSSxLQUFLLFVBQVU7Z0JBQ2xELElBQUlDLGlCQUFpQmpCLFFBQVFnQixJQUFJO2dCQUNqQ2hCLFFBQVFnQixJQUFJLEdBQUdFLEtBQUtDLFNBQVMsQ0FBQ0Y7WUFDbEM7WUFFQSx3Q0FBd0M7WUFDeEMsd0NBQXdDO1lBQ3hDLHdDQUF3QztZQUV4QyxJQUFJakIsUUFBUVcsT0FBTyxFQUFFO2dCQUNqQix3Q0FBd0M7Z0JBQ3hDLGFBQWE7Z0JBQ2JYLFFBQVFXLE9BQU8sQ0FBQyxjQUFjLEdBQUdWLE9BQzNCVyxhQUFhQyxPQUFPLENBQUMsVUFDckI7Z0JBRU4sZ0JBQWdCLEdBQ2hCLE1BQU1PLGVBQWU7b0JBQUUsR0FBR3BCLE9BQU87Z0JBQUM7Z0JBQ2xDUSxZQUFZLE1BQU1DLE1BQU1OLFVBQVVpQjtZQUVsQyx3Q0FBd0M7WUFDNUMsT0FBTztnQkFDSFosWUFBWSxNQUFNQyxNQUFNTixVQUFVO29CQUM5QixHQUFHSCxPQUFPO29CQUNWLGFBQWE7b0JBQ2JXLFNBQVM7d0JBQ0wsZ0JBQWdCO3dCQUNoQixlQUFlVixPQUFPVyxhQUFhQyxPQUFPLENBQUMsVUFBVTtvQkFDekQ7Z0JBQ0o7WUFDSjtZQUVBLHdDQUF3QztZQUN4Qyx3Q0FBd0M7WUFDeEMsd0NBQXdDO1lBRXhDWCxPQUFPTSxVQUFVTSxJQUFJO1FBRXJCLHdDQUF3QztRQUN4Qyx3Q0FBd0M7UUFDeEMsd0NBQXdDO1FBQzVDLEVBQUUsT0FBT0MsT0FBTztZQUNaYixPQUFPO1FBQ1g7SUFFQSx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUM1QyxPQUFPO1FBQ0gsSUFBSTtZQUNBLElBQUlNLFlBQVksTUFBTUMsTUFBTU47WUFDNUJELE9BQU9NLFVBQVVNLElBQUk7UUFFckIsd0NBQXdDO1FBQ3hDLHdDQUF3QztRQUN4Qyx3Q0FBd0M7UUFDNUMsRUFBRSxPQUFPQyxPQUFPO1lBQ1piLE9BQU87UUFDWDtJQUNKO0lBRUEsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEMsT0FBT0E7QUFDWDtBQUVBLElBQUltQixRQUFRdkIiLCJzb3VyY2VzIjpbIi9hcHAvZnVuY3Rpb25zL2Zyb250ZW5kL2ZldGNoQXBpLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIEB0cy1jaGVja1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBGZXRjaCBGdW5jdGlvblxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogQGFzeW5jXHJcbiAqXHJcbiAqIEBwYXJhbSB7c3RyaW5nfSB1cmwgLSBBZG1pbiBvciBTaXRlIHBhZ2VcclxuICogQHBhcmFtIHt7XHJcbiAqICBtZXRob2Q6IFwiUE9TVFwiIHwgXCJHRVRcIiB8IFwiREVMRVRFXCIgfCBcIlBVVFwiIHwgXCJQQVRDSFwiIHwgXCJwb3N0XCIgfCBcImdldFwiIHwgXCJkZWxldGVcIiB8IFwicHV0XCIgfCBcInBhdGNoXCIsXHJcbiAqICBib2R5OiBvYmplY3QgfCBzdHJpbmcsXHJcbiAqICBoZWFkZXJzPzogSGVhZGVyc0luaXQsXHJcbiAqIH0gfCBzdHJpbmd9IFtvcHRpb25zXSAtIG9wdGlvbnMgb2JqZWN0IG9yIHN0cmluZzogKipvcHRpb25hbFxyXG4gKiBAcGFyYW0ge2Jvb2xlYW59IFtjc3JmXSAtIEFkZCBDU1JGP1xyXG4gKlxyXG4gKiBAcmV0dXJucyB7UHJvbWlzZTwqPn1cclxuICovXHJcbmV4cG9ydCBkZWZhdWx0IGFzeW5jIGZ1bmN0aW9uIGZldGNoQXBpKHVybCwgb3B0aW9ucywgY3NyZikge1xyXG4gICAgLyoqICoqKioqKioqKioqKioqKioqKioqKiBJbml0aWFsaXplIGRhdGEgdmFyaWFibGUgKi9cclxuICAgIGxldCBkYXRhO1xyXG4gICAgY29uc3QgZmluYWxVcmwgPSB1cmwubWF0Y2goL1xcPy8pID8gdXJsIDogdXJsICsgd2luZG93LmxvY2F0aW9uLnNlYXJjaDtcclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgaWYgKHR5cGVvZiBvcHRpb25zID09PSBcInN0cmluZ1wiKSB7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgbGV0IGZldGNoRGF0YTtcclxuICAgICAgICAgICAgc3dpdGNoIChvcHRpb25zKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIFwicG9zdFwiOlxyXG4gICAgICAgICAgICAgICAgICAgIGZldGNoRGF0YSA9IGF3YWl0IGZldGNoKGZpbmFsVXJsLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogb3B0aW9ucyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIkNvbnRlbnQtVHlwZVwiOiBcImFwcGxpY2F0aW9uL2pzb25cIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwieC1jc3JmLWF1dGhcIjogY3NyZlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbG9jYWxTdG9yYWdlLmdldEl0ZW0oXCJjc3JmXCIpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBcIlwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBmZXRjaERhdGEuanNvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgZmV0Y2hEYXRhID0gYXdhaXQgZmV0Y2goZmluYWxVcmwpO1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBmZXRjaERhdGEuanNvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcclxuICAgICAgICAgICAgZGF0YSA9IG51bGw7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIH0gZWxzZSBpZiAodHlwZW9mIG9wdGlvbnMgPT09IFwib2JqZWN0XCIpIHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBsZXQgZmV0Y2hEYXRhO1xyXG5cclxuICAgICAgICAgICAgLyoqICoqKioqKioqKioqKioqKioqKioqKiBDb252ZXJ0IGJvZHkgdG8gSlNPTiBpZiBub3QgSlNPTiAqL1xyXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5ib2R5ICYmIHR5cGVvZiBvcHRpb25zLmJvZHkgPT09IFwib2JqZWN0XCIpIHtcclxuICAgICAgICAgICAgICAgIGxldCBvbGRPcHRpb25zQm9keSA9IG9wdGlvbnMuYm9keTtcclxuICAgICAgICAgICAgICAgIG9wdGlvbnMuYm9keSA9IEpTT04uc3RyaW5naWZ5KG9sZE9wdGlvbnNCb2R5KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmhlYWRlcnMpIHtcclxuICAgICAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICAgICAgICAgIG9wdGlvbnMuaGVhZGVyc1tcIngtY3NyZi1hdXRoXCJdID0gY3NyZlxyXG4gICAgICAgICAgICAgICAgICAgID8gbG9jYWxTdG9yYWdlLmdldEl0ZW0oXCJjc3JmXCIpXHJcbiAgICAgICAgICAgICAgICAgICAgOiBcIlwiO1xyXG5cclxuICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7YW55fSAqL1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZmluYWxPcHRpb25zID0geyAuLi5vcHRpb25zIH07XHJcbiAgICAgICAgICAgICAgICBmZXRjaERhdGEgPSBhd2FpdCBmZXRjaChmaW5hbFVybCwgZmluYWxPcHRpb25zKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBmZXRjaERhdGEgPSBhd2FpdCBmZXRjaChmaW5hbFVybCwge1xyXG4gICAgICAgICAgICAgICAgICAgIC4uLm9wdGlvbnMsXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgXCJDb250ZW50LVR5cGVcIjogXCJhcHBsaWNhdGlvbi9qc29uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFwieC1jc3JmLWF1dGhcIjogY3NyZiA/IGxvY2FsU3RvcmFnZS5nZXRJdGVtKFwiY3NyZlwiKSA6IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgICAgICAgICAgZGF0YSA9IGZldGNoRGF0YS5qc29uKCk7XHJcblxyXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XHJcbiAgICAgICAgICAgIGRhdGEgPSBudWxsO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgIGxldCBmZXRjaERhdGEgPSBhd2FpdCBmZXRjaChmaW5hbFVybCk7XHJcbiAgICAgICAgICAgIGRhdGEgPSBmZXRjaERhdGEuanNvbigpO1xyXG5cclxuICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xyXG4gICAgICAgICAgICBkYXRhID0gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIHJldHVybiBkYXRhO1xyXG59XHJcblxyXG52YXIgRkVUQ0ggPSBmZXRjaEFwaTtcclxuIl0sIm5hbWVzIjpbImZldGNoQXBpIiwidXJsIiwib3B0aW9ucyIsImNzcmYiLCJkYXRhIiwiZmluYWxVcmwiLCJtYXRjaCIsIndpbmRvdyIsImxvY2F0aW9uIiwic2VhcmNoIiwiZmV0Y2hEYXRhIiwiZmV0Y2giLCJtZXRob2QiLCJoZWFkZXJzIiwibG9jYWxTdG9yYWdlIiwiZ2V0SXRlbSIsImpzb24iLCJlcnJvciIsImJvZHkiLCJvbGRPcHRpb25zQm9keSIsIkpTT04iLCJzdHJpbmdpZnkiLCJmaW5hbE9wdGlvbnMiLCJGRVRDSCJdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./functions/frontend/fetchApi.js\n"); - -/***/ }), - -/***/ "./functions/frontend/updateNavLinks.js": -/*!**********************************************!*\ - !*** ./functions/frontend/updateNavLinks.js ***! - \**********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ updateNavLinks)\n/* harmony export */ });\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n *\r\n * @param {object} param0\r\n * @param {HTMLAnchorElement[] | NodeListOf} [param0.links]\r\n */ async function updateNavLinks({ links }) {\n /** @type {NodeListOf | HTMLAnchorElement[]} */ let navLinks = links ? links : document.querySelectorAll(\"nav a\");\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n if (navLinks) {\n navLinks.forEach((link)=>{\n if (link.dataset.currentlink === window.location.pathname) {\n link.classList.add(\"active\");\n } else if (window.location.pathname.match(new RegExp(`${link.dataset.currentlink}\\\\/.*`)) && !link.dataset.strictlink) {\n link.classList.add(\"active\");\n }\n });\n }\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n const isDbPathValid = window.location.pathname.match(/\\/databases\\/.*/);\n if (isDbPathValid) {\n const links = document.querySelectorAll(\"a\");\n if (links && window.location.search.match(/delegated=true/)) {\n links.forEach((link, index)=>{\n if (!link?.pathname?.match(/databases/)) return;\n link.href = link.pathname + window.location.search;\n });\n }\n }\n} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ \n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9mdW5jdGlvbnMvZnJvbnRlbmQvdXBkYXRlTmF2TGlua3MuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDLEdBRUQsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FFbkY7Ozs7Q0FJQyxHQUNjLGVBQWVBLGVBQWUsRUFBRUMsS0FBSyxFQUFFO0lBQ2xELGdFQUFnRSxHQUNoRSxJQUFJQyxXQUFXRCxRQUFRQSxRQUFRRSxTQUFTQyxnQkFBZ0IsQ0FBQztJQUV6RCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4QyxJQUFJRixVQUFVO1FBQ1ZBLFNBQVNHLE9BQU8sQ0FBQyxDQUFDQztZQUNkLElBQUlBLEtBQUtDLE9BQU8sQ0FBQ0MsV0FBVyxLQUFLQyxPQUFPQyxRQUFRLENBQUNDLFFBQVEsRUFBRTtnQkFDdkRMLEtBQUtNLFNBQVMsQ0FBQ0MsR0FBRyxDQUFDO1lBQ3ZCLE9BQU8sSUFDSEosT0FBT0MsUUFBUSxDQUFDQyxRQUFRLENBQUNHLEtBQUssQ0FDMUIsSUFBSUMsT0FBTyxHQUFHVCxLQUFLQyxPQUFPLENBQUNDLFdBQVcsQ0FBQyxLQUFLLENBQUMsTUFFakQsQ0FBQ0YsS0FBS0MsT0FBTyxDQUFDUyxVQUFVLEVBQzFCO2dCQUNFVixLQUFLTSxTQUFTLENBQUNDLEdBQUcsQ0FBQztZQUN2QjtRQUNKO0lBQ0o7SUFFQSx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4QyxNQUFNSSxnQkFBZ0JSLE9BQU9DLFFBQVEsQ0FBQ0MsUUFBUSxDQUFDRyxLQUFLLENBQUM7SUFFckQsSUFBSUcsZUFBZTtRQUNmLE1BQU1oQixRQUFRRSxTQUFTQyxnQkFBZ0IsQ0FBQztRQUV4QyxJQUFJSCxTQUFTUSxPQUFPQyxRQUFRLENBQUNRLE1BQU0sQ0FBQ0osS0FBSyxDQUFDLG1CQUFtQjtZQUN6RGIsTUFBTUksT0FBTyxDQUFDLENBQUNDLE1BQU1hO2dCQUNqQixJQUFJLENBQUNiLE1BQU1LLFVBQVVHLE1BQU0sY0FBYztnQkFDekNSLEtBQUtjLElBQUksR0FBR2QsS0FBS0ssUUFBUSxHQUFHRixPQUFPQyxRQUFRLENBQUNRLE1BQU07WUFDdEQ7UUFDSjtJQUNKO0FBQ0osRUFFQSxtRkFBbUYsSUFDbkYsbUZBQW1GLElBQ25GLG1GQUFtRixJQUNuRixtRkFBbUYsSUFDbkYsbUZBQW1GLElBQ25GLG1GQUFtRiIsInNvdXJjZXMiOlsiL2FwcC9mdW5jdGlvbnMvZnJvbnRlbmQvdXBkYXRlTmF2TGlua3MuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQHRzLWNoZWNrXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEltcG9ydHNcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqL1xyXG5cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuXHJcbi8qKlxyXG4gKlxyXG4gKiBAcGFyYW0ge29iamVjdH0gcGFyYW0wXHJcbiAqIEBwYXJhbSB7SFRNTEFuY2hvckVsZW1lbnRbXSB8IE5vZGVMaXN0T2Y8SFRNTEFuY2hvckVsZW1lbnQ+fSBbcGFyYW0wLmxpbmtzXVxyXG4gKi9cclxuZXhwb3J0IGRlZmF1bHQgYXN5bmMgZnVuY3Rpb24gdXBkYXRlTmF2TGlua3MoeyBsaW5rcyB9KSB7XHJcbiAgICAvKiogQHR5cGUge05vZGVMaXN0T2Y8SFRNTEFuY2hvckVsZW1lbnQ+IHwgSFRNTEFuY2hvckVsZW1lbnRbXX0gKi9cclxuICAgIGxldCBuYXZMaW5rcyA9IGxpbmtzID8gbGlua3MgOiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFwibmF2IGFcIik7XHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIGlmIChuYXZMaW5rcykge1xyXG4gICAgICAgIG5hdkxpbmtzLmZvckVhY2goKGxpbmspID0+IHtcclxuICAgICAgICAgICAgaWYgKGxpbmsuZGF0YXNldC5jdXJyZW50bGluayA9PT0gd2luZG93LmxvY2F0aW9uLnBhdGhuYW1lKSB7XHJcbiAgICAgICAgICAgICAgICBsaW5rLmNsYXNzTGlzdC5hZGQoXCJhY3RpdmVcIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoXHJcbiAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24ucGF0aG5hbWUubWF0Y2goXHJcbiAgICAgICAgICAgICAgICAgICAgbmV3IFJlZ0V4cChgJHtsaW5rLmRhdGFzZXQuY3VycmVudGxpbmt9XFxcXC8uKmApXHJcbiAgICAgICAgICAgICAgICApICYmXHJcbiAgICAgICAgICAgICAgICAhbGluay5kYXRhc2V0LnN0cmljdGxpbmtcclxuICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICBsaW5rLmNsYXNzTGlzdC5hZGQoXCJhY3RpdmVcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgY29uc3QgaXNEYlBhdGhWYWxpZCA9IHdpbmRvdy5sb2NhdGlvbi5wYXRobmFtZS5tYXRjaCgvXFwvZGF0YWJhc2VzXFwvLiovKTtcclxuXHJcbiAgICBpZiAoaXNEYlBhdGhWYWxpZCkge1xyXG4gICAgICAgIGNvbnN0IGxpbmtzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcImFcIik7XHJcblxyXG4gICAgICAgIGlmIChsaW5rcyAmJiB3aW5kb3cubG9jYXRpb24uc2VhcmNoLm1hdGNoKC9kZWxlZ2F0ZWQ9dHJ1ZS8pKSB7XHJcbiAgICAgICAgICAgIGxpbmtzLmZvckVhY2goKGxpbmssIGluZGV4KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWxpbms/LnBhdGhuYW1lPy5tYXRjaCgvZGF0YWJhc2VzLykpIHJldHVybjtcclxuICAgICAgICAgICAgICAgIGxpbmsuaHJlZiA9IGxpbmsucGF0aG5hbWUgKyB3aW5kb3cubG9jYXRpb24uc2VhcmNoO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbiJdLCJuYW1lcyI6WyJ1cGRhdGVOYXZMaW5rcyIsImxpbmtzIiwibmF2TGlua3MiLCJkb2N1bWVudCIsInF1ZXJ5U2VsZWN0b3JBbGwiLCJmb3JFYWNoIiwibGluayIsImRhdGFzZXQiLCJjdXJyZW50bGluayIsIndpbmRvdyIsImxvY2F0aW9uIiwicGF0aG5hbWUiLCJjbGFzc0xpc3QiLCJhZGQiLCJtYXRjaCIsIlJlZ0V4cCIsInN0cmljdGxpbmsiLCJpc0RiUGF0aFZhbGlkIiwic2VhcmNoIiwiaW5kZXgiLCJocmVmIl0sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./functions/frontend/updateNavLinks.js\n"); - -/***/ }), - -/***/ "./layouts/GeneralLayout.jsx": -/*!***********************************!*\ - !*** ./layouts/GeneralLayout.jsx ***! - \***********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GeneralLayout)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/head */ \"next/head\");\n/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_head__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _functions_frontend_updateNavLinks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/frontend/updateNavLinks */ \"./functions/frontend/updateNavLinks.js\");\n/* harmony import */ var _components_GeneralLayout_Header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/GeneralLayout/Header */ \"./layouts/components/GeneralLayout/Header.jsx\");\n/* harmony import */ var _components_GeneralLayout_Footer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/GeneralLayout/Footer */ \"./layouts/components/GeneralLayout/Footer.jsx\");\n/* harmony import */ var _components_GeneralLayout_ProductionHeadComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/GeneralLayout/ProductionHeadComponent */ \"./layouts/components/GeneralLayout/ProductionHeadComponent.jsx\");\n/* harmony import */ var _components_GeneralLayout_ScrollToTopButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/GeneralLayout/ScrollToTopButton */ \"./layouts/components/GeneralLayout/ScrollToTopButton.jsx\");\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n\n\n\n\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {object} props - React Component Props\r\n * @param {React.ReactNode} props.children - children component\r\n * @param {React.ReactNode} props.head - head Items\r\n * @param {import(\"@/package-shared/types\").UserType | null} [props.user] - user object\r\n * @param {*} [props.productionEnvironment]\r\n * @param {boolean} [props.darkBgHeader]\r\n * @param {boolean} [props.transparentHeader]\r\n */ function GeneralLayout({ children, head, user, productionEnvironment, darkBgHeader, transparentHeader }) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ react__WEBPACK_IMPORTED_MODULE_1___default().useEffect({\n \"GeneralLayout.useEffect\": ()=>{\n (0,_functions_frontend_updateNavLinks__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({});\n }\n }[\"GeneralLayout.useEffect\"], []);\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((next_head__WEBPACK_IMPORTED_MODULE_2___default()), {\n children: head\n }, void 0, false, {\n fileName: \"/app/layouts/GeneralLayout.jsx\",\n lineNumber: 88,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_GeneralLayout_ProductionHeadComponent__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n head: head,\n productionEnvironment: productionEnvironment\n }, void 0, false, {\n fileName: \"/app/layouts/GeneralLayout.jsx\",\n lineNumber: 89,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_GeneralLayout_Header__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n user: user,\n darkBg: darkBgHeader,\n transparent: transparentHeader\n }, void 0, false, {\n fileName: \"/app/layouts/GeneralLayout.jsx\",\n lineNumber: 93,\n columnNumber: 13\n }, this),\n children,\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_GeneralLayout_Footer__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {}, void 0, false, {\n fileName: \"/app/layouts/GeneralLayout.jsx\",\n lineNumber: 99,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_GeneralLayout_ScrollToTopButton__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {}, void 0, false, {\n fileName: \"/app/layouts/GeneralLayout.jsx\",\n lineNumber: 100,\n columnNumber: 13\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/GeneralLayout.jsx\",\n lineNumber: 87,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9sYXlvdXRzL0dlbmVyYWxMYXlvdXQuanN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBQ0c7QUFFN0Isd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFFMEI7QUFDWDtBQUNBO0FBQ2tDO0FBQ1o7QUFFN0UsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FFbkY7Ozs7Ozs7Ozs7O0NBV0MsR0FDYyxTQUFTTyxjQUFjLEVBQ2xDQyxRQUFRLEVBQ1JDLElBQUksRUFDSkMsSUFBSSxFQUNKQyxxQkFBcUIsRUFDckJDLFlBQVksRUFDWkMsaUJBQWlCLEVBQ3BCO0lBQ0c7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBQ0RiLHNEQUFlO21DQUFDO1lBQ1pFLDhFQUFjQSxDQUFDLENBQUM7UUFDcEI7a0NBQUcsRUFBRTtJQUVMLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FDRCxxQkFDSSw4REFBQ0YsdURBQWM7OzBCQUNYLDhEQUFDQyxrREFBSUE7MEJBQUVROzs7Ozs7MEJBQ1AsOERBQUNKLHlGQUF1QkE7Z0JBQ3BCSSxNQUFNQTtnQkFDTkUsdUJBQXVCQTs7Ozs7OzBCQUUzQiw4REFBQ1Isd0VBQU1BO2dCQUNITyxNQUFNQTtnQkFDTk0sUUFBUUo7Z0JBQ1JLLGFBQWFKOzs7Ozs7WUFFaEJMOzBCQUNELDhEQUFDSix3RUFBTUE7Ozs7OzBCQUNQLDhEQUFDRSxtRkFBaUJBOzs7Ozs7Ozs7OztBQUkxQix3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUM1QyIsInNvdXJjZXMiOlsiL2FwcC9sYXlvdXRzL0dlbmVyYWxMYXlvdXQuanN4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIEB0cy1jaGVja1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBJbXBvcnRzXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKi9cclxuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xyXG5pbXBvcnQgSGVhZCBmcm9tIFwibmV4dC9oZWFkXCI7XHJcblxyXG4vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbi8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuaW1wb3J0IHVwZGF0ZU5hdkxpbmtzIGZyb20gXCIuLi9mdW5jdGlvbnMvZnJvbnRlbmQvdXBkYXRlTmF2TGlua3NcIjtcclxuaW1wb3J0IEhlYWRlciBmcm9tIFwiLi9jb21wb25lbnRzL0dlbmVyYWxMYXlvdXQvSGVhZGVyXCI7XHJcbmltcG9ydCBGb290ZXIgZnJvbSBcIi4vY29tcG9uZW50cy9HZW5lcmFsTGF5b3V0L0Zvb3RlclwiO1xyXG5pbXBvcnQgUHJvZHVjdGlvbkhlYWRDb21wb25lbnQgZnJvbSBcIi4vY29tcG9uZW50cy9HZW5lcmFsTGF5b3V0L1Byb2R1Y3Rpb25IZWFkQ29tcG9uZW50XCI7XHJcbmltcG9ydCBTY3JvbGxUb1RvcEJ1dHRvbiBmcm9tIFwiLi9jb21wb25lbnRzL0dlbmVyYWxMYXlvdXQvU2Nyb2xsVG9Ub3BCdXR0b25cIjtcclxuXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIE1haW4gQ29tcG9uZW50IHsgRnVuY3Rpb25hbCB9XHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBAcGFyYW0ge29iamVjdH0gcHJvcHMgLSBSZWFjdCBDb21wb25lbnQgUHJvcHNcclxuICogQHBhcmFtIHtSZWFjdC5SZWFjdE5vZGV9IHByb3BzLmNoaWxkcmVuIC0gY2hpbGRyZW4gY29tcG9uZW50XHJcbiAqIEBwYXJhbSB7UmVhY3QuUmVhY3ROb2RlfSBwcm9wcy5oZWFkIC0gaGVhZCBJdGVtc1xyXG4gKiBAcGFyYW0ge2ltcG9ydChcIkAvcGFja2FnZS1zaGFyZWQvdHlwZXNcIikuVXNlclR5cGUgfCBudWxsfSBbcHJvcHMudXNlcl0gLSB1c2VyIG9iamVjdFxyXG4gKiBAcGFyYW0geyp9IFtwcm9wcy5wcm9kdWN0aW9uRW52aXJvbm1lbnRdXHJcbiAqIEBwYXJhbSB7Ym9vbGVhbn0gW3Byb3BzLmRhcmtCZ0hlYWRlcl1cclxuICogQHBhcmFtIHtib29sZWFufSBbcHJvcHMudHJhbnNwYXJlbnRIZWFkZXJdXHJcbiAqL1xyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBHZW5lcmFsTGF5b3V0KHtcclxuICAgIGNoaWxkcmVuLFxyXG4gICAgaGVhZCxcclxuICAgIHVzZXIsXHJcbiAgICBwcm9kdWN0aW9uRW52aXJvbm1lbnQsXHJcbiAgICBkYXJrQmdIZWFkZXIsXHJcbiAgICB0cmFuc3BhcmVudEhlYWRlcixcclxufSkge1xyXG4gICAgLyoqXHJcbiAgICAgKiBHZXQgQ29udGV4dHNcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyBSZWFjdC51c2VDb250ZXh0IH1cclxuICAgICAqL1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE5vbiBob29rIHZhcmlhYmxlcyBhbmQgZnVuY3Rpb25zXHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZWFjdCBIb29rc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QsIHVzZVJlZiwgZXRjIC4uLiB9XHJcbiAgICAgKi9cclxuICAgIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XHJcbiAgICAgICAgdXBkYXRlTmF2TGlua3Moe30pO1xyXG4gICAgfSwgW10pO1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEZ1bmN0aW9uIFJldHVyblxyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCBNYWluIEZ1bmN0aW9uIFJldHVyblxyXG4gICAgICovXHJcbiAgICByZXR1cm4gKFxyXG4gICAgICAgIDxSZWFjdC5GcmFnbWVudD5cclxuICAgICAgICAgICAgPEhlYWQ+e2hlYWR9PC9IZWFkPlxyXG4gICAgICAgICAgICA8UHJvZHVjdGlvbkhlYWRDb21wb25lbnRcclxuICAgICAgICAgICAgICAgIGhlYWQ9e2hlYWR9XHJcbiAgICAgICAgICAgICAgICBwcm9kdWN0aW9uRW52aXJvbm1lbnQ9e3Byb2R1Y3Rpb25FbnZpcm9ubWVudH1cclxuICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgPEhlYWRlclxyXG4gICAgICAgICAgICAgICAgdXNlcj17dXNlcn1cclxuICAgICAgICAgICAgICAgIGRhcmtCZz17ZGFya0JnSGVhZGVyfVxyXG4gICAgICAgICAgICAgICAgdHJhbnNwYXJlbnQ9e3RyYW5zcGFyZW50SGVhZGVyfVxyXG4gICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICB7Y2hpbGRyZW59XHJcbiAgICAgICAgICAgIDxGb290ZXIgLz5cclxuICAgICAgICAgICAgPFNjcm9sbFRvVG9wQnV0dG9uIC8+XHJcbiAgICAgICAgPC9SZWFjdC5GcmFnbWVudD5cclxuICAgICk7XHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG59XHJcbiJdLCJuYW1lcyI6WyJSZWFjdCIsIkhlYWQiLCJ1cGRhdGVOYXZMaW5rcyIsIkhlYWRlciIsIkZvb3RlciIsIlByb2R1Y3Rpb25IZWFkQ29tcG9uZW50IiwiU2Nyb2xsVG9Ub3BCdXR0b24iLCJHZW5lcmFsTGF5b3V0IiwiY2hpbGRyZW4iLCJoZWFkIiwidXNlciIsInByb2R1Y3Rpb25FbnZpcm9ubWVudCIsImRhcmtCZ0hlYWRlciIsInRyYW5zcGFyZW50SGVhZGVyIiwidXNlRWZmZWN0IiwiRnJhZ21lbnQiLCJkYXJrQmciLCJ0cmFuc3BhcmVudCJdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./layouts/GeneralLayout.jsx\n"); - -/***/ }), - -/***/ "./layouts/components/AdminLayout/AdminUserBlock.jsx": -/*!***********************************************************!*\ - !*** ./layouts/components/AdminLayout/AdminUserBlock.jsx ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ AdminUserBlock)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_general_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../components/general/LoadingBlock */ \"./components/general/LoadingBlock.jsx\");\n/* harmony import */ var _AdminUserDropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../AdminUserDropdown */ \"./layouts/components/AdminUserDropdown.jsx\");\n/* harmony import */ var _components_general_ThemeSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../components/general/ThemeSelector */ \"./components/general/ThemeSelector.jsx\");\n/* harmony import */ var _barrel_optimize_names_ChevronDown_lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! __barrel_optimize__?names=ChevronDown!=!lucide-react */ \"__barrel_optimize__?names=ChevronDown!=!./node_modules/lucide-react/dist/esm/lucide-react.js\");\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n\n\n\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {object} props - React component props\r\n * @param {import(\"@/package-shared/types\").UserType | null} [props.activeUser] - user object\r\n * @param {boolean} [props.noModeSelector] - Add dark mode toggler or not\r\n */ function AdminUserBlock({ activeUser, noModeSelector }) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ if (!activeUser?.logged_in_status) {\n return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {}, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 67,\n columnNumber: 16\n }, this);\n }\n return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2 whitespace-nowrap\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"ml-auto dropdown-wrapper p-0 xl:p-4 hover:bg-slate-100 hidden\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: `/admin/${activeUser?.id}/notifications`,\n className: \"flex items-center justify-center\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: \"/images/notification-icon.svg\",\n alt: \"Notification Icon\",\n width: 20,\n className: \"opacity-50\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 77,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 73,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"dropdown mt-0 xl:-mt-3 gap-2\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"text-slate-400\",\n children: \"Notifications\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 86,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_general_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n position: \"relative\",\n width: \"20px\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 87,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 85,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 72,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"ml-auto dropdown-wrapper\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"avatar\",\n style: {\n width: \"36px\",\n height: \"36px\"\n },\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: activeUser?.image,\n alt: \"User Image\",\n width: 35,\n className: \"w-full h-full object-cover rounded-full\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 96,\n columnNumber: 21\n }, this),\n activeUser?.social_login ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"sub-img\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: (()=>{\n if (activeUser?.social_platform?.match(/facebook/i)) return \"/images/facebook.png\";\n if (activeUser?.social_platform?.match(/google/i)) return \"/images/google.png\";\n if (activeUser?.social_platform?.match(/github/i)) return \"/images/github.png\";\n return \"/images/sharing.png\";\n })(),\n alt: \"\",\n className: \"flex dark:hidden\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 104,\n columnNumber: 29\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: (()=>{\n if (activeUser?.social_platform?.match(/facebook/i)) return \"/images/facebook.png\";\n if (activeUser?.social_platform?.match(/google/i)) return \"/images/google.png\";\n if (activeUser?.social_platform?.match(/github/i)) return \"/images/github-white.png\";\n return \"/images/sharing.png\";\n })(),\n alt: \"\",\n className: \"hidden dark:flex\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 129,\n columnNumber: 29\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 103,\n columnNumber: 25\n }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {}, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 156,\n columnNumber: 25\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 92,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"dark:text-white\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"b\", {\n children: [\n activeUser?.first_name,\n \" \",\n activeUser?.last_name\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 160,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 159,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_ChevronDown_lucide_react__WEBPACK_IMPORTED_MODULE_5__.ChevronDown, {\n size: 20\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 164,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_AdminUserDropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n user: activeUser\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 166,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 91,\n columnNumber: 13\n }, this),\n !noModeSelector && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"ml-2\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_general_ThemeSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {}, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 171,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 170,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminLayout/AdminUserBlock.jsx\",\n lineNumber: 71,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9sYXlvdXRzL2NvbXBvbmVudHMvQWRtaW5MYXlvdXQvQWRtaW5Vc2VyQmxvY2suanN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBRTBDO0FBQ2Y7QUFDaUI7QUFDM0I7QUFFM0MsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FFbkY7Ozs7Ozs7Q0FPQyxHQUNjLFNBQVNLLGVBQWUsRUFBRUMsVUFBVSxFQUFFQyxjQUFjLEVBQUU7SUFDakU7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBRUQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUNELElBQUksQ0FBQ0QsWUFBWUUsa0JBQWtCO1FBQy9CLHFCQUFPLDhEQUFDUix1REFBYzs7Ozs7SUFDMUI7SUFFQSxxQkFDSSw4REFBQ1U7UUFBSUMsV0FBVTs7MEJBQ1gsOERBQUNEO2dCQUFJQyxXQUFVOztrQ0FDWCw4REFBQ0M7d0JBQ0dDLE1BQU0sQ0FBQyxPQUFPLEVBQUVQLFlBQVlRLEdBQUcsY0FBYyxDQUFDO3dCQUM5Q0gsV0FBVTtrQ0FFViw0RUFBQ0k7NEJBQ0dDLEtBQUk7NEJBQ0pDLEtBQUk7NEJBQ0pDLE9BQU87NEJBQ1BQLFdBQVU7Ozs7Ozs7Ozs7O2tDQUlsQiw4REFBQ0Q7d0JBQUlDLFdBQVU7OzBDQUNYLDhEQUFDUTtnQ0FBS1IsV0FBVTswQ0FBaUI7Ozs7OzswQ0FDakMsOERBQUNWLHdFQUFZQTtnQ0FBQ21CLFVBQVM7Z0NBQVdGLE9BQU07Ozs7Ozs7Ozs7Ozs7Ozs7OzswQkFJaEQsOERBQUNSO2dCQUFJQyxXQUFVOztrQ0FDWCw4REFBQ0Q7d0JBQ0dDLFdBQVU7d0JBQ1ZVLE9BQU87NEJBQUVILE9BQU87NEJBQVFJLFFBQVE7d0JBQU87OzBDQUV2Qyw4REFBQ1A7Z0NBQ0dDLEtBQUtWLFlBQVlpQjtnQ0FDakJOLEtBQUk7Z0NBQ0pDLE9BQU87Z0NBQ1BQLFdBQVU7Ozs7Ozs0QkFFYkwsWUFBWWtCLDZCQUNULDhEQUFDZDtnQ0FBSUMsV0FBVTs7a0RBQ1gsOERBQUNJO3dDQUNHQyxLQUFLLENBQUM7NENBQ0YsSUFDSVYsWUFBWW1CLGlCQUFpQkMsTUFDekIsY0FHSixPQUFPOzRDQUNYLElBQ0lwQixZQUFZbUIsaUJBQWlCQyxNQUN6QixZQUdKLE9BQU87NENBQ1gsSUFDSXBCLFlBQVltQixpQkFBaUJDLE1BQ3pCLFlBR0osT0FBTzs0Q0FDWCxPQUFPO3dDQUNYO3dDQUNBVCxLQUFJO3dDQUNKTixXQUFVOzs7Ozs7a0RBRWQsOERBQUNJO3dDQUNHQyxLQUFLLENBQUM7NENBQ0YsSUFDSVYsWUFBWW1CLGlCQUFpQkMsTUFDekIsY0FHSixPQUFPOzRDQUNYLElBQ0lwQixZQUFZbUIsaUJBQWlCQyxNQUN6QixZQUdKLE9BQU87NENBQ1gsSUFDSXBCLFlBQVltQixpQkFBaUJDLE1BQ3pCLFlBR0osT0FBTzs0Q0FDWCxPQUFPO3dDQUNYO3dDQUNBVCxLQUFJO3dDQUNKTixXQUFVOzs7Ozs7Ozs7OztxREFJbEIsOERBQUNYLHVEQUFjOzs7Ozs7Ozs7OztrQ0FHdkIsOERBQUNtQjt3QkFBS1IsV0FBVTtrQ0FDWiw0RUFBQ2dCOztnQ0FDSXJCLFlBQVlzQjtnQ0FBVztnQ0FBRXRCLFlBQVl1Qjs7Ozs7Ozs7Ozs7O2tDQUc5Qyw4REFBQ3pCLHdGQUFXQTt3QkFBQzBCLE1BQU07Ozs7OztrQ0FFbkIsOERBQUM1QiwwREFBaUJBO3dCQUFDNkIsTUFBTXpCOzs7Ozs7Ozs7Ozs7WUFHNUIsQ0FBQ0MsZ0NBQ0UsOERBQUNHO2dCQUFJQyxXQUFVOzBCQUNYLDRFQUFDUix5RUFBYUE7Ozs7Ozs7Ozs7Ozs7Ozs7QUFNOUIsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDNUMiLCJzb3VyY2VzIjpbIi9hcHAvbGF5b3V0cy9jb21wb25lbnRzL0FkbWluTGF5b3V0L0FkbWluVXNlckJsb2NrLmpzeCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAdHMtY2hlY2tcclxuXHJcbi8qKlxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogSW1wb3J0c1xyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICovXHJcbmltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcclxuXHJcbmltcG9ydCBMb2FkaW5nQmxvY2sgZnJvbSBcIi4uLy4uLy4uL2NvbXBvbmVudHMvZ2VuZXJhbC9Mb2FkaW5nQmxvY2tcIjtcclxuaW1wb3J0IEFkbWluVXNlckRyb3Bkb3duIGZyb20gXCIuLi9BZG1pblVzZXJEcm9wZG93blwiO1xyXG5pbXBvcnQgVGhlbWVTZWxlY3RvciBmcm9tIFwiLi4vLi4vLi4vY29tcG9uZW50cy9nZW5lcmFsL1RoZW1lU2VsZWN0b3JcIjtcclxuaW1wb3J0IHsgQ2hldnJvbkRvd24gfSBmcm9tIFwibHVjaWRlLXJlYWN0XCI7XHJcblxyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBNYWluIENvbXBvbmVudCB7IEZ1bmN0aW9uYWwgfVxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogQHBhcmFtIHtvYmplY3R9IHByb3BzIC0gUmVhY3QgY29tcG9uZW50IHByb3BzXHJcbiAqIEBwYXJhbSB7aW1wb3J0KFwiQC9wYWNrYWdlLXNoYXJlZC90eXBlc1wiKS5Vc2VyVHlwZSB8IG51bGx9IFtwcm9wcy5hY3RpdmVVc2VyXSAtIHVzZXIgb2JqZWN0XHJcbiAqIEBwYXJhbSB7Ym9vbGVhbn0gW3Byb3BzLm5vTW9kZVNlbGVjdG9yXSAtIEFkZCBkYXJrIG1vZGUgdG9nZ2xlciBvciBub3RcclxuICovXHJcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIEFkbWluVXNlckJsb2NrKHsgYWN0aXZlVXNlciwgbm9Nb2RlU2VsZWN0b3IgfSkge1xyXG4gICAgLyoqXHJcbiAgICAgKiBHZXQgQ29udGV4dHNcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyBSZWFjdC51c2VDb250ZXh0IH1cclxuICAgICAqL1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE5vbiBob29rIHZhcmlhYmxlcyBhbmQgZnVuY3Rpb25zXHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZWFjdCBIb29rc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QsIHVzZVJlZiwgZXRjIC4uLiB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgTWFpbiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqL1xyXG4gICAgaWYgKCFhY3RpdmVVc2VyPy5sb2dnZWRfaW5fc3RhdHVzKSB7XHJcbiAgICAgICAgcmV0dXJuIDxSZWFjdC5GcmFnbWVudD48L1JlYWN0LkZyYWdtZW50PjtcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gKFxyXG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZ2FwLTIgZmxleC1jb2wtcmV2ZXJzZSB4bDpmbGV4LXJvdyBnYXAteS02IHctZnVsbCB4bDp3LWF1dG8gcHktMiB3aGl0ZXNwYWNlLW5vd3JhcFwiPlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cIm1sLWF1dG8gZHJvcGRvd24td3JhcHBlciBwLTAgeGw6cC00IGhvdmVyOmJnLXNsYXRlLTEwMCBoaWRkZW5cIj5cclxuICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgaHJlZj17YC9hZG1pbi8ke2FjdGl2ZVVzZXI/LmlkfS9ub3RpZmljYXRpb25zYH1cclxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJmbGV4IGl0ZW1zLWNlbnRlciBqdXN0aWZ5LWNlbnRlclwiXHJcbiAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgPGltZ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzcmM9XCIvaW1hZ2VzL25vdGlmaWNhdGlvbi1pY29uLnN2Z1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsdD1cIk5vdGlmaWNhdGlvbiBJY29uXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg9ezIwfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJvcGFjaXR5LTUwXCJcclxuICAgICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgPC9hPlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZHJvcGRvd24gbXQtMCB4bDotbXQtMyBnYXAtMlwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT1cInRleHQtc2xhdGUtNDAwXCI+Tm90aWZpY2F0aW9uczwvc3Bhbj5cclxuICAgICAgICAgICAgICAgICAgICA8TG9hZGluZ0Jsb2NrIHBvc2l0aW9uPVwicmVsYXRpdmVcIiB3aWR0aD1cIjIwcHhcIiAvPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJtbC1hdXRvIGRyb3Bkb3duLXdyYXBwZXJcIj5cclxuICAgICAgICAgICAgICAgIDxkaXZcclxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJhdmF0YXJcIlxyXG4gICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7IHdpZHRoOiBcIjM2cHhcIiwgaGVpZ2h0OiBcIjM2cHhcIiB9fVxyXG4gICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgIDxpbWdcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3JjPXthY3RpdmVVc2VyPy5pbWFnZX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgYWx0PVwiVXNlciBJbWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoPXszNX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbCBvYmplY3QtY292ZXIgcm91bmRlZC1mdWxsXCJcclxuICAgICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgICAgIHthY3RpdmVVc2VyPy5zb2NpYWxfbG9naW4gPyAoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwic3ViLWltZ1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGltZ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyYz17KCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlVXNlcj8uc29jaWFsX3BsYXRmb3JtPy5tYXRjaChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvZmFjZWJvb2svaVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCIvaW1hZ2VzL2ZhY2Vib29rLnBuZ1wiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVVc2VyPy5zb2NpYWxfcGxhdGZvcm0/Lm1hdGNoKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC9nb29nbGUvaVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCIvaW1hZ2VzL2dvb2dsZS5wbmdcIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlVXNlcj8uc29jaWFsX3BsYXRmb3JtPy5tYXRjaChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvZ2l0aHViL2lcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiL2ltYWdlcy9naXRodWIucG5nXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcIi9pbWFnZXMvc2hhcmluZy5wbmdcIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSgpfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdD1cIlwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiZmxleCBkYXJrOmhpZGRlblwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGltZ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyYz17KCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlVXNlcj8uc29jaWFsX3BsYXRmb3JtPy5tYXRjaChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvZmFjZWJvb2svaVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCIvaW1hZ2VzL2ZhY2Vib29rLnBuZ1wiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVVc2VyPy5zb2NpYWxfcGxhdGZvcm0/Lm1hdGNoKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC9nb29nbGUvaVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCIvaW1hZ2VzL2dvb2dsZS5wbmdcIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlVXNlcj8uc29jaWFsX3BsYXRmb3JtPy5tYXRjaChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvZ2l0aHViL2lcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiL2ltYWdlcy9naXRodWItd2hpdGUucG5nXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcIi9pbWFnZXMvc2hhcmluZy5wbmdcIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSgpfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdD1cIlwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiaGlkZGVuIGRhcms6ZmxleFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICApIDogKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8UmVhY3QuRnJhZ21lbnQ+PC9SZWFjdC5GcmFnbWVudD5cclxuICAgICAgICAgICAgICAgICAgICApfVxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9XCJkYXJrOnRleHQtd2hpdGVcIj5cclxuICAgICAgICAgICAgICAgICAgICA8Yj5cclxuICAgICAgICAgICAgICAgICAgICAgICAge2FjdGl2ZVVzZXI/LmZpcnN0X25hbWV9IHthY3RpdmVVc2VyPy5sYXN0X25hbWV9XHJcbiAgICAgICAgICAgICAgICAgICAgPC9iPlxyXG4gICAgICAgICAgICAgICAgPC9zcGFuPlxyXG4gICAgICAgICAgICAgICAgPENoZXZyb25Eb3duIHNpemU9ezIwfSAvPlxyXG5cclxuICAgICAgICAgICAgICAgIDxBZG1pblVzZXJEcm9wZG93biB1c2VyPXthY3RpdmVVc2VyfSAvPlxyXG4gICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgIHshbm9Nb2RlU2VsZWN0b3IgJiYgKFxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJtbC0yXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPFRoZW1lU2VsZWN0b3IgLz5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICApfVxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgKTtcclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbn1cclxuIl0sIm5hbWVzIjpbIlJlYWN0IiwiTG9hZGluZ0Jsb2NrIiwiQWRtaW5Vc2VyRHJvcGRvd24iLCJUaGVtZVNlbGVjdG9yIiwiQ2hldnJvbkRvd24iLCJBZG1pblVzZXJCbG9jayIsImFjdGl2ZVVzZXIiLCJub01vZGVTZWxlY3RvciIsImxvZ2dlZF9pbl9zdGF0dXMiLCJGcmFnbWVudCIsImRpdiIsImNsYXNzTmFtZSIsImEiLCJocmVmIiwiaWQiLCJpbWciLCJzcmMiLCJhbHQiLCJ3aWR0aCIsInNwYW4iLCJwb3NpdGlvbiIsInN0eWxlIiwiaGVpZ2h0IiwiaW1hZ2UiLCJzb2NpYWxfbG9naW4iLCJzb2NpYWxfcGxhdGZvcm0iLCJtYXRjaCIsImIiLCJmaXJzdF9uYW1lIiwibGFzdF9uYW1lIiwic2l6ZSIsInVzZXIiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./layouts/components/AdminLayout/AdminUserBlock.jsx\n"); - -/***/ }), - -/***/ "./layouts/components/AdminUserDropdown.jsx": -/*!**************************************************!*\ - !*** ./layouts/components/AdminUserDropdown.jsx ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ AdminUserDropdown)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _barrel_optimize_names_CircleGauge_lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! __barrel_optimize__?names=CircleGauge!=!lucide-react */ \"__barrel_optimize__?names=CircleGauge!=!./node_modules/lucide-react/dist/esm/lucide-react.js\");\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * Admin User Dropdown\r\n * ==============================================================================\r\n * @param {object} props\r\n * @param {import(\"@/package-shared/types\").UserType} props.user\r\n */ function AdminUserDropdown({ user }) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"dropdown right-aligned\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/admin\",\n className: \"button outlined gray more-padding relative z-20 mb-2\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_CircleGauge_lucide_react__WEBPACK_IMPORTED_MODULE_2__.CircleGauge, {\n size: 18,\n className: \"mr-1\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 66,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n children: \"Dashboard\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 67,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 62,\n columnNumber: 13\n }, this),\n true && user?.id ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"p-2 bg-slate-100 w-full justify-center items-center rounded\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"text-slate-500\",\n children: \"User ID:\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 71,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"b\", {\n children: user.id\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 72,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 70,\n columnNumber: 17\n }, this) : null,\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: `/admin/${user?.id}/settings`,\n className: \"button plain-text more-padding normal-weight\",\n children: \"Settings\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 75,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/logout\",\n className: \"button plain-text more-padding normal-weight\",\n children: \"Logout\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 81,\n columnNumber: 13\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/AdminUserDropdown.jsx\",\n lineNumber: 61,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9sYXlvdXRzL2NvbXBvbmVudHMvQWRtaW5Vc2VyRHJvcGRvd24uanN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBQ2lCO0FBRTNDLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBRW5GOzs7OztDQUtDLEdBQ2MsU0FBU0Usa0JBQWtCLEVBQUVDLElBQUksRUFBRTtJQUM5Qzs7OztLQUlDLEdBRUQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBQ0QscUJBQ0ksOERBQUNDO1FBQUlDLFdBQVU7OzBCQUNYLDhEQUFDQztnQkFDR0MsTUFBSztnQkFDTEYsV0FBVTs7a0NBRVYsOERBQUNKLHdGQUFXQTt3QkFBQ08sTUFBTTt3QkFBSUgsV0FBVTs7Ozs7O2tDQUNqQyw4REFBQ0k7a0NBQUs7Ozs7Ozs7Ozs7OztZQW5DVSxLQXFDa0IsSUFBSU4sTUFBTU8sbUJBQzVDLDhEQUFDTjtnQkFBSUMsV0FBVTs7a0NBQ1gsOERBQUNJO3dCQUFLSixXQUFVO2tDQUFpQjs7Ozs7O2tDQUNqQyw4REFBQ007a0NBQUdSLEtBQUtPLEVBQUU7Ozs7Ozs7Ozs7O3VCQUVmOzBCQUNKLDhEQUFDSjtnQkFDR0MsTUFBTSxDQUFDLE9BQU8sRUFBRUosTUFBTU8sR0FBRyxTQUFTLENBQUM7Z0JBQ25DTCxXQUFVOzBCQUNiOzs7Ozs7MEJBR0QsOERBQUNDO2dCQUNHQyxNQUFLO2dCQUNMRixXQUFVOzBCQUNiOzs7Ozs7Ozs7Ozs7QUFLVCx3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUM1QyIsInNvdXJjZXMiOlsiL2FwcC9sYXlvdXRzL2NvbXBvbmVudHMvQWRtaW5Vc2VyRHJvcGRvd24uanN4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIEB0cy1jaGVja1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBJbXBvcnRzXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKi9cclxuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xyXG5pbXBvcnQgeyBDaXJjbGVHYXVnZSB9IGZyb20gXCJsdWNpZGUtcmVhY3RcIjtcclxuXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcblxyXG4vKipcclxuICogQWRtaW4gVXNlciBEcm9wZG93blxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogQHBhcmFtIHtvYmplY3R9IHByb3BzXHJcbiAqIEBwYXJhbSB7aW1wb3J0KFwiQC9wYWNrYWdlLXNoYXJlZC90eXBlc1wiKS5Vc2VyVHlwZX0gcHJvcHMudXNlclxyXG4gKi9cclxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gQWRtaW5Vc2VyRHJvcGRvd24oeyB1c2VyIH0pIHtcclxuICAgIC8qKlxyXG4gICAgICogR2V0IENvbnRleHRzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IHsgUmVhY3QudXNlQ29udGV4dCB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBKYXZhc2NyaXB0IFZhcmlhYmxlc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCBOb24gaG9vayB2YXJpYWJsZXMgYW5kIGZ1bmN0aW9uc1xyXG4gICAgICovXHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogUmVhY3QgSG9va3NcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyB1c2VTdGF0ZSwgdXNlRWZmZWN0LCB1c2VSZWYsIGV0YyAuLi4gfVxyXG4gICAgICovXHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE1haW4gRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKi9cclxuICAgIHJldHVybiAoXHJcbiAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJkcm9wZG93biByaWdodC1hbGlnbmVkXCI+XHJcbiAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICBocmVmPVwiL2FkbWluXCJcclxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImJ1dHRvbiBvdXRsaW5lZCBncmF5IG1vcmUtcGFkZGluZyByZWxhdGl2ZSB6LTIwIG1iLTJcIlxyXG4gICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICA8Q2lyY2xlR2F1Z2Ugc2l6ZT17MTh9IGNsYXNzTmFtZT1cIm1yLTFcIiAvPlxyXG4gICAgICAgICAgICAgICAgPHNwYW4+RGFzaGJvYXJkPC9zcGFuPlxyXG4gICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgIHtwcm9jZXNzLmVudi5OT0RFX0VOViA9PSBcImRldmVsb3BtZW50XCIgJiYgdXNlcj8uaWQgPyAoXHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInAtMiBiZy1zbGF0ZS0xMDAgdy1mdWxsIGp1c3RpZnktY2VudGVyIGl0ZW1zLWNlbnRlciByb3VuZGVkXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwidGV4dC1zbGF0ZS01MDBcIj5Vc2VyIElEOjwvc3Bhbj5cclxuICAgICAgICAgICAgICAgICAgICA8Yj57dXNlci5pZH08L2I+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgKSA6IG51bGx9XHJcbiAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICBocmVmPXtgL2FkbWluLyR7dXNlcj8uaWR9L3NldHRpbmdzYH1cclxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImJ1dHRvbiBwbGFpbi10ZXh0IG1vcmUtcGFkZGluZyBub3JtYWwtd2VpZ2h0XCJcclxuICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgU2V0dGluZ3NcclxuICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICA8YVxyXG4gICAgICAgICAgICAgICAgaHJlZj1cIi9sb2dvdXRcIlxyXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiYnV0dG9uIHBsYWluLXRleHQgbW9yZS1wYWRkaW5nIG5vcm1hbC13ZWlnaHRcIlxyXG4gICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICBMb2dvdXRcclxuICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgKTtcclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxufVxyXG4iXSwibmFtZXMiOlsiUmVhY3QiLCJDaXJjbGVHYXVnZSIsIkFkbWluVXNlckRyb3Bkb3duIiwidXNlciIsImRpdiIsImNsYXNzTmFtZSIsImEiLCJocmVmIiwic2l6ZSIsInNwYW4iLCJpZCIsImIiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./layouts/components/AdminUserDropdown.jsx\n"); - -/***/ }), - -/***/ "./layouts/components/GeneralLayout/Footer.jsx": -/*!*****************************************************!*\ - !*** ./layouts/components/GeneralLayout/Footer.jsx ***! - \*****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Footer)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_general_Logo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../components/general/Logo */ \"./components/general/Logo.jsx\");\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {object} props - React component props\r\n */ function Footer(props) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"footer\", {\n className: \"p-8 md:p-10 w-full flex flex-col items-center\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"main-container items-start justify-between gap-6 flex-wrap flex-col md:flex-row pt-6\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex flex-col items-start gap-6\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_general_Logo__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {}, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 64,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"font-normal max-w-sm text-sm text-left\",\n children: \"Datasquirel is a fast efficient cloud-based data store that takes away the entire hassle of data management.\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 65,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 63,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex-col items-start\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h4\", {\n className: \"m-0\",\n children: \"Features\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 72,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/database-reference/data-types\",\n className: \"text-slate-600\",\n children: \"Database Schema\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 73,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/database-reference/querying-data\",\n className: \"text-slate-600\",\n children: \"SQL Queries\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 79,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/gui-reference/upload-media\",\n className: \"text-slate-600\",\n children: \"Media Storage\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 85,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 71,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex-col items-start\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h4\", {\n className: \"m-0\",\n children: \"Docs\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 94,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/quick-start\",\n className: \"text-slate-600\",\n children: \"Quick Start Guide\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 95,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/api-reference\",\n className: \"text-slate-600\",\n children: \"API Guide\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 98,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/gui-reference\",\n className: \"text-slate-600\",\n children: \"GUI Interface\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 101,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 93,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex-col items-start\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h4\", {\n className: \"m-0\",\n children: \"Company\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 107,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/about\",\n className: \"text-slate-600\",\n children: \"About Us\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 108,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/terms\",\n className: \"text-slate-600\",\n children: \"Terms and Conditions\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 111,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/privacy\",\n className: \"text-slate-600\",\n children: \"Privacy Policy\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 114,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 106,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 62,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"hr\", {\n className: \"my-10\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 119,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"container\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"text-sm text-slate-400 dark:text-slate-600\",\n children: [\n new Date().getFullYear(),\n \" \\xa9 Datasquirel. All rights reserved.\"\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 121,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 120,\n columnNumber: 13\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Footer.jsx\",\n lineNumber: 61,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9sYXlvdXRzL2NvbXBvbmVudHMvR2VuZXJhbExheW91dC9Gb290ZXIuanN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBQzBCO0FBRXBELG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBRW5GOzs7OztDQUtDLEdBQ2MsU0FBU0UsT0FBT0MsS0FBSztJQUNoQzs7OztLQUlDLEdBRUQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBQ0QscUJBQ0ksOERBQUNDO1FBQU9DLFdBQVU7OzBCQUNkLDhEQUFDQztnQkFBSUQsV0FBVTs7a0NBQ1gsOERBQUNDO3dCQUFJRCxXQUFVOzswQ0FDWCw4REFBQ0osZ0VBQUlBOzs7OzswQ0FDTCw4REFBQ007Z0NBQUtGLFdBQVU7MENBQXlDOzs7Ozs7Ozs7Ozs7a0NBTTdELDhEQUFDQzt3QkFBSUQsV0FBVTs7MENBQ1gsOERBQUNHO2dDQUFHSCxXQUFVOzBDQUFNOzs7Ozs7MENBQ3BCLDhEQUFDSTtnQ0FDR0MsTUFBSztnQ0FDTEwsV0FBVTswQ0FDYjs7Ozs7OzBDQUdELDhEQUFDSTtnQ0FDR0MsTUFBSztnQ0FDTEwsV0FBVTswQ0FDYjs7Ozs7OzBDQUdELDhEQUFDSTtnQ0FDR0MsTUFBSztnQ0FDTEwsV0FBVTswQ0FDYjs7Ozs7Ozs7Ozs7O2tDQUtMLDhEQUFDQzt3QkFBSUQsV0FBVTs7MENBQ1gsOERBQUNHO2dDQUFHSCxXQUFVOzBDQUFNOzs7Ozs7MENBQ3BCLDhEQUFDSTtnQ0FBRUMsTUFBSztnQ0FBb0JMLFdBQVU7MENBQWlCOzs7Ozs7MENBR3ZELDhEQUFDSTtnQ0FBRUMsTUFBSztnQ0FBc0JMLFdBQVU7MENBQWlCOzs7Ozs7MENBR3pELDhEQUFDSTtnQ0FBRUMsTUFBSztnQ0FBc0JMLFdBQVU7MENBQWlCOzs7Ozs7Ozs7Ozs7a0NBSzdELDhEQUFDQzt3QkFBSUQsV0FBVTs7MENBQ1gsOERBQUNHO2dDQUFHSCxXQUFVOzBDQUFNOzs7Ozs7MENBQ3BCLDhEQUFDSTtnQ0FBRUMsTUFBSztnQ0FBU0wsV0FBVTswQ0FBaUI7Ozs7OzswQ0FHNUMsOERBQUNJO2dDQUFFQyxNQUFLO2dDQUFTTCxXQUFVOzBDQUFpQjs7Ozs7OzBDQUc1Qyw4REFBQ0k7Z0NBQUVDLE1BQUs7Z0NBQVdMLFdBQVU7MENBQWlCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7MEJBS3RELDhEQUFDTTtnQkFBR04sV0FBVTs7Ozs7OzBCQUNkLDhEQUFDQztnQkFBSUQsV0FBVTswQkFDWCw0RUFBQ0U7b0JBQUtGLFdBQVU7O3dCQUNYLElBQUlPLE9BQU9DLFdBQVc7d0JBQUc7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQU0xQyx3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUM1QyIsInNvdXJjZXMiOlsiL2FwcC9sYXlvdXRzL2NvbXBvbmVudHMvR2VuZXJhbExheW91dC9Gb290ZXIuanN4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIEB0cy1jaGVja1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBJbXBvcnRzXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKi9cclxuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xyXG5pbXBvcnQgTG9nbyBmcm9tIFwiLi4vLi4vLi4vY29tcG9uZW50cy9nZW5lcmFsL0xvZ29cIjtcclxuXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIE1haW4gQ29tcG9uZW50IHsgRnVuY3Rpb25hbCB9XHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBAcGFyYW0ge29iamVjdH0gcHJvcHMgLSBSZWFjdCBjb21wb25lbnQgcHJvcHNcclxuICovXHJcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIEZvb3Rlcihwcm9wcykge1xyXG4gICAgLyoqXHJcbiAgICAgKiBHZXQgQ29udGV4dHNcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyBSZWFjdC51c2VDb250ZXh0IH1cclxuICAgICAqL1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE5vbiBob29rIHZhcmlhYmxlcyBhbmQgZnVuY3Rpb25zXHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZWFjdCBIb29rc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QsIHVzZVJlZiwgZXRjIC4uLiB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgTWFpbiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqL1xyXG4gICAgcmV0dXJuIChcclxuICAgICAgICA8Zm9vdGVyIGNsYXNzTmFtZT1cInAtOCBtZDpwLTEwIHctZnVsbCBmbGV4IGZsZXgtY29sIGl0ZW1zLWNlbnRlclwiPlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cIm1haW4tY29udGFpbmVyIGl0ZW1zLXN0YXJ0IGp1c3RpZnktYmV0d2VlbiBnYXAtNiBmbGV4LXdyYXAgZmxleC1jb2wgbWQ6ZmxleC1yb3cgcHQtNlwiPlxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtY29sIGl0ZW1zLXN0YXJ0IGdhcC02XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPExvZ28gLz5cclxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9XCJmb250LW5vcm1hbCBtYXgtdy1zbSB0ZXh0LXNtIHRleHQtbGVmdFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBEYXRhc3F1aXJlbCBpcyBhIGZhc3QgZWZmaWNpZW50IGNsb3VkLWJhc2VkIGRhdGEgc3RvcmVcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhhdCB0YWtlcyBhd2F5IHRoZSBlbnRpcmUgaGFzc2xlIG9mIGRhdGEgbWFuYWdlbWVudC5cclxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImZsZXgtY29sIGl0ZW1zLXN0YXJ0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGg0IGNsYXNzTmFtZT1cIm0tMFwiPkZlYXR1cmVzPC9oND5cclxuICAgICAgICAgICAgICAgICAgICA8YVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBocmVmPVwiL2RvY3MvZGF0YWJhc2UtcmVmZXJlbmNlL2RhdGEtdHlwZXNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ0ZXh0LXNsYXRlLTYwMFwiXHJcbiAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBEYXRhYmFzZSBTY2hlbWFcclxuICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgPGFcclxuICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9kb2NzL2RhdGFiYXNlLXJlZmVyZW5jZS9xdWVyeWluZy1kYXRhXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidGV4dC1zbGF0ZS02MDBcIlxyXG4gICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICAgICAgU1FMIFF1ZXJpZXNcclxuICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgPGFcclxuICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9kb2NzL2d1aS1yZWZlcmVuY2UvdXBsb2FkLW1lZGlhXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidGV4dC1zbGF0ZS02MDBcIlxyXG4gICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICAgICAgTWVkaWEgU3RvcmFnZVxyXG4gICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleC1jb2wgaXRlbXMtc3RhcnRcIj5cclxuICAgICAgICAgICAgICAgICAgICA8aDQgY2xhc3NOYW1lPVwibS0wXCI+RG9jczwvaDQ+XHJcbiAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIi9kb2NzL3F1aWNrLXN0YXJ0XCIgY2xhc3NOYW1lPVwidGV4dC1zbGF0ZS02MDBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgUXVpY2sgU3RhcnQgR3VpZGVcclxuICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIi9kb2NzL2FwaS1yZWZlcmVuY2VcIiBjbGFzc05hbWU9XCJ0ZXh0LXNsYXRlLTYwMFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBBUEkgR3VpZGVcclxuICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIi9kb2NzL2d1aS1yZWZlcmVuY2VcIiBjbGFzc05hbWU9XCJ0ZXh0LXNsYXRlLTYwMFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBHVUkgSW50ZXJmYWNlXHJcbiAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4LWNvbCBpdGVtcy1zdGFydFwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxoNCBjbGFzc05hbWU9XCJtLTBcIj5Db21wYW55PC9oND5cclxuICAgICAgICAgICAgICAgICAgICA8YSBocmVmPVwiL2Fib3V0XCIgY2xhc3NOYW1lPVwidGV4dC1zbGF0ZS02MDBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgQWJvdXQgVXNcclxuICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIi90ZXJtc1wiIGNsYXNzTmFtZT1cInRleHQtc2xhdGUtNjAwXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFRlcm1zIGFuZCBDb25kaXRpb25zXHJcbiAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9XCIvcHJpdmFjeVwiIGNsYXNzTmFtZT1cInRleHQtc2xhdGUtNjAwXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFByaXZhY3kgUG9saWN5XHJcbiAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICA8aHIgY2xhc3NOYW1lPVwibXktMTBcIiAvPlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImNvbnRhaW5lclwiPlxyXG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwidGV4dC1zbSB0ZXh0LXNsYXRlLTQwMCBkYXJrOnRleHQtc2xhdGUtNjAwXCI+XHJcbiAgICAgICAgICAgICAgICAgICAge25ldyBEYXRlKCkuZ2V0RnVsbFllYXIoKX0gwqkgRGF0YXNxdWlyZWwuIEFsbCByaWdodHNcclxuICAgICAgICAgICAgICAgICAgICByZXNlcnZlZC5cclxuICAgICAgICAgICAgICAgIDwvc3Bhbj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgPC9mb290ZXI+XHJcbiAgICApO1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG59XHJcbiJdLCJuYW1lcyI6WyJSZWFjdCIsIkxvZ28iLCJGb290ZXIiLCJwcm9wcyIsImZvb3RlciIsImNsYXNzTmFtZSIsImRpdiIsInNwYW4iLCJoNCIsImEiLCJocmVmIiwiaHIiLCJEYXRlIiwiZ2V0RnVsbFllYXIiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./layouts/components/GeneralLayout/Footer.jsx\n"); - -/***/ }), - -/***/ "./layouts/components/GeneralLayout/Header.jsx": -/*!*****************************************************!*\ - !*** ./layouts/components/GeneralLayout/Header.jsx ***! - \*****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Header)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_general_ThemeSelector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../components/general/ThemeSelector */ \"./components/general/ThemeSelector.jsx\");\n/* harmony import */ var _components_general_Logo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../components/general/Logo */ \"./components/general/Logo.jsx\");\n/* harmony import */ var _AdminLayout_AdminUserBlock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../AdminLayout/AdminUserBlock */ \"./layouts/components/AdminLayout/AdminUserBlock.jsx\");\n/* harmony import */ var _barrel_optimize_names_ChevronDown_lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! __barrel_optimize__?names=ChevronDown!=!lucide-react */ \"__barrel_optimize__?names=ChevronDown!=!./node_modules/lucide-react/dist/esm/lucide-react.js\");\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n\n\n\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {object} props - React component props\r\n * @param {import(\"@/package-shared/types\").UserType | null} [props.user]\r\n * @param {boolean} [props.darkBg]\r\n * @param {boolean} [props.transparent]\r\n */ function Header({ user, darkBg, transparent }) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ const [activeUser, setActiveUser] = react__WEBPACK_IMPORTED_MODULE_1___default().useState(user?.logged_in_status ? user : null);\n // const [activeUser, setActiveUser] = React.useState(user);\n react__WEBPACK_IMPORTED_MODULE_1___default().useEffect({\n \"Header.useEffect\": ()=>{\n /** @type {*} */ const mainNavWrapper = document.getElementById(\"main-nav-content-wrapper\");\n window.addEventListener(\"click\", {\n \"Header.useEffect\": (e)=>{\n /** @type {*} */ const clickTarget = e.target;\n if (clickTarget?.closest(\"#main-nav-content-wrapper\") || clickTarget?.closest(\"#main-header-hamburger-button\")) return;\n if (!mainNavWrapper.classList.contains(\"hidden\")) {\n mainNavWrapper.classList.add(\"hidden\");\n }\n }\n }[\"Header.useEffect\"]);\n const navLinks = document.querySelectorAll(\"nav a\");\n navLinks.forEach({\n \"Header.useEffect\": (/** @type {HTMLAnchorElement | *} */ link)=>{\n if (link.pathname === window.location.pathname) {\n if (link.href.match(/#/) || link.pathname.match(/http/)) return;\n link.classList.add(\"active-page-link\");\n }\n }\n }[\"Header.useEffect\"]);\n }\n }[\"Header.useEffect\"], []);\n react__WEBPACK_IMPORTED_MODULE_1___default().useEffect({\n \"Header.useEffect\": ()=>{\n if (user?.logged_in_status) {\n setActiveUser(user);\n }\n }\n }[\"Header.useEffect\"], [\n user\n ]);\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"header\", {\n className: \"w-full px-4 md:px-8 flex justify-center gap-4 \" + (darkBg ? \" shadow-slate-900/20 dark-content\" : \" shadow-slate-900/5\") + (transparent ? \"\" : \" bg-white dark:bg-slate-800 shadow-lg dark:shadow-black/10 z-50\") + (user?.logged_in_status ? \" py-4\" : \" py-6\"),\n style: {\n zIndex: 700\n },\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"container\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"nav\", {\n className: \"w-full flex items-center justify-between gap-4 md:gap-10\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_general_Logo__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {}, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 125,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 p-4 xl:p-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto xl:bg-transparent\" + (transparent ? \" bg-white xl:bg-transparent\" : \" bg-white dark:bg-slate-800\"),\n id: \"main-nav-content-wrapper\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"items-center mb-2 flex xl:hidden\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n src: \"/images/logo-icon-alt-2.png\",\n alt: \"Logo Icon\",\n width: 37\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 142,\n columnNumber: 33\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 141,\n columnNumber: 29\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n className: \"outlined gray ml-auto\",\n onClick: (e)=>{\n /** @type {*} */ const mainNavWrapper = document.getElementById(\"main-nav-content-wrapper\");\n mainNavWrapper?.classList.toggle(\"hidden\");\n },\n style: {\n border: \"none\"\n },\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n className: \"font-semibold text-4xl\",\n children: \"✕\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 162,\n columnNumber: 33\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 148,\n columnNumber: 29\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 140,\n columnNumber: 25\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex items-center grow flex-col-reverse xl:flex-row mb-10 xl:mb-0\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex-col xl:flex-row w-full gap-y-10 gap-x-6\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"dropdown-wrapper flex items-center gap-1\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/gui-reference\",\n className: \"relative z-10 flex items-center gap-2\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n children: \"Features\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 179,\n columnNumber: 41\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_ChevronDown_lucide_react__WEBPACK_IMPORTED_MODULE_5__.ChevronDown, {\n size: 20\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 180,\n columnNumber: 41\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 175,\n columnNumber: 37\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"dropdown\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/database-reference/data-types\",\n className: \"button plain-text more-padding normal-weight\",\n children: \"Database Schema\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 184,\n columnNumber: 41\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/database-reference/querying-data\",\n className: \"button plain-text more-padding normal-weight\",\n children: \"Sql Queries\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 190,\n columnNumber: 41\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/gui-reference/upload-media\",\n className: \"button plain-text more-padding normal-weight\",\n children: \"Media Storage\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 196,\n columnNumber: 41\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 183,\n columnNumber: 37\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 174,\n columnNumber: 33\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"dropdown-wrapper flex items-center gap-1\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs\",\n className: \"relative z-10 flex items-center gap-2\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n children: \"Docs\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 210,\n columnNumber: 41\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_ChevronDown_lucide_react__WEBPACK_IMPORTED_MODULE_5__.ChevronDown, {\n size: 20\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 211,\n columnNumber: 41\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 206,\n columnNumber: 37\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"dropdown\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/quick-start\",\n className: \"button plain-text more-padding normal-weight\",\n children: \"Quick Start\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 215,\n columnNumber: 41\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/api-reference\",\n className: \"button plain-text more-padding normal-weight\",\n children: \"Api Guide\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 221,\n columnNumber: 41\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/docs/gui-reference\",\n className: \"button plain-text more-padding normal-weight\",\n children: \"GUI Interface\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 227,\n columnNumber: 41\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 214,\n columnNumber: 37\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 205,\n columnNumber: 33\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/about\",\n children: \"About Us\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 236,\n columnNumber: 33\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/contact\",\n children: \"Contact Us\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 238,\n columnNumber: 33\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 173,\n columnNumber: 29\n }, this),\n activeUser?.logged_in_status ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_AdminLayout_AdminUserBlock__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n activeUser: activeUser,\n noModeSelector: true\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 242,\n columnNumber: 33\n }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"ml-auto w-full xl:w-auto justify-center\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/login\",\n className: \"button outlined gray hidden xl:flex\" + (darkBg ? \" light\" : \"\"),\n children: \"Login\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 248,\n columnNumber: 37\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/login\",\n className: \"button outlined gray flex xl:hidden\",\n children: \"Login\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 257,\n columnNumber: 37\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"a\", {\n href: \"/create-account\",\n className: \"button\",\n children: \"Get Started\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 263,\n columnNumber: 37\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 247,\n columnNumber: 33\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 172,\n columnNumber: 25\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 131,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"ml-0 xl:-ml-2\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_general_ThemeSelector__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {}, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 279,\n columnNumber: 25\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 278,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n className: \"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all\",\n onClick: (e)=>{\n /** @type {*} */ const mainNavWrapper = document.getElementById(\"main-nav-content-wrapper\");\n mainNavWrapper?.classList.toggle(\"hidden\");\n },\n style: {\n minWidth: \"50px\",\n backgroundColor: \"transparent\"\n },\n id: \"main-header-hamburger-button\",\n \"aria-label\": \"Mobile Hambutget Button\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 302,\n columnNumber: 25\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 303,\n columnNumber: 25\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full\"\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 304,\n columnNumber: 25\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 286,\n columnNumber: 21\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 124,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 123,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/Header.jsx\",\n lineNumber: 108,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9sYXlvdXRzL2NvbXBvbmVudHMvR2VuZXJhbExheW91dC9IZWFkZXIuanN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBRTRDO0FBQ2xCO0FBQ087QUFDaEI7QUFFM0MsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FFbkY7Ozs7Ozs7O0NBUUMsR0FDYyxTQUFTSyxPQUFPLEVBQUVDLElBQUksRUFBRUMsTUFBTSxFQUFFQyxXQUFXLEVBQUU7SUFDeEQ7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBQ0QsTUFBTSxDQUFDQyxZQUFZQyxjQUFjLEdBQUdWLHFEQUFjLENBQzlDTSxNQUFNTSxtQkFBbUJOLE9BQU87SUFFcEMsNERBQTREO0lBRTVETixzREFBZTs0QkFBQztZQUNaLGNBQWMsR0FDZCxNQUFNYyxpQkFBaUJDLFNBQVNDLGNBQWMsQ0FDMUM7WUFHSkMsT0FBT0MsZ0JBQWdCLENBQUM7b0NBQVMsQ0FBQ0M7b0JBQzlCLGNBQWMsR0FDZCxNQUFNQyxjQUFjRCxFQUFFRSxNQUFNO29CQUU1QixJQUNJRCxhQUFhRSxRQUFRLGdDQUNyQkYsYUFBYUUsUUFBUSxrQ0FFckI7b0JBQ0osSUFBSSxDQUFDUixlQUFlUyxTQUFTLENBQUNDLFFBQVEsQ0FBQyxXQUFXO3dCQUM5Q1YsZUFBZVMsU0FBUyxDQUFDRSxHQUFHLENBQUM7b0JBQ2pDO2dCQUNKOztZQUVBLE1BQU1DLFdBQVdYLFNBQVNZLGdCQUFnQixDQUFDO1lBRTNDRCxTQUFTRSxPQUFPO29DQUFDLENBQUMsa0NBQWtDLEdBQUdDO29CQUNuRCxJQUFJQSxLQUFLQyxRQUFRLEtBQUtiLE9BQU9jLFFBQVEsQ0FBQ0QsUUFBUSxFQUFFO3dCQUM1QyxJQUFJRCxLQUFLRyxJQUFJLENBQUNDLEtBQUssQ0FBQyxRQUFRSixLQUFLQyxRQUFRLENBQUNHLEtBQUssQ0FBQyxTQUFTO3dCQUN6REosS0FBS04sU0FBUyxDQUFDRSxHQUFHLENBQUM7b0JBQ3ZCO2dCQUNKOztRQUNKOzJCQUFHLEVBQUU7SUFFTHpCLHNEQUFlOzRCQUFDO1lBQ1osSUFBSU0sTUFBTU0sa0JBQWtCO2dCQUN4QkYsY0FBY0o7WUFDbEI7UUFDSjsyQkFBRztRQUFDQTtLQUFLO0lBRVQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUNELHFCQUNJLDhEQUFDNEI7UUFDR0MsV0FDSSxvREFDQzVCLENBQUFBLFNBQ0ssc0NBQ0EscUJBQW9CLElBQ3pCQyxDQUFBQSxjQUNLLEtBQ0EsaUVBQWdFLElBQ3JFRixDQUFBQSxNQUFNTSxtQkFBbUIsVUFBVSxPQUFNO1FBRTlDd0IsT0FBTztZQUNIQyxRQUFRO1FBQ1o7a0JBRUEsNEVBQUNDO1lBQUlILFdBQVU7c0JBQ1gsNEVBQUNJO2dCQUFJSixXQUFVOztrQ0FDWCw4REFBQ2pDLGdFQUFJQTs7Ozs7a0NBTUwsOERBQUNvQzt3QkFDR0gsV0FDSSwyTUFDQzNCLENBQUFBLGNBQ0ssZ0NBQ0EsNkJBQTRCO3dCQUV0Q2dDLElBQUc7OzBDQUVILDhEQUFDRjtnQ0FBSUgsV0FBVTs7a0RBQ1gsOERBQUNNO3dDQUFFVCxNQUFLO2tEQUNKLDRFQUFDVTs0Q0FDR0MsS0FBSTs0Q0FDSkMsS0FBSTs0Q0FDSkMsT0FBTzs7Ozs7Ozs7Ozs7a0RBR2YsOERBQUNDO3dDQUNHWCxXQUFVO3dDQUNWWSxTQUFTLENBQUM1Qjs0Q0FDTixjQUFjLEdBQ2QsTUFBTUwsaUJBQ0ZDLFNBQVNDLGNBQWMsQ0FDbkI7NENBRVJGLGdCQUFnQlMsVUFBVXlCLE9BQU87d0NBQ3JDO3dDQUNBWixPQUFPOzRDQUNIYSxRQUFRO3dDQUNaO2tEQUVBLDRFQUFDQzs0Q0FBS2YsV0FBVTtzREFBeUI7Ozs7Ozs7Ozs7Ozs7Ozs7OzBDQVVqRCw4REFBQ0c7Z0NBQUlILFdBQVU7O2tEQUNYLDhEQUFDRzt3Q0FBSUgsV0FBVTs7MERBQ1gsOERBQUNHO2dEQUFJSCxXQUFVOztrRUFDWCw4REFBQ007d0RBQ0dULE1BQUs7d0RBQ0xHLFdBQVU7OzBFQUVWLDhEQUFDZTswRUFBSzs7Ozs7OzBFQUNOLDhEQUFDOUMsd0ZBQVdBO2dFQUFDK0MsTUFBTTs7Ozs7Ozs7Ozs7O2tFQUd2Qiw4REFBQ2I7d0RBQUlILFdBQVU7OzBFQUNYLDhEQUFDTTtnRUFDR1QsTUFBSztnRUFDTEcsV0FBVTswRUFDYjs7Ozs7OzBFQUdELDhEQUFDTTtnRUFDR1QsTUFBSztnRUFDTEcsV0FBVTswRUFDYjs7Ozs7OzBFQUdELDhEQUFDTTtnRUFDR1QsTUFBSztnRUFDTEcsV0FBVTswRUFDYjs7Ozs7Ozs7Ozs7Ozs7Ozs7OzBEQU1ULDhEQUFDRztnREFBSUgsV0FBVTs7a0VBQ1gsOERBQUNNO3dEQUNHVCxNQUFLO3dEQUNMRyxXQUFVOzswRUFFViw4REFBQ2U7MEVBQUs7Ozs7OzswRUFDTiw4REFBQzlDLHdGQUFXQTtnRUFBQytDLE1BQU07Ozs7Ozs7Ozs7OztrRUFHdkIsOERBQUNiO3dEQUFJSCxXQUFVOzswRUFDWCw4REFBQ007Z0VBQ0dULE1BQUs7Z0VBQ0xHLFdBQVU7MEVBQ2I7Ozs7OzswRUFHRCw4REFBQ007Z0VBQ0dULE1BQUs7Z0VBQ0xHLFdBQVU7MEVBQ2I7Ozs7OzswRUFHRCw4REFBQ007Z0VBQ0dULE1BQUs7Z0VBQ0xHLFdBQVU7MEVBQ2I7Ozs7Ozs7Ozs7Ozs7Ozs7OzswREFNVCw4REFBQ007Z0RBQUVULE1BQUs7MERBQVM7Ozs7OzswREFFakIsOERBQUNTO2dEQUFFVCxNQUFLOzBEQUFXOzs7Ozs7Ozs7Ozs7b0NBR3RCdkIsWUFBWUcsaUNBQ1QsOERBQUNULG1FQUFjQTt3Q0FDWE0sWUFBWUE7d0NBQ1oyQyxnQkFBZ0I7Ozs7OzZEQUdwQiw4REFBQ2Q7d0NBQUlILFdBQVU7OzBEQUNYLDhEQUFDTTtnREFDR1QsTUFBSztnREFDTEcsV0FDSSx3Q0FDQzVCLENBQUFBLFNBQVMsV0FBVyxFQUFDOzBEQUU3Qjs7Ozs7OzBEQUdELDhEQUFDa0M7Z0RBQ0dULE1BQUs7Z0RBQ0xHLFdBQVU7MERBQ2I7Ozs7OzswREFHRCw4REFBQ007Z0RBQ0dULE1BQUs7Z0RBQ0xHLFdBQVU7MERBQ2I7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztrQ0FZakIsOERBQUNHO3dCQUFJSCxXQUFVO2tDQUNYLDRFQUFDbEMseUVBQWFBOzs7Ozs7Ozs7O2tDQU9sQiw4REFBQzZDO3dCQUNHWCxXQUFVO3dCQUNWWSxTQUFTLENBQUM1Qjs0QkFDTixjQUFjLEdBQ2QsTUFBTUwsaUJBQWlCQyxTQUFTQyxjQUFjLENBQzFDOzRCQUVKRixnQkFBZ0JTLFVBQVV5QixPQUFPO3dCQUNyQzt3QkFDQVosT0FBTzs0QkFDSGlCLFVBQVU7NEJBQ1ZDLGlCQUFpQjt3QkFDckI7d0JBQ0FkLElBQUc7d0JBQ0hlLGNBQVc7OzBDQUVYLDhEQUFDakI7Z0NBQUlILFdBQVU7Ozs7OzswQ0FDZiw4REFBQ0c7Z0NBQUlILFdBQVU7Ozs7OzswQ0FDZiw4REFBQ0c7Z0NBQUlILFdBQVU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFNbkMsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDNUMiLCJzb3VyY2VzIjpbIi9hcHAvbGF5b3V0cy9jb21wb25lbnRzL0dlbmVyYWxMYXlvdXQvSGVhZGVyLmpzeCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAdHMtY2hlY2tcclxuXHJcbi8qKlxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogSW1wb3J0c1xyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICovXHJcbmltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcclxuXHJcbmltcG9ydCBUaGVtZVNlbGVjdG9yIGZyb20gXCIuLi8uLi8uLi9jb21wb25lbnRzL2dlbmVyYWwvVGhlbWVTZWxlY3RvclwiO1xyXG5pbXBvcnQgTG9nbyBmcm9tIFwiLi4vLi4vLi4vY29tcG9uZW50cy9nZW5lcmFsL0xvZ29cIjtcclxuaW1wb3J0IEFkbWluVXNlckJsb2NrIGZyb20gXCIuLi9BZG1pbkxheW91dC9BZG1pblVzZXJCbG9ja1wiO1xyXG5pbXBvcnQgeyBDaGV2cm9uRG93biB9IGZyb20gXCJsdWNpZGUtcmVhY3RcIjtcclxuXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIE1haW4gQ29tcG9uZW50IHsgRnVuY3Rpb25hbCB9XHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBAcGFyYW0ge29iamVjdH0gcHJvcHMgLSBSZWFjdCBjb21wb25lbnQgcHJvcHNcclxuICogQHBhcmFtIHtpbXBvcnQoXCJAL3BhY2thZ2Utc2hhcmVkL3R5cGVzXCIpLlVzZXJUeXBlIHwgbnVsbH0gW3Byb3BzLnVzZXJdXHJcbiAqIEBwYXJhbSB7Ym9vbGVhbn0gW3Byb3BzLmRhcmtCZ11cclxuICogQHBhcmFtIHtib29sZWFufSBbcHJvcHMudHJhbnNwYXJlbnRdXHJcbiAqL1xyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBIZWFkZXIoeyB1c2VyLCBkYXJrQmcsIHRyYW5zcGFyZW50IH0pIHtcclxuICAgIC8qKlxyXG4gICAgICogR2V0IENvbnRleHRzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IHsgUmVhY3QudXNlQ29udGV4dCB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBKYXZhc2NyaXB0IFZhcmlhYmxlc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCBOb24gaG9vayB2YXJpYWJsZXMgYW5kIGZ1bmN0aW9uc1xyXG4gICAgICovXHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogUmVhY3QgSG9va3NcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyB1c2VTdGF0ZSwgdXNlRWZmZWN0LCB1c2VSZWYsIGV0YyAuLi4gfVxyXG4gICAgICovXHJcbiAgICBjb25zdCBbYWN0aXZlVXNlciwgc2V0QWN0aXZlVXNlcl0gPSBSZWFjdC51c2VTdGF0ZShcclxuICAgICAgICB1c2VyPy5sb2dnZWRfaW5fc3RhdHVzID8gdXNlciA6IG51bGxcclxuICAgICk7XHJcbiAgICAvLyBjb25zdCBbYWN0aXZlVXNlciwgc2V0QWN0aXZlVXNlcl0gPSBSZWFjdC51c2VTdGF0ZSh1c2VyKTtcclxuXHJcbiAgICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xyXG4gICAgICAgIC8qKiBAdHlwZSB7Kn0gKi9cclxuICAgICAgICBjb25zdCBtYWluTmF2V3JhcHBlciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFxyXG4gICAgICAgICAgICBcIm1haW4tbmF2LWNvbnRlbnQtd3JhcHBlclwiXHJcbiAgICAgICAgKTtcclxuXHJcbiAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoZSkgPT4ge1xyXG4gICAgICAgICAgICAvKiogQHR5cGUgeyp9ICovXHJcbiAgICAgICAgICAgIGNvbnN0IGNsaWNrVGFyZ2V0ID0gZS50YXJnZXQ7XHJcblxyXG4gICAgICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgICAgICBjbGlja1RhcmdldD8uY2xvc2VzdChcIiNtYWluLW5hdi1jb250ZW50LXdyYXBwZXJcIikgfHxcclxuICAgICAgICAgICAgICAgIGNsaWNrVGFyZ2V0Py5jbG9zZXN0KFwiI21haW4taGVhZGVyLWhhbWJ1cmdlci1idXR0b25cIilcclxuICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICBpZiAoIW1haW5OYXZXcmFwcGVyLmNsYXNzTGlzdC5jb250YWlucyhcImhpZGRlblwiKSkge1xyXG4gICAgICAgICAgICAgICAgbWFpbk5hdldyYXBwZXIuY2xhc3NMaXN0LmFkZChcImhpZGRlblwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBjb25zdCBuYXZMaW5rcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXCJuYXYgYVwiKTtcclxuXHJcbiAgICAgICAgbmF2TGlua3MuZm9yRWFjaCgoLyoqIEB0eXBlIHtIVE1MQW5jaG9yRWxlbWVudCB8ICp9ICovIGxpbmspID0+IHtcclxuICAgICAgICAgICAgaWYgKGxpbmsucGF0aG5hbWUgPT09IHdpbmRvdy5sb2NhdGlvbi5wYXRobmFtZSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGxpbmsuaHJlZi5tYXRjaCgvIy8pIHx8IGxpbmsucGF0aG5hbWUubWF0Y2goL2h0dHAvKSkgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgbGluay5jbGFzc0xpc3QuYWRkKFwiYWN0aXZlLXBhZ2UtbGlua1wiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfSwgW10pO1xyXG5cclxuICAgIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XHJcbiAgICAgICAgaWYgKHVzZXI/LmxvZ2dlZF9pbl9zdGF0dXMpIHtcclxuICAgICAgICAgICAgc2V0QWN0aXZlVXNlcih1c2VyKTtcclxuICAgICAgICB9XHJcbiAgICB9LCBbdXNlcl0pO1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEZ1bmN0aW9uIFJldHVyblxyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCBNYWluIEZ1bmN0aW9uIFJldHVyblxyXG4gICAgICovXHJcbiAgICByZXR1cm4gKFxyXG4gICAgICAgIDxoZWFkZXJcclxuICAgICAgICAgICAgY2xhc3NOYW1lPXtcclxuICAgICAgICAgICAgICAgIFwidy1mdWxsIHB4LTQgbWQ6cHgtOCBmbGV4IGp1c3RpZnktY2VudGVyICBnYXAtNCBcIiArXHJcbiAgICAgICAgICAgICAgICAoZGFya0JnXHJcbiAgICAgICAgICAgICAgICAgICAgPyBcIiBzaGFkb3ctc2xhdGUtOTAwLzIwIGRhcmstY29udGVudFwiXHJcbiAgICAgICAgICAgICAgICAgICAgOiBcIiBzaGFkb3ctc2xhdGUtOTAwLzVcIikgK1xyXG4gICAgICAgICAgICAgICAgKHRyYW5zcGFyZW50XHJcbiAgICAgICAgICAgICAgICAgICAgPyBcIlwiXHJcbiAgICAgICAgICAgICAgICAgICAgOiBcIiBiZy13aGl0ZSBkYXJrOmJnLXNsYXRlLTgwMCBzaGFkb3ctbGcgZGFyazpzaGFkb3ctYmxhY2svMTAgei01MFwiKSArXHJcbiAgICAgICAgICAgICAgICAodXNlcj8ubG9nZ2VkX2luX3N0YXR1cyA/IFwiIHB5LTRcIiA6IFwiIHB5LTZcIilcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzdHlsZT17e1xyXG4gICAgICAgICAgICAgICAgekluZGV4OiA3MDAsXHJcbiAgICAgICAgICAgIH19XHJcbiAgICAgICAgPlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImNvbnRhaW5lclwiPlxyXG4gICAgICAgICAgICAgICAgPG5hdiBjbGFzc05hbWU9XCJ3LWZ1bGwgZmxleCBpdGVtcy1jZW50ZXIganVzdGlmeS1iZXR3ZWVuIGdhcC00IG1kOmdhcC0xMFwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxMb2dvIC8+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHsvKiAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vICovfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICA8ZGl2XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImhpZGRlbiB4bDpmbGV4IGZsZXgtY29sIGl0ZW1zLXN0cmV0Y2ggZ3JvdyBmaXhlZCB4bDpzdGF0aWMgdG9wLTAgcmlnaHQtMCBwLTQgeGw6cC0wIHNoYWRvdy14bCB4bDpzaGFkb3ctbm9uZSBoLXNjcmVlbiB4bDpoLWF1dG8gb3ZlcmZsb3ctYXV0byB4bDpvdmVyZmxvdy12aXNpYmxlIHctc2NyZWVuIHNsOnctYXV0byB4bDpiZy10cmFuc3BhcmVudFwiICtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0cmFuc3BhcmVudFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gXCIgYmctd2hpdGUgeGw6YmctdHJhbnNwYXJlbnRcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogXCIgYmctd2hpdGUgZGFyazpiZy1zbGF0ZS04MDBcIilcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZD1cIm1haW4tbmF2LWNvbnRlbnQtd3JhcHBlclwiXHJcbiAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cIml0ZW1zLWNlbnRlciBtYi0yIGZsZXggeGw6aGlkZGVuXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPVwiL1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbWdcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3JjPVwiL2ltYWdlcy9sb2dvLWljb24tYWx0LTIucG5nXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0PVwiTG9nbyBJY29uXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg9ezM3fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwib3V0bGluZWQgZ3JheSBtbC1hdXRvXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgeyp9ICovXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1haW5OYXZXcmFwcGVyID1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwibWFpbi1uYXYtY29udGVudC13cmFwcGVyXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1haW5OYXZXcmFwcGVyPy5jbGFzc0xpc3QudG9nZ2xlKFwiaGlkZGVuXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiBcIm5vbmVcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT1cImZvbnQtc2VtaWJvbGQgdGV4dC00eGxcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiMxMDAwNTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7LyogLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLyAqL31cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBpdGVtcy1jZW50ZXIgZ3JvdyBmbGV4LWNvbC1yZXZlcnNlIHhsOmZsZXgtcm93IG1iLTEwIHhsOm1iLTBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleC1jb2wgeGw6ZmxleC1yb3cgdy1mdWxsIGdhcC15LTEwIGdhcC14LTZcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImRyb3Bkb3duLXdyYXBwZXIgZmxleCBpdGVtcy1jZW50ZXIgZ2FwLTFcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGFcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhyZWY9XCIvZG9jcy9ndWktcmVmZXJlbmNlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cInJlbGF0aXZlIHotMTAgZmxleCBpdGVtcy1jZW50ZXIgZ2FwLTJcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3Bhbj5GZWF0dXJlczwvc3Bhbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxDaGV2cm9uRG93biBzaXplPXsyMH0gLz5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJkcm9wZG93blwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGFcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBocmVmPVwiL2RvY3MvZGF0YWJhc2UtcmVmZXJlbmNlL2RhdGEtdHlwZXNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImJ1dHRvbiBwbGFpbi10ZXh0IG1vcmUtcGFkZGluZyBub3JtYWwtd2VpZ2h0XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEYXRhYmFzZSBTY2hlbWFcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9kb2NzL2RhdGFiYXNlLXJlZmVyZW5jZS9xdWVyeWluZy1kYXRhXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJidXR0b24gcGxhaW4tdGV4dCBtb3JlLXBhZGRpbmcgbm9ybWFsLXdlaWdodFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3FsIFF1ZXJpZXNcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9kb2NzL2d1aS1yZWZlcmVuY2UvdXBsb2FkLW1lZGlhXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJidXR0b24gcGxhaW4tdGV4dCBtb3JlLXBhZGRpbmcgbm9ybWFsLXdlaWdodFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWVkaWEgU3RvcmFnZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJkcm9wZG93bi13cmFwcGVyIGZsZXggaXRlbXMtY2VudGVyIGdhcC0xXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBocmVmPVwiL2RvY3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwicmVsYXRpdmUgei0xMCBmbGV4IGl0ZW1zLWNlbnRlciBnYXAtMlwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuPkRvY3M8L3NwYW4+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8Q2hldnJvbkRvd24gc2l6ZT17MjB9IC8+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZHJvcGRvd25cIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9kb2NzL3F1aWNrLXN0YXJ0XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJidXR0b24gcGxhaW4tdGV4dCBtb3JlLXBhZGRpbmcgbm9ybWFsLXdlaWdodFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUXVpY2sgU3RhcnRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9kb2NzL2FwaS1yZWZlcmVuY2VcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImJ1dHRvbiBwbGFpbi10ZXh0IG1vcmUtcGFkZGluZyBub3JtYWwtd2VpZ2h0XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcGkgR3VpZGVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9kb2NzL2d1aS1yZWZlcmVuY2VcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImJ1dHRvbiBwbGFpbi10ZXh0IG1vcmUtcGFkZGluZyBub3JtYWwtd2VpZ2h0XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHVUkgSW50ZXJmYWNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPVwiL2Fib3V0XCI+QWJvdXQgVXM8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgey8qIDxhIGhyZWY9XCIvcHJpY2luZ1wiPlByaWNpbmc8L2E+ICovfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9XCIvY29udGFjdFwiPkNvbnRhY3QgVXM8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7YWN0aXZlVXNlcj8ubG9nZ2VkX2luX3N0YXR1cyA/IChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8QWRtaW5Vc2VyQmxvY2tcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlVXNlcj17YWN0aXZlVXNlcn1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9Nb2RlU2VsZWN0b3I9e3RydWV9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgOiAoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJtbC1hdXRvIHctZnVsbCB4bDp3LWF1dG8ganVzdGlmeS1jZW50ZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGFcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhyZWY9XCIvbG9naW5cIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImJ1dHRvbiBvdXRsaW5lZCBncmF5IGhpZGRlbiB4bDpmbGV4XCIgK1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkYXJrQmcgPyBcIiBsaWdodFwiIDogXCJcIilcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTG9naW5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj1cIi9sb2dpblwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJidXR0b24gb3V0bGluZWQgZ3JheSAgZmxleCB4bDpoaWRkZW5cIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMb2dpblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBocmVmPVwiL2NyZWF0ZS1hY2NvdW50XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImJ1dHRvblwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdldCBTdGFydGVkXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgICAgICB7LyogLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLyAqL31cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJtbC0wIHhsOi1tbC0yXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxUaGVtZVNlbGVjdG9yIC8+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHsvKiAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLyAqL31cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgPGJ1dHRvblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJiZy10cmFuc3BhcmVudCB3LTE2IHAtNCBnYXAtMS41IGZsZXggeGw6aGlkZGVuIGZsZXgtY29sIGhvdmVyOmJnLXRyYW5zcGFyZW50IHRyYW5zaXRpb24tYWxsXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KGUpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7Kn0gKi9cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1haW5OYXZXcmFwcGVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJtYWluLW5hdi1jb250ZW50LXdyYXBwZXJcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1haW5OYXZXcmFwcGVyPy5jbGFzc0xpc3QudG9nZ2xlKFwiaGlkZGVuXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17e1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluV2lkdGg6IFwiNTBweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiBcInRyYW5zcGFyZW50XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH19XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkPVwibWFpbi1oZWFkZXItaGFtYnVyZ2VyLWJ1dHRvblwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJNb2JpbGUgSGFtYnV0Z2V0IEJ1dHRvblwiXHJcbiAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInctZnVsbCBoLTEgYmctc2xhdGUtNjAwIGRhcms6Ymctc2xhdGUtNDAwIHJvdW5kZWQtZnVsbFwiPjwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInctZnVsbCBoLTEgYmctc2xhdGUtNjAwIGRhcms6Ymctc2xhdGUtNDAwIHJvdW5kZWQtZnVsbFwiPjwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInctZnVsbCBoLTEgYmctc2xhdGUtNjAwIGRhcms6Ymctc2xhdGUtNDAwIHJvdW5kZWQtZnVsbFwiPjwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICAgICAgPC9uYXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDwvaGVhZGVyPlxyXG4gICAgKTtcclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxufVxyXG4iXSwibmFtZXMiOlsiUmVhY3QiLCJUaGVtZVNlbGVjdG9yIiwiTG9nbyIsIkFkbWluVXNlckJsb2NrIiwiQ2hldnJvbkRvd24iLCJIZWFkZXIiLCJ1c2VyIiwiZGFya0JnIiwidHJhbnNwYXJlbnQiLCJhY3RpdmVVc2VyIiwic2V0QWN0aXZlVXNlciIsInVzZVN0YXRlIiwibG9nZ2VkX2luX3N0YXR1cyIsInVzZUVmZmVjdCIsIm1haW5OYXZXcmFwcGVyIiwiZG9jdW1lbnQiLCJnZXRFbGVtZW50QnlJZCIsIndpbmRvdyIsImFkZEV2ZW50TGlzdGVuZXIiLCJlIiwiY2xpY2tUYXJnZXQiLCJ0YXJnZXQiLCJjbG9zZXN0IiwiY2xhc3NMaXN0IiwiY29udGFpbnMiLCJhZGQiLCJuYXZMaW5rcyIsInF1ZXJ5U2VsZWN0b3JBbGwiLCJmb3JFYWNoIiwibGluayIsInBhdGhuYW1lIiwibG9jYXRpb24iLCJocmVmIiwibWF0Y2giLCJoZWFkZXIiLCJjbGFzc05hbWUiLCJzdHlsZSIsInpJbmRleCIsImRpdiIsIm5hdiIsImlkIiwiYSIsImltZyIsInNyYyIsImFsdCIsIndpZHRoIiwiYnV0dG9uIiwib25DbGljayIsInRvZ2dsZSIsImJvcmRlciIsInNwYW4iLCJzaXplIiwibm9Nb2RlU2VsZWN0b3IiLCJtaW5XaWR0aCIsImJhY2tncm91bmRDb2xvciIsImFyaWEtbGFiZWwiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./layouts/components/GeneralLayout/Header.jsx\n"); - -/***/ }), - -/***/ "./layouts/components/GeneralLayout/ProductionHeadComponent.jsx": -/*!**********************************************************************!*\ - !*** ./layouts/components/GeneralLayout/ProductionHeadComponent.jsx ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ProductionHeadComponent)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {object} props - React component props\r\n * @param {*} props.head\r\n * @param {*} props.productionEnvironment\r\n */ function ProductionHeadComponent(props) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {}, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/ProductionHeadComponent.jsx\",\n lineNumber: 61,\n columnNumber: 12\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9sYXlvdXRzL2NvbXBvbmVudHMvR2VuZXJhbExheW91dC9Qcm9kdWN0aW9uSGVhZENvbXBvbmVudC5qc3giLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxZQUFZO0FBRVo7Ozs7Q0FJQztBQUN5QjtBQUUxQixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUVuRjs7Ozs7OztDQU9DLEdBQ2MsU0FBU0Msd0JBQXdCQyxLQUFLO0lBQ2pEOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBRUQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FDRCxxQkFBTyw4REFBQ0YsdURBQWM7Ozs7O0FBQ3RCLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBQzVDIiwic291cmNlcyI6WyIvYXBwL2xheW91dHMvY29tcG9uZW50cy9HZW5lcmFsTGF5b3V0L1Byb2R1Y3Rpb25IZWFkQ29tcG9uZW50LmpzeCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAdHMtY2hlY2tcclxuXHJcbi8qKlxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogSW1wb3J0c1xyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICovXHJcbmltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcclxuXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIE1haW4gQ29tcG9uZW50IHsgRnVuY3Rpb25hbCB9XHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBAcGFyYW0ge29iamVjdH0gcHJvcHMgLSBSZWFjdCBjb21wb25lbnQgcHJvcHNcclxuICogQHBhcmFtIHsqfSBwcm9wcy5oZWFkXHJcbiAqIEBwYXJhbSB7Kn0gcHJvcHMucHJvZHVjdGlvbkVudmlyb25tZW50XHJcbiAqL1xyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBQcm9kdWN0aW9uSGVhZENvbXBvbmVudChwcm9wcykge1xyXG4gICAgLyoqXHJcbiAgICAgKiBHZXQgQ29udGV4dHNcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyBSZWFjdC51c2VDb250ZXh0IH1cclxuICAgICAqL1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE5vbiBob29rIHZhcmlhYmxlcyBhbmQgZnVuY3Rpb25zXHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZWFjdCBIb29rc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QsIHVzZVJlZiwgZXRjIC4uLiB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgTWFpbiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqL1xyXG4gICAgcmV0dXJuIDxSZWFjdC5GcmFnbWVudD48L1JlYWN0LkZyYWdtZW50PjtcclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxufVxyXG4iXSwibmFtZXMiOlsiUmVhY3QiLCJQcm9kdWN0aW9uSGVhZENvbXBvbmVudCIsInByb3BzIiwiRnJhZ21lbnQiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./layouts/components/GeneralLayout/ProductionHeadComponent.jsx\n"); - -/***/ }), - -/***/ "./layouts/components/GeneralLayout/ScrollToTopButton.jsx": -/*!****************************************************************!*\ - !*** ./layouts/components/GeneralLayout/ScrollToTopButton.jsx ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ScrollToTopButton)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _barrel_optimize_names_ChevronUp_lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! __barrel_optimize__?names=ChevronUp!=!lucide-react */ \"__barrel_optimize__?names=ChevronUp!=!./node_modules/lucide-react/dist/esm/lucide-react.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {object} props\r\n * @param {boolean} [props.snug]\r\n */ function ScrollToTopButton({ snug }) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ const [isVisible, setIsVisible] = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false);\n react__WEBPACK_IMPORTED_MODULE_1___default().useEffect({\n \"ScrollToTopButton.useEffect\": ()=>{\n window.addEventListener(\"scroll\", {\n \"ScrollToTopButton.useEffect\": (e)=>{\n if (window.scrollY > 600) {\n setIsVisible(true);\n } else {\n setIsVisible(false);\n }\n }\n }[\"ScrollToTopButton.useEffect\"]);\n }\n }[\"ScrollToTopButton.useEffect\"], []);\n ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), {\n children: isVisible && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n className: \"fixed z-40 w-12 h-12 p-2 rounded-full bg-white dark:bg-slate-600 shadow-xl flex items-center justify-center hover:bg-slate-800 dark:hover:bg-slate-800 text-slate-500 dark:text-slate-200 outline-slate-300 dark:outline-transparent\" + (snug ? \" bottom-6 right-4\" : \" bottom-4 md:bottom-10 right-4 md:right-10\"),\n style: {\n outlineStyle: \"solid\",\n outlineWidth: \"1px\",\n zIndex: 2000\n },\n onClick: (e)=>{\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: \"smooth\"\n });\n },\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_ChevronUp_lucide_react__WEBPACK_IMPORTED_MODULE_2__.ChevronUp, {\n size: 20\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/ScrollToTopButton.jsx\",\n lineNumber: 95,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/ScrollToTopButton.jsx\",\n lineNumber: 75,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: \"/app/layouts/components/GeneralLayout/ScrollToTopButton.jsx\",\n lineNumber: 73,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9sYXlvdXRzL2NvbXBvbmVudHMvR2VuZXJhbExheW91dC9TY3JvbGxUb1RvcEJ1dHRvbi5qc3giLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsWUFBWTtBQUVaOzs7O0NBSUM7QUFDd0M7QUFDZjtBQUUxQixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUVuRjs7Ozs7O0NBTUMsR0FDYyxTQUFTRSxrQkFBa0IsRUFBRUMsSUFBSSxFQUFFO0lBQzlDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBRUQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUNELE1BQU0sQ0FBQ0MsV0FBV0MsYUFBYSxHQUFHSixxREFBYyxDQUFDO0lBRWpEQSxzREFBZTt1Q0FBQztZQUNaTyxPQUFPQyxnQkFBZ0IsQ0FBQzsrQ0FBVSxDQUFDQztvQkFDL0IsSUFBSUYsT0FBT0csT0FBTyxHQUFHLEtBQUs7d0JBQ3RCTixhQUFhO29CQUNqQixPQUFPO3dCQUNIQSxhQUFhO29CQUNqQjtnQkFDSjs7UUFDSjtzQ0FBRyxFQUFFO0lBRUwsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUNELHFCQUNJLDhEQUFDSix1REFBYztrQkFDVkcsMkJBQ0csOERBQUNTO1lBQ0dDLFdBQ0kseU9BQ0NYLENBQUFBLE9BQ0ssc0JBQ0EsNENBQTJDO1lBRXJEWSxPQUFPO2dCQUNIQyxjQUFjO2dCQUNkQyxjQUFjO2dCQUNkQyxRQUFRO1lBQ1o7WUFDQUMsU0FBUyxDQUFDVDtnQkFDTkYsT0FBT1ksUUFBUSxDQUFDO29CQUNaQyxLQUFLO29CQUNMQyxNQUFNO29CQUNOQyxVQUFVO2dCQUNkO1lBQ0o7c0JBRUEsNEVBQUN2QixvRkFBU0E7Z0JBQUN3QixNQUFNOzs7Ozs7Ozs7Ozs7Ozs7O0FBS2pDLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBQzVDIiwic291cmNlcyI6WyIvYXBwL2xheW91dHMvY29tcG9uZW50cy9HZW5lcmFsTGF5b3V0L1Njcm9sbFRvVG9wQnV0dG9uLmpzeCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAdHMtY2hlY2tcclxuXHJcbi8qKlxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogSW1wb3J0c1xyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICovXHJcbmltcG9ydCB7IENoZXZyb25VcCB9IGZyb20gXCJsdWNpZGUtcmVhY3RcIjtcclxuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xyXG5cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuXHJcbi8qKlxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogTWFpbiBDb21wb25lbnQgeyBGdW5jdGlvbmFsIH1cclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEBwYXJhbSB7b2JqZWN0fSBwcm9wc1xyXG4gKiBAcGFyYW0ge2Jvb2xlYW59IFtwcm9wcy5zbnVnXVxyXG4gKi9cclxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gU2Nyb2xsVG9Ub3BCdXR0b24oeyBzbnVnIH0pIHtcclxuICAgIC8qKlxyXG4gICAgICogR2V0IENvbnRleHRzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IHsgUmVhY3QudXNlQ29udGV4dCB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBKYXZhc2NyaXB0IFZhcmlhYmxlc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCBOb24gaG9vayB2YXJpYWJsZXMgYW5kIGZ1bmN0aW9uc1xyXG4gICAgICovXHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogUmVhY3QgSG9va3NcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyB1c2VTdGF0ZSwgdXNlRWZmZWN0LCB1c2VSZWYsIGV0YyAuLi4gfVxyXG4gICAgICovXHJcbiAgICBjb25zdCBbaXNWaXNpYmxlLCBzZXRJc1Zpc2libGVdID0gUmVhY3QudXNlU3RhdGUoZmFsc2UpO1xyXG5cclxuICAgIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XHJcbiAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoXCJzY3JvbGxcIiwgKGUpID0+IHtcclxuICAgICAgICAgICAgaWYgKHdpbmRvdy5zY3JvbGxZID4gNjAwKSB7XHJcbiAgICAgICAgICAgICAgICBzZXRJc1Zpc2libGUodHJ1ZSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzZXRJc1Zpc2libGUoZmFsc2UpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9LCBbXSk7XHJcblxyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE1haW4gRnVuY3Rpb24gUmV0dXJuXHJcbiAgICAgKi9cclxuICAgIHJldHVybiAoXHJcbiAgICAgICAgPFJlYWN0LkZyYWdtZW50PlxyXG4gICAgICAgICAgICB7aXNWaXNpYmxlICYmIChcclxuICAgICAgICAgICAgICAgIDxidXR0b25cclxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBcImZpeGVkIHotNDAgdy0xMiBoLTEyIHAtMiByb3VuZGVkLWZ1bGwgYmctd2hpdGUgZGFyazpiZy1zbGF0ZS02MDAgc2hhZG93LXhsIGZsZXggaXRlbXMtY2VudGVyIGp1c3RpZnktY2VudGVyIGhvdmVyOmJnLXNsYXRlLTgwMCBkYXJrOmhvdmVyOmJnLXNsYXRlLTgwMCB0ZXh0LXNsYXRlLTUwMCBkYXJrOnRleHQtc2xhdGUtMjAwIG91dGxpbmUtc2xhdGUtMzAwIGRhcms6b3V0bGluZS10cmFuc3BhcmVudFwiICtcclxuICAgICAgICAgICAgICAgICAgICAgICAgKHNudWdcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gXCIgYm90dG9tLTYgcmlnaHQtNFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFwiIGJvdHRvbS00IG1kOmJvdHRvbS0xMCByaWdodC00IG1kOnJpZ2h0LTEwXCIpXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dGxpbmVTdHlsZTogXCJzb2xpZFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRsaW5lV2lkdGg6IFwiMXB4XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHpJbmRleDogMjAwMCxcclxuICAgICAgICAgICAgICAgICAgICB9fVxyXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eyhlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5zY3JvbGxUbyh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6IDAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiAwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVoYXZpb3I6IFwic21vb3RoXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH19XHJcbiAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgPENoZXZyb25VcCBzaXplPXsyMH0gLz5cclxuICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICApfVxyXG4gICAgICAgIDwvUmVhY3QuRnJhZ21lbnQ+XHJcbiAgICApO1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG4gICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG59XHJcbiJdLCJuYW1lcyI6WyJDaGV2cm9uVXAiLCJSZWFjdCIsIlNjcm9sbFRvVG9wQnV0dG9uIiwic251ZyIsImlzVmlzaWJsZSIsInNldElzVmlzaWJsZSIsInVzZVN0YXRlIiwidXNlRWZmZWN0Iiwid2luZG93IiwiYWRkRXZlbnRMaXN0ZW5lciIsImUiLCJzY3JvbGxZIiwiRnJhZ21lbnQiLCJidXR0b24iLCJjbGFzc05hbWUiLCJzdHlsZSIsIm91dGxpbmVTdHlsZSIsIm91dGxpbmVXaWR0aCIsInpJbmRleCIsIm9uQ2xpY2siLCJzY3JvbGxUbyIsInRvcCIsImxlZnQiLCJiZWhhdmlvciIsInNpemUiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./layouts/components/GeneralLayout/ScrollToTopButton.jsx\n"); - -/***/ }), - -/***/ "./pages/_app.js": -/*!***********************!*\ - !*** ./pages/_app.js ***! - \***********************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AppContext: () => (/* binding */ AppContext),\n/* harmony export */ \"default\": () => (/* binding */ DataSquirel)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/script */ \"./node_modules/next/script.js\");\n/* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_script__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! next/head */ \"next/head\");\n/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_head__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _styles_less_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styles/less.css */ \"./styles/less.css\");\n/* harmony import */ var _styles_less_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_styles_less_css__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _styles_tailwind_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/tailwind.css */ \"./styles/tailwind.css\");\n/* harmony import */ var _styles_tailwind_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_styles_tailwind_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../components/ErrorBoundary */ \"./components/ErrorBoundary.jsx\");\n// @ts-check\n\n\n\n\n\n\n\n/** @type {React.Context<{pageProps: Object}>} */ const AppContext = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createContext({\n pageProps: {}\n});\n/**\r\n * App Component\r\n * ==========================================\r\n * @param {import(\"next/app\").AppProps} props\r\n */ function DataSquirel({ Component, pageProps }) {\n return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(AppContext.Provider, {\n value: {\n pageProps\n },\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((next_head__WEBPACK_IMPORTED_MODULE_3___default()), {\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width, initial-scale=1\"\n }, void 0, false, {\n fileName: \"/app/pages/_app.js\",\n lineNumber: 21,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: \"/app/pages/_app.js\",\n lineNumber: 20,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(Component, {\n ...pageProps\n }, void 0, false, {\n fileName: \"/app/pages/_app.js\",\n lineNumber: 27,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: \"/app/pages/_app.js\",\n lineNumber: 26,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)((next_script__WEBPACK_IMPORTED_MODULE_2___default()), {\n src: \"/scripts/main.js\",\n strategy: \"afterInteractive\"\n }, void 0, false, {\n fileName: \"/app/pages/_app.js\",\n lineNumber: 29,\n columnNumber: 13\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/pages/_app.js\",\n lineNumber: 19,\n columnNumber: 9\n }, this);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9wYWdlcy9fYXBwLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLFlBQVk7O0FBRWM7QUFDTztBQUNKO0FBQ0Q7QUFDSTtBQUN3QjtBQUN4RCw0REFBNEQsR0FDckQsTUFBTUksMkJBQWFKLDBEQUFtQixDQUFDO0lBQUVNLFdBQVcsQ0FBQztBQUFFLEdBQUc7QUFFakU7Ozs7Q0FJQyxHQUNjLFNBQVNDLFlBQVksRUFBRUMsU0FBUyxFQUFFRixTQUFTLEVBQUU7SUFDeEQscUJBQ0ksOERBQUNGLFdBQVdLLFFBQVE7UUFBQ0MsT0FBTztZQUFFSjtRQUFVOzswQkFDcEMsOERBQUNKLGtEQUFJQTswQkFDRCw0RUFBQ1M7b0JBQ0dDLE1BQUs7b0JBQ0xDLFNBQVE7Ozs7Ozs7Ozs7OzBCQUdoQiw4REFBQ1YsaUVBQWFBOzBCQUNWLDRFQUFDSztvQkFBVyxHQUFHRixTQUFTOzs7Ozs7Ozs7OzswQkFFNUIsOERBQUNMLG9EQUFNQTtnQkFBQ2EsS0FBSTtnQkFBbUJDLFVBQVM7Ozs7Ozs7Ozs7OztBQUdwRCIsInNvdXJjZXMiOlsiL2FwcC9wYWdlcy9fYXBwLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIEB0cy1jaGVja1xyXG5cclxuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xyXG5pbXBvcnQgU2NyaXB0IGZyb20gXCJuZXh0L3NjcmlwdFwiO1xyXG5pbXBvcnQgSGVhZCBmcm9tIFwibmV4dC9oZWFkXCI7XHJcbmltcG9ydCBcIi4uL3N0eWxlcy9sZXNzLmNzc1wiO1xyXG5pbXBvcnQgXCIuLi9zdHlsZXMvdGFpbHdpbmQuY3NzXCI7XHJcbmltcG9ydCBFcnJvckJvdW5kYXJ5IGZyb20gXCIuLi9jb21wb25lbnRzL0Vycm9yQm91bmRhcnlcIjtcclxuLyoqIEB0eXBlIHtSZWFjdC5Db250ZXh0PHtwYWdlUHJvcHM6IE9iamVjdDxzdHJpbmcsIGFueT59Pn0gKi9cclxuZXhwb3J0IGNvbnN0IEFwcENvbnRleHQgPSBSZWFjdC5jcmVhdGVDb250ZXh0KHsgcGFnZVByb3BzOiB7fSB9KTtcclxuXHJcbi8qKlxyXG4gKiBBcHAgQ29tcG9uZW50XHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBAcGFyYW0ge2ltcG9ydChcIm5leHQvYXBwXCIpLkFwcFByb3BzfSBwcm9wc1xyXG4gKi9cclxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRGF0YVNxdWlyZWwoeyBDb21wb25lbnQsIHBhZ2VQcm9wcyB9KSB7XHJcbiAgICByZXR1cm4gKFxyXG4gICAgICAgIDxBcHBDb250ZXh0LlByb3ZpZGVyIHZhbHVlPXt7IHBhZ2VQcm9wcyB9fT5cclxuICAgICAgICAgICAgPEhlYWQ+XHJcbiAgICAgICAgICAgICAgICA8bWV0YVxyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU9XCJ2aWV3cG9ydFwiXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudD1cIndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xXCJcclxuICAgICAgICAgICAgICAgIC8+XHJcbiAgICAgICAgICAgIDwvSGVhZD5cclxuICAgICAgICAgICAgPEVycm9yQm91bmRhcnk+XHJcbiAgICAgICAgICAgICAgICA8Q29tcG9uZW50IHsuLi5wYWdlUHJvcHN9IC8+XHJcbiAgICAgICAgICAgIDwvRXJyb3JCb3VuZGFyeT5cclxuICAgICAgICAgICAgPFNjcmlwdCBzcmM9XCIvc2NyaXB0cy9tYWluLmpzXCIgc3RyYXRlZ3k9XCJhZnRlckludGVyYWN0aXZlXCIgLz5cclxuICAgICAgICA8L0FwcENvbnRleHQuUHJvdmlkZXI+XHJcbiAgICApO1xyXG59XHJcbiJdLCJuYW1lcyI6WyJSZWFjdCIsIlNjcmlwdCIsIkhlYWQiLCJFcnJvckJvdW5kYXJ5IiwiQXBwQ29udGV4dCIsImNyZWF0ZUNvbnRleHQiLCJwYWdlUHJvcHMiLCJEYXRhU3F1aXJlbCIsIkNvbXBvbmVudCIsIlByb3ZpZGVyIiwidmFsdWUiLCJtZXRhIiwibmFtZSIsImNvbnRlbnQiLCJzcmMiLCJzdHJhdGVneSJdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./pages/_app.js\n"); - -/***/ }), - -/***/ "./pages/_document.js": -/*!****************************!*\ - !*** ./pages/_document.js ***! - \****************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Document)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"react/jsx-dev-runtime\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var next_document__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/document */ \"./node_modules/next/document.js\");\n/* harmony import */ var next_document__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_document__WEBPACK_IMPORTED_MODULE_2__);\n// @ts-check\n/**\r\n * ==============================================================================\r\n * Imports\r\n * ==============================================================================\r\n */ \n\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n\n/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**\r\n * ==============================================================================\r\n * Main Component { Functional }\r\n * ==============================================================================\r\n * @param {Object} props - Server props\r\n */ function Document(props) {\n /**\r\n * Get Contexts\r\n *\r\n * @abstract { React.useContext }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Javascript Variables\r\n *\r\n * @abstract Non hook variables and functions\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * React Hooks\r\n *\r\n * @abstract { useState, useEffect, useRef, etc ... }\r\n */ ////////////////////////////////////////\n ////////////////////////////////////////\n ////////////////////////////////////////\n /**\r\n * Function Return\r\n *\r\n * @abstract Main Function Return\r\n */ return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(next_document__WEBPACK_IMPORTED_MODULE_2__.Html, {\n lang: \"en\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(next_document__WEBPACK_IMPORTED_MODULE_2__.Head, {\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"author\",\n content: \"Datasquirel\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 68,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"Copyright\",\n content: `Copyright (c) ${new Date().getFullYear()} Datasquirel`\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 69,\n columnNumber: 17\n }, this),\n \"dev_dev\"?.match(/dev/) && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"robots\",\n content: \"noindex,nofollow\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 75,\n columnNumber: 21\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"link\", {\n rel: \"preconnect\",\n href: \"https://fonts.googleapis.com/\",\n crossOrigin: \"anonymous\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 78,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"link\", {\n rel: \"preconnect\",\n href: \"https://fonts.gstatic.com\",\n crossOrigin: \"anonymous\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 83,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"link\", {\n rel: \"stylesheet\",\n href: \"https://fonts.googleapis.com/css?family=Poppins\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 89,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"link\", {\n rel: \"stylesheet\",\n href: \"https://fonts.googleapis.com/css?family=Inter\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 93,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"link\", {\n rel: \"stylesheet\",\n href: \"https://fonts.googleapis.com/css?family=IBM+Plex+Mono\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 97,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"script\", {\n src: \"/scripts/themeSelector.js\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 102,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n httpEquiv: \"Content-Type\",\n content: \"text/html; charset=UTF-8\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 104,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n property: \"og:site_name\",\n content: \"DATASQUIREL\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 109,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n property: \"og:type\",\n content: \"website\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 110,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"twitter:card\",\n content: \"summary\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 112,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n property: \"og:image\",\n content: \"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 114,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n itemProp: \"image\",\n content: \"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 118,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"meta\", {\n name: \"twitter:image\",\n content: \"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 122,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"link\", {\n rel: \"stylesheet\",\n href: \"/styles/prism.css\"\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 127,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"script\", {\n src: \"/scripts/prism.js\",\n async: true\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 128,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"script\", {\n dangerouslySetInnerHTML: {\n __html: \"var DSQL = {}\"\n }\n }, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 130,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 67,\n columnNumber: 13\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"body\", {\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(next_document__WEBPACK_IMPORTED_MODULE_2__.Main, {}, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 135,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(next_document__WEBPACK_IMPORTED_MODULE_2__.NextScript, {}, void 0, false, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 136,\n columnNumber: 17\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 134,\n columnNumber: 13\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/app/pages/_document.js\",\n lineNumber: 66,\n columnNumber: 9\n }, this);\n////////////////////////////////////////\n////////////////////////////////////////\n////////////////////////////////////////\n} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ \n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9wYWdlcy9fZG9jdW1lbnQuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLFlBQVk7QUFFWjs7OztDQUlDO0FBQ3lCO0FBRTFCLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDeEMsd0NBQXdDO0FBRXFCO0FBRTdELG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBQ25GLG1GQUFtRixHQUNuRixtRkFBbUYsR0FDbkYsbUZBQW1GLEdBRW5GOzs7OztDQUtDLEdBQ2MsU0FBU0ssU0FBU0MsS0FBSztJQUNsQzs7OztLQUlDLEdBRUQsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFFeEM7Ozs7S0FJQyxHQUVELHdDQUF3QztJQUN4Qyx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBRXhDOzs7O0tBSUMsR0FFRCx3Q0FBd0M7SUFDeEMsd0NBQXdDO0lBQ3hDLHdDQUF3QztJQUV4Qzs7OztLQUlDLEdBQ0QscUJBQ0ksOERBQUNMLCtDQUFJQTtRQUFDTSxNQUFLOzswQkFDUCw4REFBQ0wsK0NBQUlBOztrQ0FDRCw4REFBQ007d0JBQUtDLE1BQUs7d0JBQVNDLFNBQVE7Ozs7OztrQ0FDNUIsOERBQUNGO3dCQUNHQyxNQUFLO3dCQUNMQyxTQUFTLENBQUMsY0FBYyxFQUFFLElBQUlDLE9BQU9DLFdBQVcsR0FBRyxZQUFZLENBQUM7Ozs7OztvQkFHbkVDLFNBQXFDLEVBQUVHLE1BQU0sd0JBQzFDLDhEQUFDUjt3QkFBS0MsTUFBSzt3QkFBU0MsU0FBUTs7Ozs7O2tDQUdoQyw4REFBQ087d0JBQ0dDLEtBQUk7d0JBQ0pDLE1BQUs7d0JBQ0xDLGFBQVk7Ozs7OztrQ0FFaEIsOERBQUNIO3dCQUNHQyxLQUFJO3dCQUNKQyxNQUFLO3dCQUNMQyxhQUFZOzs7Ozs7a0NBR2hCLDhEQUFDSDt3QkFDR0MsS0FBSTt3QkFDSkMsTUFBSzs7Ozs7O2tDQUVULDhEQUFDRjt3QkFDR0MsS0FBSTt3QkFDSkMsTUFBSzs7Ozs7O2tDQUVULDhEQUFDRjt3QkFDR0MsS0FBSTt3QkFDSkMsTUFBSzs7Ozs7O2tDQUdULDhEQUFDRTt3QkFBT0MsS0FBSTs7Ozs7O2tDQUVaLDhEQUFDZDt3QkFDR2UsV0FBVTt3QkFDVmIsU0FBUTs7Ozs7O2tDQUdaLDhEQUFDRjt3QkFBS2dCLFVBQVM7d0JBQWVkLFNBQVE7Ozs7OztrQ0FDdEMsOERBQUNGO3dCQUFLZ0IsVUFBUzt3QkFBVWQsU0FBUTs7Ozs7O2tDQUVqQyw4REFBQ0Y7d0JBQUtDLE1BQUs7d0JBQWVDLFNBQVE7Ozs7OztrQ0FFbEMsOERBQUNGO3dCQUNHZ0IsVUFBUzt3QkFDVGQsU0FBUTs7Ozs7O2tDQUVaLDhEQUFDRjt3QkFDR2lCLFVBQVM7d0JBQ1RmLFNBQVE7Ozs7OztrQ0FFWiw4REFBQ0Y7d0JBQ0dDLE1BQUs7d0JBQ0xDLFNBQVE7Ozs7OztrQ0FHWiw4REFBQ087d0JBQUtDLEtBQUk7d0JBQWFDLE1BQUs7Ozs7OztrQ0FDNUIsOERBQUNFO3dCQUFPQyxLQUFJO3dCQUFvQkksS0FBSzs7Ozs7O2tDQUVyQyw4REFBQ0w7d0JBQ0dNLHlCQUF5Qjs0QkFBRUMsUUFBUTt3QkFBZ0I7Ozs7Ozs7Ozs7OzswQkFHM0QsOERBQUNDOztrQ0FDRyw4REFBQzFCLCtDQUFJQTs7Ozs7a0NBQ0wsOERBQUNDLHFEQUFVQTs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFLdkIsd0NBQXdDO0FBQ3hDLHdDQUF3QztBQUN4Qyx3Q0FBd0M7QUFDNUMsRUFFQSxtRkFBbUYsSUFDbkYsbUZBQW1GLElBQ25GLG1GQUFtRixJQUNuRixtRkFBbUYsSUFDbkYsbUZBQW1GLElBQ25GLG1GQUFtRiIsInNvdXJjZXMiOlsiL2FwcC9wYWdlcy9fZG9jdW1lbnQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQHRzLWNoZWNrXHJcblxyXG4vKipcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqIEltcG9ydHNcclxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHJcbiAqL1xyXG5pbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XHJcblxyXG4vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbi8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL1xyXG5cclxuaW1wb3J0IHsgSHRtbCwgSGVhZCwgTWFpbiwgTmV4dFNjcmlwdCB9IGZyb20gXCJuZXh0L2RvY3VtZW50XCI7XHJcblxyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG5cclxuLyoqXHJcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxyXG4gKiBNYWluIENvbXBvbmVudCB7IEZ1bmN0aW9uYWwgfVxyXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cclxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gU2VydmVyIHByb3BzXHJcbiAqL1xyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBEb2N1bWVudChwcm9wcykge1xyXG4gICAgLyoqXHJcbiAgICAgKiBHZXQgQ29udGV4dHNcclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgeyBSZWFjdC51c2VDb250ZXh0IH1cclxuICAgICAqL1xyXG5cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cclxuXHJcbiAgICAvKipcclxuICAgICAqIEphdmFzY3JpcHQgVmFyaWFibGVzXHJcbiAgICAgKlxyXG4gICAgICogQGFic3RyYWN0IE5vbiBob29rIHZhcmlhYmxlcyBhbmQgZnVuY3Rpb25zXHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZWFjdCBIb29rc1xyXG4gICAgICpcclxuICAgICAqIEBhYnN0cmFjdCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QsIHVzZVJlZiwgZXRjIC4uLiB9XHJcbiAgICAgKi9cclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqXHJcbiAgICAgKiBAYWJzdHJhY3QgTWFpbiBGdW5jdGlvbiBSZXR1cm5cclxuICAgICAqL1xyXG4gICAgcmV0dXJuIChcclxuICAgICAgICA8SHRtbCBsYW5nPVwiZW5cIj5cclxuICAgICAgICAgICAgPEhlYWQ+XHJcbiAgICAgICAgICAgICAgICA8bWV0YSBuYW1lPVwiYXV0aG9yXCIgY29udGVudD1cIkRhdGFzcXVpcmVsXCIgLz5cclxuICAgICAgICAgICAgICAgIDxtZXRhXHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZT1cIkNvcHlyaWdodFwiXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudD17YENvcHlyaWdodCAoYykgJHtuZXcgRGF0ZSgpLmdldEZ1bGxZZWFyKCl9IERhdGFzcXVpcmVsYH1cclxuICAgICAgICAgICAgICAgID48L21ldGE+XHJcblxyXG4gICAgICAgICAgICAgICAge3Byb2Nlc3MuZW52Lk5FWFRfUFVCTElDX0RTUUxfSE9TVF9FTlY/Lm1hdGNoKC9kZXYvKSAmJiAoXHJcbiAgICAgICAgICAgICAgICAgICAgPG1ldGEgbmFtZT1cInJvYm90c1wiIGNvbnRlbnQ9XCJub2luZGV4LG5vZm9sbG93XCI+PC9tZXRhPlxyXG4gICAgICAgICAgICAgICAgKX1cclxuXHJcbiAgICAgICAgICAgICAgICA8bGlua1xyXG4gICAgICAgICAgICAgICAgICAgIHJlbD1cInByZWNvbm5lY3RcIlxyXG4gICAgICAgICAgICAgICAgICAgIGhyZWY9XCJodHRwczovL2ZvbnRzLmdvb2dsZWFwaXMuY29tL1wiXHJcbiAgICAgICAgICAgICAgICAgICAgY3Jvc3NPcmlnaW49XCJhbm9ueW1vdXNcIlxyXG4gICAgICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgICAgIDxsaW5rXHJcbiAgICAgICAgICAgICAgICAgICAgcmVsPVwicHJlY29ubmVjdFwiXHJcbiAgICAgICAgICAgICAgICAgICAgaHJlZj1cImh0dHBzOi8vZm9udHMuZ3N0YXRpYy5jb21cIlxyXG4gICAgICAgICAgICAgICAgICAgIGNyb3NzT3JpZ2luPVwiYW5vbnltb3VzXCJcclxuICAgICAgICAgICAgICAgIC8+XHJcblxyXG4gICAgICAgICAgICAgICAgPGxpbmtcclxuICAgICAgICAgICAgICAgICAgICByZWw9XCJzdHlsZXNoZWV0XCJcclxuICAgICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9mb250cy5nb29nbGVhcGlzLmNvbS9jc3M/ZmFtaWx5PVBvcHBpbnNcIlxyXG4gICAgICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgICAgIDxsaW5rXHJcbiAgICAgICAgICAgICAgICAgICAgcmVsPVwic3R5bGVzaGVldFwiXHJcbiAgICAgICAgICAgICAgICAgICAgaHJlZj1cImh0dHBzOi8vZm9udHMuZ29vZ2xlYXBpcy5jb20vY3NzP2ZhbWlseT1JbnRlclwiXHJcbiAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgPGxpbmtcclxuICAgICAgICAgICAgICAgICAgICByZWw9XCJzdHlsZXNoZWV0XCJcclxuICAgICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9mb250cy5nb29nbGVhcGlzLmNvbS9jc3M/ZmFtaWx5PUlCTStQbGV4K01vbm9cIlxyXG4gICAgICAgICAgICAgICAgLz5cclxuXHJcbiAgICAgICAgICAgICAgICA8c2NyaXB0IHNyYz1cIi9zY3JpcHRzL3RoZW1lU2VsZWN0b3IuanNcIj48L3NjcmlwdD5cclxuXHJcbiAgICAgICAgICAgICAgICA8bWV0YVxyXG4gICAgICAgICAgICAgICAgICAgIGh0dHBFcXVpdj1cIkNvbnRlbnQtVHlwZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudD1cInRleHQvaHRtbDsgY2hhcnNldD1VVEYtOFwiXHJcbiAgICAgICAgICAgICAgICAvPlxyXG5cclxuICAgICAgICAgICAgICAgIDxtZXRhIHByb3BlcnR5PVwib2c6c2l0ZV9uYW1lXCIgY29udGVudD1cIkRBVEFTUVVJUkVMXCIgLz5cclxuICAgICAgICAgICAgICAgIDxtZXRhIHByb3BlcnR5PVwib2c6dHlwZVwiIGNvbnRlbnQ9XCJ3ZWJzaXRlXCIgLz5cclxuXHJcbiAgICAgICAgICAgICAgICA8bWV0YSBuYW1lPVwidHdpdHRlcjpjYXJkXCIgY29udGVudD1cInN1bW1hcnlcIiAvPlxyXG5cclxuICAgICAgICAgICAgICAgIDxtZXRhXHJcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydHk9XCJvZzppbWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudD1cImh0dHBzOi8vc3RhdGljLmRhdGFzcXVpcmVsLmNvbS9pbWFnZXMvdXNlci1pbWFnZXMvdXNlci0yL2VtYWlsLWJhbm5lci5qcGVnXCJcclxuICAgICAgICAgICAgICAgIC8+XHJcbiAgICAgICAgICAgICAgICA8bWV0YVxyXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wPVwiaW1hZ2VcIlxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ9XCJodHRwczovL3N0YXRpYy5kYXRhc3F1aXJlbC5jb20vaW1hZ2VzL3VzZXItaW1hZ2VzL3VzZXItMi9lbWFpbC1iYW5uZXIuanBlZ1wiXHJcbiAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgPG1ldGFcclxuICAgICAgICAgICAgICAgICAgICBuYW1lPVwidHdpdHRlcjppbWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudD1cImh0dHBzOi8vc3RhdGljLmRhdGFzcXVpcmVsLmNvbS9pbWFnZXMvdXNlci1pbWFnZXMvdXNlci0yL2VtYWlsLWJhbm5lci5qcGVnXCJcclxuICAgICAgICAgICAgICAgIC8+XHJcblxyXG4gICAgICAgICAgICAgICAgPGxpbmsgcmVsPVwic3R5bGVzaGVldFwiIGhyZWY9XCIvc3R5bGVzL3ByaXNtLmNzc1wiIC8+XHJcbiAgICAgICAgICAgICAgICA8c2NyaXB0IHNyYz1cIi9zY3JpcHRzL3ByaXNtLmpzXCIgYXN5bmM+PC9zY3JpcHQ+XHJcblxyXG4gICAgICAgICAgICAgICAgPHNjcmlwdFxyXG4gICAgICAgICAgICAgICAgICAgIGRhbmdlcm91c2x5U2V0SW5uZXJIVE1MPXt7IF9faHRtbDogXCJ2YXIgRFNRTCA9IHt9XCIgfX1cclxuICAgICAgICAgICAgICAgID48L3NjcmlwdD5cclxuICAgICAgICAgICAgPC9IZWFkPlxyXG4gICAgICAgICAgICA8Ym9keT5cclxuICAgICAgICAgICAgICAgIDxNYWluIC8+XHJcbiAgICAgICAgICAgICAgICA8TmV4dFNjcmlwdCAvPlxyXG4gICAgICAgICAgICA8L2JvZHk+XHJcbiAgICAgICAgPC9IdG1sPlxyXG4gICAgKTtcclxuXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXHJcbn1cclxuXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbi8qKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi9cclxuLyoqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xyXG4vKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovXHJcbiJdLCJuYW1lcyI6WyJSZWFjdCIsIkh0bWwiLCJIZWFkIiwiTWFpbiIsIk5leHRTY3JpcHQiLCJEb2N1bWVudCIsInByb3BzIiwibGFuZyIsIm1ldGEiLCJuYW1lIiwiY29udGVudCIsIkRhdGUiLCJnZXRGdWxsWWVhciIsInByb2Nlc3MiLCJlbnYiLCJORVhUX1BVQkxJQ19EU1FMX0hPU1RfRU5WIiwibWF0Y2giLCJsaW5rIiwicmVsIiwiaHJlZiIsImNyb3NzT3JpZ2luIiwic2NyaXB0Iiwic3JjIiwiaHR0cEVxdWl2IiwicHJvcGVydHkiLCJpdGVtUHJvcCIsImFzeW5jIiwiZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUwiLCJfX2h0bWwiLCJib2R5Il0sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./pages/_document.js\n"); - -/***/ }), - -/***/ "./styles/less.css": -/*!*************************!*\ - !*** ./styles/less.css ***! - \*************************/ -/***/ (() => { - - - -/***/ }), - -/***/ "./styles/tailwind.css": -/*!*****************************!*\ - !*** ./styles/tailwind.css ***! - \*****************************/ -/***/ (() => { - - - -/***/ }), - -/***/ "next/dist/compiled/next-server/pages.runtime.dev.js": -/*!**********************************************************************!*\ - !*** external "next/dist/compiled/next-server/pages.runtime.dev.js" ***! - \**********************************************************************/ -/***/ ((module) => { - -"use strict"; -module.exports = require("next/dist/compiled/next-server/pages.runtime.dev.js"); - -/***/ }), - -/***/ "next/head": -/*!****************************!*\ - !*** external "next/head" ***! - \****************************/ -/***/ ((module) => { - -"use strict"; -module.exports = require("next/head"); - -/***/ }), - -/***/ "react": -/*!************************!*\ - !*** external "react" ***! - \************************/ -/***/ ((module) => { - -"use strict"; -module.exports = require("react"); - -/***/ }), - -/***/ "react-dom": -/*!****************************!*\ - !*** external "react-dom" ***! - \****************************/ -/***/ ((module) => { - -"use strict"; -module.exports = require("react-dom"); - -/***/ }), - -/***/ "react/jsx-dev-runtime": -/*!****************************************!*\ - !*** external "react/jsx-dev-runtime" ***! - \****************************************/ -/***/ ((module) => { - -"use strict"; -module.exports = require("react/jsx-dev-runtime"); - -/***/ }), - -/***/ "react/jsx-runtime": -/*!************************************!*\ - !*** external "react/jsx-runtime" ***! - \************************************/ -/***/ ((module) => { - -"use strict"; -module.exports = require("react/jsx-runtime"); - -/***/ }), - -/***/ "path": -/*!***********************!*\ - !*** external "path" ***! - \***********************/ -/***/ ((module) => { - -"use strict"; -module.exports = require("path"); - -/***/ }) - -}; -; - -// load runtime -var __webpack_require__ = require("./webpack-runtime.js"); -__webpack_require__.C(exports); -var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) -var __webpack_exports__ = __webpack_require__.X(0, ["vendor-chunks/next","vendor-chunks/@swc","vendor-chunks/lucide-react"], () => (__webpack_exec__("./node_modules/next/dist/build/webpack/loaders/next-route-loader/index.js?kind=PAGES&page=%2F_error&preferredRegion=&absolutePagePath=.%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&absoluteAppPath=private-next-pages%2F_app&absoluteDocumentPath=private-next-pages%2F_document&middlewareConfigBase64=e30%3D!"))); -module.exports = __webpack_exports__; - -})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/1251.js b/dsql-app/.local_dist/server/chunks/1251.js new file mode 100644 index 0000000..6322b71 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/1251.js @@ -0,0 +1 @@ +"use strict";exports.id=1251,exports.ids=[1251],exports.modules={96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},98e3:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(72583),a=r.n(n),o=r(92652),s=r(30802),l=r(48786),c=r(37275),i=r(68829),u=r(7971);async function d({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:d,tableSchema:p,duplicateColumnName:f,duplicateColumnValue:_,update:g,encryptionKey:h,encryptionSalt:y,useLocal:S}){let E=!!S||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),m=S?u.A:E?l.A:c.default;if(d?.date_created_timestamp&&delete d.date_created_timestamp,d?.date_updated_timestamp&&delete d.date_updated_timestamp,d?.date_updated&&delete d.date_updated,d?.date_updated_code&&delete d.date_updated_code,d?.date_created&&delete d.date_created,d?.date_created_code&&delete d.date_created_code,f&&"string"==typeof f){let a=E?await m(`SELECT * FROM \`${n}\` WHERE \`${f}\`=?`,[_]):await m({paradigm:"Read Only",queryString:`SELECT * FROM \`${r}\`.\`${n}\` WHERE \`${f}\`=?`,queryValues:[_]});if(a?.[0]&&!g)return null;if(a&&a[0]&&g)return await (0,s.A)({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:d,tableSchema:p,encryptionKey:h,encryptionSalt:y,identifierColumnName:f,identifierValue:_||""})}let D=Object.keys(d),A=[],N=[];for(let e=0;ee.fieldName==t):null,s=n&&n[0]?n[0]:null;if(null==r||void 0==r||s?.dataType?.match(/int$/i)&&"string"==typeof r&&!r?.match(/./))continue;s?.encrypted&&(r=(0,i.default)({data:r,encryptionKey:h,encryptionSalt:y}),console.log("DSQL: Encrypted value =>",r));let l=/<[^>]+>/g;(s?.richText||String(r).match(l))&&(r=a()(r,o.A)),s?.pattern&&!new RegExp(s.pattern,s.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),A.push("`"+t+"`"),"object"==typeof r&&(r=JSON.stringify(r)),"number"==typeof r?N.push(String(r)):N.push(r)}catch(e){console.log("DSQL: Error in parsing data keys =>",e.message);continue}d?.date_created||(A.push("`date_created`"),N.push(Date())),d?.date_created_code||(A.push("`date_created_code`"),N.push(Date.now())),d?.date_updated||(A.push("`date_updated`"),N.push(Date())),d?.date_updated_code||(A.push("`date_updated_code`"),N.push(Date.now()));let L=`INSERT INTO \`${r}\`.\`${n}\` (${A.join(",")}) VALUES (${N.map(()=>"?").join(",")})`;return E?await m(L,N):await m({paradigm:t,queryString:L,queryValues:N})}},30802:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(72583),a=r.n(n),o=r(92652),s=r(48786),l=r(37275),c=r(68829),i=r(7971);async function u({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:u,tableSchema:d,identifierColumnName:p,identifierValue:f,encryptionKey:_,encryptionSalt:g,useLocal:h}){if(!u||!Object.keys(u).length)return null;let y=!!h||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),S=h?i.A:y?s.A:l.default,E=Object.keys(u),m=[],D=[];for(let e=0;ee.fieldName===t):null,s=n&&n[0]?n[0]:null;if(null==r||void 0==r)continue;let l=/<[^>]+>/g;(s?.richText||String(r).match(l))&&(r=a()(r,o.A)),s?.encrypted&&(r=(0,c.default)({data:r,encryptionKey:_,encryptionSalt:g})),"object"==typeof r&&(r=JSON.stringify(r)),s?.pattern&&!new RegExp(s.pattern,s.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),m.push(`\`${t}\`=?`),"number"==typeof r?D.push(String(r)):D.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}m.push(`date_updated='${Date()}'`),m.push(`date_updated_code='${Date.now()}'`);let A=`UPDATE \`${r}\`.\`${n}\` SET ${m.join(",")} WHERE \`${p}\`=?`;return D.push(f),y?await S(A,D):await S({paradigm:t,queryString:A,queryValues:D})}},92652:(e,t,r)=>{r.d(t,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},68829:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(55511),a=r(79428);function o({data:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=t||process.env.DSQL_ENCRYPTION_PASSWORD,s=r||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!s?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=(0,n.scryptSync)(o,s,l),i=a.Buffer.alloc(16,0),u=(0,n.createCipheriv)("aes-192-cbc",c,i);try{let t=u.update(e,"utf8","hex");return t+=u.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},48786:(e,t,r)=>{r.d(t,{A:()=>n});async function n(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},37275:(e,t,r)=>{async function n(e,t,r){try{if("string"==typeof t){let n=await e.query(a(t),r);return JSON.parse(JSON.stringify(n))}if("object"!=typeof t)return null;{let r=[];for(let n=0;no})},7971:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(9973),a=r.n(n),o=r(29021),s=r.n(o);async function l(...e){let t=a()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!s().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:s().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,r)=>{e.exports=r(75600)}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/1579.js b/dsql-app/.local_dist/server/chunks/1579.js new file mode 100644 index 0000000..5da2cd1 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/1579.js @@ -0,0 +1 @@ +"use strict";exports.id=1579,exports.ids=[1579],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},37195:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732),n=t(82015),r=t.n(n);t(46169);var d=t(91140),i=t(16757);function s({setDbImage:e}){let[a,t]=r().useState(!0);r().useState(null);let[n,s]=r().useState(null);return(0,l.jsxs)(d.Ay,{title:"user-media-popup",children:[a&&(0,l.jsx)(i.A,{width:"20px"}),(0,l.jsx)("h4",{className:"m-0 text-lg",children:"Your Uploaded Images"}),(0,l.jsx)("div",{className:"grid grid-cols-2",children:n?.[0]&&n.filter(e=>"image"==e.media_type).map((a,t)=>(0,l.jsx)("div",{className:"w-full h-44 cursor-pointer hover:opacity-70",onClick:t=>{e(a.media_thumbnail_url||null),(0,d.fs)()},children:(0,l.jsx)("img",{src:a.media_thumbnail_url,alt:"User Media",className:"w-full h-full object-contain"})},t+1))})]})}},10621:(e,a,t)=>{t.d(a,{A:()=>n});var l=t(8732);function n({message:e}){return(0,l.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,l.jsx)("span",{children:e})]})}t(82015)},91140:(e,a,t)=>{t.d(a,{Ay:()=>i,PB:()=>s,fs:()=>c});var l=t(8732),n=t(58150),r=t(82015),d=t.n(r);function i({children:e,title:a,data:t,fullPage:r,wrapperClasses:i,closePopupDispatch:s,wrapperStyle:p,noContainer:o}){return r?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":a||null,style:p,children:[o?(0,l.jsx)(d().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),s&&s()},children:(0,l.jsx)(n.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),s&&s()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[o?(0,l.jsx)(d().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),s&&s()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),o&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),s&&s()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),s&&s()}})]})}function s(e,a){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",a?.(t))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},55904:(e,a,t)=>{t.d(a,{A:()=>d});var l=t(8732),n=t(82015),r=t.n(n);function d({children:e,column:a,className:t}){let n=r().useRef();return(0,l.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(t?" "+t:""),ref:n,children:e})}},65842:(e,a,t)=>{t.d(a,{A:()=>n});var l=t(76102);let n=t.n(l)().media.imageInputFileToBase64},23293:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,a)=>{Object.defineProperty(a,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/1614.js b/dsql-app/.local_dist/server/chunks/1614.js deleted file mode 100644 index b225a7d..0000000 --- a/dsql-app/.local_dist/server/chunks/1614.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=1614,exports.ids=[1614],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},77826:(e,a,t)=>{t.d(a,{A:()=>r});var l=t(8732),n=t(82015),i=t.n(n),c=t(79100);function r({user:e,userImage:a,setUserImage:t,database:n,className:r}){let d=i().useRef();return(0,l.jsxs)("div",{className:"card no-hover col"+(r?" "+r:""),children:[(0,l.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,l.jsx)("img",{src:a?"string"==typeof a?a:a.imageBase64Full:"/images/user-preset.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:d,"data-imagepreview":"image"})}),(0,l.jsxs)("div",{className:"w-full flex-col image-selector-wrapper",children:[(0,l.jsx)("div",{className:"button outlined secondary w-full whitespace-normal",onClick:e=>{e.target.closest(".image-selector-wrapper").querySelector("input").click()},children:"Upload Image"}),(0,l.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{t(await (0,c.A)({imageInputFile:e.target.files[0],maxWidth:400}))}})]})]})}t(55158)},55158:(e,a,t)=>{t.d(a,{Ay:()=>r,PB:()=>d,fs:()=>s});var l=t(8732),n=t(58150),i=t(82015),c=t.n(i);function r({children:e,title:a,data:t,fullPage:i,wrapperClasses:r,closePopupDispatch:d,wrapperStyle:o,noContainer:p}){return i?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(r||""),"data-popupid":a||null,style:o,children:[p?(0,l.jsx)(c().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{s(),d&&d()},children:(0,l.jsx)(n.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{s(),d&&d()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,l.jsx)(c().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{s(),d&&d()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{s(),d&&d()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{s(),d&&d()}})]})}function d(e,a){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",a&&a(t))}function s(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},79100:(e,a,t)=>{t.d(a,{A:()=>l});async function l({imageInputFile:e,maxWidth:a}){let t,l,n=document.querySelector("[data-imagepreview='image']"),i=e.name.replace(/\..*/,""),c=document.createElement("canvas"),r=e.type,d=a||null,s=URL.createObjectURL(e),o=new Image;return o.src=s,t=await new Promise((e,a)=>{o.onerror=function(){URL.revokeObjectURL(this.src),console.log("Cannot load image")},o.onload=function(){if(URL.revokeObjectURL(this.src),d){let e=d/o.naturalWidth;c.width=o.naturalWidth{e.src=t}),e(t)}}),l=await new Promise((e,a)=>{c.toBlob(a=>{e(a?.size)},r,.95)}),{imageBase64:t.replace(/.*?base64,/,""),imageBase64Full:t,imageName:i,imageSize:l}}},23293:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,a)=>{var t;Object.defineProperty(a,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/194.js b/dsql-app/.local_dist/server/chunks/194.js new file mode 100644 index 0000000..e45885f --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/194.js @@ -0,0 +1 @@ +"use strict";exports.id=194,exports.ids=[194],exports.modules={61347:(e,a,t)=>{let l;t.d(a,{A:()=>b});var s=t(8732),i=t(82015),d=t.n(i),n=t(24872),r=t(10621),c=t(46169),u=t(72390);async function o({e,setLoading:a,dbImage:t,database:l,user:s}){a(!0);let i={db_description:e.target.database_description?.value?.match(/./)?e.target.database_description.value:null,db_name:e.target.database_name?.value?.match(/./)?e.target.database_name.value:null,db_slug:e.target.database_slug?.value?.match(/./)?e.target.database_slug.value:null,db_full_name:l.db_full_name,id:l.id,active_clone:l.active_clone,active_clone_parent_db:l.active_clone_parent_db};if(t){if("string"==typeof t)i.db_image=t;else if("object"==typeof t){let e=await (0,c.A)("/api/addUserMedia",{method:"post",body:{media:[t],folder:i.db_slug.replace(/_/g,"-"),type:"image"}},!0);i.db_image=e?.mediaData[0]?.media_thumbnail_url?e.mediaData[0].media_thumbnail_url:"/images/database-placeholder.png"}}else i.db_image="/images/database-placeholder.png";(0,c.A)("/api/updateUserDatabase",{method:"post",body:i},!0).then(e=>{e.success?(0,u.A)().then(()=>{window.location.pathname=`/admin/${s?.id}/databases`,setTimeout(()=>{a(!1)},1e3)}):(alert("Error! Please Try Again"),setTimeout(()=>{a(!1)},1e3))})}async function m({e,setLoading:a,dbImage:t,keepUpdated:l,keepDataUpdated:s,query:i,user:d}){a(!0);let n={db_name:e.target.database_name.value,db_slug:e.target.database_slug.value,db_description:e.target.database_description?.value?.match(/./)?e.target.database_description.value:null};if(t){if("string"==typeof t)n.db_image=t;else if("object"==typeof t){let e=await (0,c.A)("/api/addUserMedia",{method:"post",body:{media:[t],folder:n.db_slug.replace(/_/g,"-"),type:"image"}},!0);n.db_image=e?.mediaData[0]?.media_thumbnail_url?e.mediaData[0].media_thumbnail_url:"/images/database-placeholder.png"}}i?.duplicate&&(n.duplicate=i.duplicate,n.keepUpdated=!!l&&l,n.keepDataUpdated=!!s&&s),(0,c.A)("/api/createUserDatabase",{method:"post",body:n},!0).then(e=>{e.success?(0,u.A)().then(()=>{window.location.pathname=`/admin/${d?.id}/databases/${n.db_slug}`}):setTimeout(()=>{a(!1)},1e3)})}var p=t(2913);function b({user:e,dbImage:a,setDbImage:t,database:i,setLoading:c,query:u}){async function b(a){return i?.db_slug===a?null:await (0,n.A)({tableName:"user_databases",columnName:"db_slug",value:a,userId:e.id})}let[g,h]=d().useState(null),[f,_]=d().useState(!1),[x,w]=d().useState(!1);return(0,s.jsxs)("form",{className:"w-full max-w-none xl:max-w-lg flex flex-col items-start gap-4 relative",onSubmit:t=>{t.preventDefault(),i?o({e:t,setLoading:c,dbImage:a,database:i,user:e}):m({e:t,setLoading:c,dbImage:a,keepUpdated:f,keepDataUpdated:x,query:u,user:e})},children:[g&&(0,s.jsx)(r.A,{message:g}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"database_name",children:"Name"}),(0,s.jsx)("input",{type:"text",name:"database_name",id:"database_name",placeholder:"Database Name",onInput:async e=>{let a=e.target,t=a.closest("form");if(a.value.match(/./)?(a.classList.remove("warning"),h(null)):a.classList.add("warning"),t){t.database_slug.value=a.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,"");let e=t.database_slug.value;window.clearTimeout(l),l=setTimeout(()=>{b(e).then(e=>{e?.result?(t.database_slug.classList.add("warning"),h("Duplicate Database Name")):(t.database_slug.classList.remove("warning"),h(null))})},300)}},defaultValue:i?i.db_name:"",required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"database_slug",children:"Slug"}),(0,s.jsx)("input",{type:"text",name:"database_slug",id:"database_slug",placeholder:"Database Slug",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),h(null)):a.classList.add("warning");let t=a.value;window.clearTimeout(l),l=setTimeout(()=>{b(t).then(e=>{e?.result?(a.classList.add("warning"),h("Duplicate Database Name")):(a.classList.remove("warning"),h(null))})},300)},defaultValue:i?i.db_slug:"",required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"database_description",children:"Description (optional)"}),(0,s.jsx)("textarea",{name:"database_description",id:"database_description",placeholder:"Short Description of database",defaultValue:i?i.db_description:""})]}),u?.duplicate&&(0,s.jsx)(d().Fragment,{children:(0,s.jsxs)("div",{className:"card col items-start",children:[(0,s.jsx)(p.A,{checkBoxValues:[{payload:"Keep New Database Updated?",title:"Keep New Database Updated?",name:"clone_database",onChangeHandler:e=>{e.target.checked?_(!0):_(!1)}}]}),(0,s.jsx)("span",{className:"text-sm italic text-slate-600 dark:text-slate-300",children:"By checking this box the new Database stays up to date with changes to the structure of the parent Database"})]})}),(0,s.jsxs)("button",{type:"submit",className:"w-full",children:[i?"Update":"Create"," Database"]})]})}},89088:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(8732),s=t(82015),i=t.n(s),d=t(65842),n=t(91140),r=t(55904);function c({user:e,dbImage:a,setDbImage:t,database:s}){let c=i().useRef();return(0,l.jsxs)("div",{className:"card no-hover col items-center justify-center",children:[(0,l.jsx)("h4",{className:"m-0",children:"Database Image"}),(0,l.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,l.jsx)("img",{src:a?"string"==typeof a?a:a.imageBase64Full:"/images/database-placeholder.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:c,"data-imagepreview":"image"})}),(0,l.jsxs)("div",{className:"w-full flex-col",id:"edit-database-image-option-wrapper",children:[(0,l.jsxs)(r.A,{column:!0,className:"w-full",children:[(0,l.jsx)("button",{className:"outlined w-full whitespace-normal",onClick:e=>{(0,n.PB)("user-media-popup")},children:"Choose Image from uploads"}),(0,l.jsx)("button",{className:"outlined secondary w-full whitespace-normal",onClick:e=>{let a=e.target;a?.closest("#edit-database-image-option-wrapper")?.querySelector("input")?.click()},children:"Choose Image from Computer"})]}),(0,l.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{let a=e.target.files?.[0];t(await (0,d.A)({imageInputFile:a,maxWidth:400}))}})]})]})}},2913:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({name:e,checkBoxValues:a,setAlert:t,labelColor:s,flexRow:i,baseText:d,smallText:n,className:r}){return(0,l.jsx)("div",{className:"flex items-start gap-x-4"+(i?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(r||""),children:a.map((a,i)=>{let{payload:r,title:c,onChangeHandler:u,fixed:o,jsx:m}=a,p=a.name?`${e}-${a.name}`:r?e+"-"+r:e;return(0,l.jsxs)("div",{className:"flex items-center"+(a.default&&o?" pointer-events-none":"")+(n?" gap-1 ":" gap-2 ")+(a?.className?a.className:""),children:[(0,l.jsx)("input",{className:"m-0"+(n?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!a.default,name:p,id:p,onChange:e=>{t&&t(null),u&&u(e,a)},value:r,style:{minWidth:"20px"},...a.props}),m||(0,l.jsx)("label",{htmlFor:p,className:"m-0 "+(s||"text-slate-800 dark:text-white/80")+(d||n?" text-base":" text-lg"),children:c})]},i+1)})})}t(82015)},24872:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(46169);async function s({tableName:e,columnName:a,value:t,dbFullName:s,dispatch:i,userId:d,dbId:n}){return await (0,l.A)(`/api/checkDuplicateData?tableName=${e}&type=${a}&value=${t}${s?"&dbFullName="+s:""}${d?"&userId="+d:""}${n?"&dbId="+n:""}`)}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/2282.js b/dsql-app/.local_dist/server/chunks/2282.js new file mode 100644 index 0000000..e408e52 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/2282.js @@ -0,0 +1,25 @@ +"use strict";exports.id=2282,exports.ids=[2282],exports.modules={67619:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var l=t(29021),r=t.n(l);async function i({user:e,message:a,component:t,noMail:l,req:i}){let n=new Date,d=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],a=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],l=Array.isArray(e)?e[0]:e?.split(",")[0],r=t||l||a||i.socket.remoteAddress;if(!r)return null;return String(r)}catch(e){return null}})();try{let l=`🚀 SERVER ERROR =========================== +Error Message: ${a} +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(l+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),i?.url&&(l+=` +URL: ${i.url}`),i?.body&&(l+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),d&&(l+=` +IP: ${d}`),l+=` +Date: ${n.toDateString()} +========================================`,r().existsSync("./.tmp/error.log")||r().writeFileSync("./.tmp/error.log","","utf-8");let o=r().readFileSync("./.tmp/error.log","utf-8");r().writeFileSync("./.tmp/error.log",l),r().appendFileSync("./.tmp/error.log",` + + + + +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(55511),r=t(79428);function i({encryptedString:e,encryptionKey:a,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=a||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,d=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,l.scryptSync)(i,n,d),s=r.Buffer.alloc(16,0),u=(0,l.createDecipheriv)("aes-192-cbc",o,s);try{let a=u.update(e,"hex","utf8");return a+=u.final("utf8")}catch(a){return console.log("Error in decrypting =>",a.message),e}}},76856:(e,a,t)=>{t.d(a,{A:()=>T});var l=t(33873),r=t.n(l),i=t(29021),n=t.n(i),d=t(66866),o=t(41864);async function s({queryString:e,queryValuesArray:a}){let t;try{t=e&&a&&Array.isArray(a)&&a[0]?await (0,o.A)({query:e,values:a}):await (0,o.A)({query:e})}catch(e){console.log("Shell Vardb Error =>",e.message)}return t}function u({columnData:e,primaryKeySet:a}){let{fieldName:t,dataType:l,nullValue:r,primaryKey:i,autoIncrement:n,defaultValue:d,defaultValueLiteral:o,onUpdateLiteral:s,notNullValue:u}=e,E="";return E+=`\`${t}\` ${l}`,r?E+=" DEFAULT NULL":o?E+=` DEFAULT ${o}`:d?String(d).match(/uuid\(\)/i)?E+=" DEFAULT UUID()":E+=` DEFAULT '${d}'`:u&&(E+=" NOT NULL"),s&&(E+=` ON UPDATE ${s}`),i&&!a&&(E+=" PRIMARY KEY",a=!0),n&&(E+=" AUTO_INCREMENT",a=!0),{fieldEntryText:E,newPrimaryKeySet:a||!1}}async function E({dbFullName:e,tableName:a,tableInfoArray:l,tableSchema:r,recordedDbEntry:i}){let n=function({tableInfoArray:e}){let a=t(95610),l=e.filter(e=>e.primaryKey);return a.forEach(a=>{let t=e.filter(e=>e.fieldName===a.fieldName);t&&t[0]||("id"!==a.fieldName||l[0]?e.push(a):e.unshift(a))}),e}({tableInfoArray:l}),d=[];d.push(`CREATE TABLE IF NOT EXISTS \`${e}\`.\`${a}\` (`);try{if(!i)throw Error("Recorded Db entry not found!");let e=await s({queryString:"SELECT * FROM datasquirel.user_database_tables WHERE db_id = ? AND table_slug = ?",queryValuesArray:[i.id,r?.tableName]}),a=e?.[0];a?.id||await (0,o.A)({query:"INSERT INTO datasquirel.user_database_tables SET ?",values:{user_id:i.user_id,db_id:i.id,db_slug:i.db_slug,table_name:r?.tableFullName,table_slug:r?.tableName,child_table:r?.childTable?"1":null,child_table_parent_database:r?.childTableDbFullName||null,child_table_parent_table:r?.childTableName||null,date_created:Date(),date_created_code:Date.now(),date_updated:Date(),date_updated_code:Date.now()}})}catch(e){}let E=!1,c=[];for(let e=0;e{let l=e.fieldName,r=e.foreignKey?.destinationTableName,i=e.foreignKey?.destinationTableColumnName,n=e.foreignKey?.cascadeDelete,o=e.foreignKey?.cascadeUpdate,s=e.foreignKey?.foreignKeyName,u=a===c.length-1?"":",";d.push(` CONSTRAINT \`${s}\` FOREIGN KEY (\`${l}\`) REFERENCES \`${r}\`(${i})${n?" ON DELETE CASCADE":""}${o?" ON UPDATE CASCADE":""}${u}`)}),d.push(") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;");let N=d.join("\n");return await s({queryString:N})}let c=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function N({dbFullName:e,tableName:a,tableInfoArray:t,userId:l,dbSchema:r,tableIndexes:i,tableSchema:d,clone:E,childDb:N,tableIndex:f,tableNameFull:T,recordedDbEntry:_}){let m=[],A=t;try{let t=[];if(t.push(`ALTER TABLE \`${e}\`.\`${a}\``),N)try{if(!_)throw Error("Recorded Db entry not found!");let e=await s({queryString:"SELECT * FROM datasquirel.user_database_tables WHERE db_id = ? AND table_slug = ?",queryValuesArray:[_.id,a]}),t=e?.[0];t?.id||await (0,o.A)({query:"INSERT INTO datasquirel.user_database_tables SET ?",values:{user_id:_.user_id,db_id:_.id,db_slug:_.db_slug,table_name:T,table_slug:a,child_table:d?.childTable?"1":null,child_table_parent_database:d?.childTableDbFullName||null,child_table_parent_table:d.childTableName||null,date_created:Date(),date_created_code:Date.now(),date_updated:Date(),date_updated_code:Date.now()}})}catch(e){}let f=await s({queryString:`SHOW INDEXES FROM \`${e}\`.\`${a}\``}),S=await s({queryString:`SHOW COLUMNS FROM \`${e}\`.\`${a}\``}),b=[];for(let t=0;te.fieldName===i||e.originName===i);if(d&&d[0]){if(d[0].updatedField&&d[0].fieldName){b.push(d[0].fieldName),await s({queryString:`ALTER TABLE \`${e}\`.\`${a}\` RENAME COLUMN \`${d[0].originName}\` TO \`${d[0].fieldName}\``}),console.log(`Column Renamed from "${d[0].originName}" to "${d[0].fieldName}"`);try{let t=r.findIndex(a=>a.dbFullName===e),i=r[t].tables.findIndex(e=>e.tableName===a),o=r[t].tables[i].fields.findIndex(e=>e.fieldName===d[0].fieldName);delete r[t].tables[i].fields[o].originName,delete r[t].tables[i].fields[o].updatedField,A=r[t].tables[i].fields,n().writeFileSync(`${String(process.env.DSQL_USER_DB_SCHEMA_PATH)}/user-${l}/main.json`,JSON.stringify(r),"utf8")}catch(e){console.log("Update table error =>",e.message)}}continue}await s({queryString:`ALTER TABLE \`${e}\`.\`${a}\` DROP COLUMN \`${i}\``})}for(let t=0;te.alias===l);if(!e?.[0])throw Error(`This Index(${l}) Has been Deleted!`)}catch(t){await s({queryString:`ALTER TABLE \`${e}\`.\`${a}\` DROP INDEX \`${l}\``})}}if(i&&i[0])for(let t=0;te.Key_name===d)[0])throw Error("This Index Does not Exist")}catch(t){await s({queryString:`CREATE${l?.match(/fullText/i)?" FULLTEXT":""} INDEX \`${d}\` ON \`${e}\`.\`${a}\`(${n?.map(e=>e.value).map(e=>`\`${e}\``).join(",")}) COMMENT 'schema_index'`})}}let g=await s({queryString:`SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = '${e}' AND TABLE_NAME='${a}' AND CONSTRAINT_TYPE='FOREIGN KEY'`});if(g)for(let t=0;t{if(e.Field===c)return i=a,!0}):null,{fieldEntryText:$}=u({columnData:n});if(p&&p[0]?.Field){let{Field:e,Type:a,Null:t,Key:n,Default:s,Extra:u}=p[0],E=r1)return await s({queryString:y});return"No Changes Made to Table"}catch(e){return console.log('Error in "updateTable" shell function =>',e.message),"Error in Updating Table"}}var f=t(59338);async function T({userId:e,targetDatabase:a,dbSchemaData:t}){console.log("///////////////////////////////"),console.log("///////////////////////////////"),console.log("Rebuilding Database ..."),console.log("process.env.DSQL_DB_HOST",process.env.DSQL_DB_HOST),console.log("process.env.DSQL_DB_USERNAME",process.env.DSQL_DB_USERNAME),console.log("process.env.DSQL_DB_PASSWORD",process.env.DSQL_DB_PASSWORD),console.log("process.env.DSQL_DB_NAME",process.env.DSQL_DB_NAME);let l=e?r().join(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`/user-${e}/main.json`):r().resolve(__dirname,"../../jsonData/dbSchemas/main.json"),i=t||f.A.parse(n().readFileSync(l,"utf8"));if(!i){console.log("Schema Not Found!");return}for(let t=0;te.tableName===t)[0]){let a=n.filter(e=>e.tableNameOld&&e.tableNameOld===t);a&&a[0]?(console.log("Renaming Table"),await s({queryString:`RENAME TABLE \`${r}\`.\`${a[0].tableNameOld}\` TO \`${a[0].tableName}\``})):(console.log(`Dropping Table from ${r}`),await s({queryString:`DROP TABLE \`${r}\`.\`${t}\``}),await (0,o.A)({query:"DELETE FROM datasquirel.user_database_tables WHERE user_id = ? AND db_slug = ? AND table_slug = ?",values:[e,c,t]}))}}let A=e?await s({queryString:"SELECT * FROM datasquirel.user_databases WHERE db_full_name = ?",queryValuesArray:[r]}):void 0,S=A?.[0];for(let a=0;a0){if(await N({dbFullName:r,tableName:d,tableNameFull:t.tableFullName,tableInfoArray:o,userId:e,dbSchema:i,tableIndexes:u,tableIndex:a,childDb:l.childDatabase||void 0,recordedDbEntry:S,tableSchema:t}),t.childrenTables&&t.childrenTables[0])for(let a=0;ae.Key_name===i)[0])throw Error("This Index Does not Exist")}catch(e){await s({queryString:`CREATE${a?.match(/fullText/i)?" FULLTEXT":""} INDEX \`${i}\` ON \`${r}\`.\`${d}\`(${l?.map(e=>e.value).map(e=>`\`${e}\``).join(",")}) COMMENT 'schema_index'`})}}}if(f?.[0])for(let a=0;a{t.d(a,{A:()=>d});var l=t(29021),r=t.n(l),i=t(33873),n=t.n(i);async function d({query:e,values:a}){let t,l=global.DSQL_DB_CONN;try{t=e&&a?await l.query(e,a):await l.query(e)}catch(e){if(process.env.FIRST_RUN)return null;console.log("ERROR in dbHandler =>",e.message),console.log(e),console.log(l.config()),r().appendFileSync(n().resolve(__dirname,"../.tmp/dbErrorLogs.txt"),JSON.stringify(e,null,4)+"\n"+Date()+"\n\n\n","utf8"),t=null}finally{await l?.end()}return t?JSON.parse(JSON.stringify(t)):null}},66866:(e,a,t)=>{t.d(a,{A:()=>r});var l=t(41864);async function r(e){let a;try{a=await (0,l.A)({query:e})}catch(e){console.log("ERROR in noDatabaseDbHandler =>",e.message)}return a||null}},59338:(e,a,t)=>{t.d(a,{A:()=>l});let l={parse:function(e,a){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,a)}catch(e){return}}},stringify:function(e,a,t){try{return JSON.stringify(e,a||void 0,t)}catch(e){return}}}},95610:e=>{e.exports=JSON.parse('[{"fieldName":"id","dataType":"BIGINT","notNullValue":true,"primaryKey":true,"autoIncrement":true},{"fieldName":"uuid","dataType":"UUID","defaultValueLiteral":"UUID()"},{"fieldName":"date_created","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_created_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_created_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP"},{"fieldName":"date_updated","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_updated_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_updated_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP","onUpdateLiteral":"CURRENT_TIMESTAMP"}]')}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/2414.js b/dsql-app/.local_dist/server/chunks/2414.js deleted file mode 100644 index 6d924ab..0000000 --- a/dsql-app/.local_dist/server/chunks/2414.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=2414,exports.ids=[2414],exports.modules={72414:(e,s,c)=>{function t({user:e,userType:s,setLoading:c}){return null}c.d(s,{A:()=>t}),c(8732),c(82015),c(63715),c(76601)},76601:(e,s,c)=>{c.d(s,{A:()=>t});async function t(){try{let e=await caches.keys();e[0]&&await Promise.all(e.map(e=>caches.delete(e)))}catch(e){console.log("Error in clearing cache =>",e.message)}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/2451.js b/dsql-app/.local_dist/server/chunks/2451.js deleted file mode 100644 index 6d0fdf4..0000000 --- a/dsql-app/.local_dist/server/chunks/2451.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict";exports.id=2451,exports.ids=[2451],exports.modules={48225:(e,a,t)=>{let l=t(29021),{IncomingMessage:r}=t(81630);e.exports=async function({user:e,message:a,component:t,noMail:r,req:i}){let n=new Date,d=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],a=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],l=Array.isArray(e)?e[0]:e?.split(",")[0],r=t||l||a||i.socket.remoteAddress;if(!r)return null;return String(r)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== -Error Message: ${a} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(r+=` -URL: ${i.url}`),i?.body&&(r+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),d&&(r+=` -IP: ${d}`),r+=` -Date: ${n.toDateString()} -========================================`,l.existsSync("./.tmp/error.log")||l.writeFileSync("./.tmp/error.log","","utf-8");let s=l.readFileSync("./.tmp/error.log","utf-8");l.writeFileSync("./.tmp/error.log",r),l.appendFileSync("./.tmp/error.log",` - - - - -${s}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,a,t)=>{let{scryptSync:l,createDecipheriv:r}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:a,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=a||process.env.DSQL_ENCRYPTION_PASSWORD,d=t||process.env.DSQL_ENCRYPTION_SALT,s=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!d?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=r("aes-192-cbc",l(n,d,s),i.alloc(16,0));try{let a=o.update(e,"hex","utf8");return a+=o.final("utf8")}catch(a){return console.log("Error in decrypting =>",a.message),e}}},19261:(e,a,t)=>{let l=t(33873),r=t(29021);t(60818).config({path:"./../.env"});let i=t(3444),n=t(38864),d=t(12452),s=t(35031),o=t(16926),u=t(27836),E=process.argv.find(e=>"--exec"===e);async function c({userId:e,targetDatabase:a,dbSchemaData:t}){let E=e?l.join(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`/user-${e}/main.json`):l.resolve(__dirname,"../../jsonData/dbSchemas/main.json"),N=t||u.parse(r.readFileSync(E,"utf8"));if(!N){console.log("Schema Not Found!");return}for(let t=0;te.tableName===t)[0]){let a=u.filter(e=>e.tableNameOld&&e.tableNameOld===t);a&&a[0]?(console.log("Renaming Table"),await n({queryString:`RENAME TABLE \`${a[0].tableNameOld}\` TO \`${a[0].tableName}\``,database:r})):(console.log(`Dropping Table from ${r}`),await n({queryString:`DROP TABLE \`${t}\``,database:r}),await o({query:"DELETE FROM user_database_tables WHERE user_id = ? AND db_slug = ? AND table_slug = ?",values:[e,f,t],database:"datasquirel"}))}}let _=e?await n({database:"datasquirel",queryString:"SELECT * FROM user_databases WHERE db_full_name = ?",queryValuesArray:[r]}):void 0,S=_?.[0];for(let a=0;a0){if(await s({dbFullName:r,tableName:i,tableNameFull:t.tableFullName,tableInfoArray:o,userId:e,dbSchema:N,tableIndexes:E,tableIndex:a,childDb:l.childDatabase||void 0,recordedDbEntry:S,tableSchema:t}),t.childrenTables&&t.childrenTables[0])for(let a=0;ae.Key_name===d)[0])throw Error("This Index Does not Exist")}catch(e){await n({queryString:`CREATE${a?.match(/fullText/i)?" FULLTEXT":""} INDEX \`${d}\` ON ${i}(${l?.map(e=>e.value).map(e=>`\`${e}\``).join(",")}) COMMENT 'schema_index'`,database:r})}}}if(T?.[0])for(let a=0;a{let l=t(38864),r=t(74941),i=t(57897),n=t(16926);e.exports=async function({dbFullName:e,tableName:a,tableInfoArray:t,dbSchema:d,clone:s,tableSchema:o,recordedDbEntry:u}){let E=i({tableInfoArray:t}),c=[];c.push(`CREATE TABLE IF NOT EXISTS \`${a}\` (`);try{if(!u)throw Error("Recorded Db entry not found!");let e=await l({database:"datasquirel",queryString:"SELECT * FROM user_database_tables WHERE db_id = ? AND table_slug = ?",queryValuesArray:[u.id,o?.tableName]}),a=e?.[0];a?.id||await n({query:"INSERT INTO user_database_tables SET ?",values:{user_id:u.user_id,db_id:u.id,db_slug:u.db_slug,table_name:o?.tableFullName,table_slug:o?.tableName,child_table:o?.childTable?"1":null,child_table_parent_database:o?.childTableDbFullName||null,child_table_parent_table:o?.childTableName||null,date_created:Date(),date_created_code:Date.now(),date_updated:Date(),date_updated_code:Date.now()},database:"datasquirel"})}catch(e){}let N=!1,f=[];for(let e=0;e{let l=e.fieldName,r=e.foreignKey?.destinationTableName,i=e.foreignKey?.destinationTableColumnName,n=e.foreignKey?.cascadeDelete,d=e.foreignKey?.cascadeUpdate,s=e.foreignKey?.foreignKeyName,o=a===f.length-1?"":",";c.push(` CONSTRAINT \`${s}\` FOREIGN KEY (\`${l}\`) REFERENCES \`${r}\`(${i})${n?" ON DELETE CASCADE":""}${d?" ON UPDATE CASCADE":""}${o}`)}),c.push(") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;");let T=c.join("\n");return await l({queryString:T,database:e})}},16926:(e,a,t)=>{let l=t(29021),r=t(33873),i=t(9973),n=t(21580),d=i({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,charset:"utf8mb4",ssl:n()}});e.exports=async function({query:e,values:a,database:t}){let s;t&&(d=i({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:t,charset:"utf8mb4",ssl:n()}}));try{s=e&&a?await d.query(e,a):await d.query(e),await d.end()}catch(e){if(process.env.FIRST_RUN)return null;console.log("ERROR in dbHandler =>",e.message),console.log(e),console.log(d.config()),l.appendFileSync(r.resolve(__dirname,"../.tmp/dbErrorLogs.txt"),JSON.stringify(e,null,4)+"\n"+Date()+"\n\n\n","utf8"),s=null}return s?JSON.parse(JSON.stringify(s)):null}},74941:e=>{e.exports=function({columnData:e,primaryKeySet:a}){let{fieldName:t,dataType:l,nullValue:r,primaryKey:i,autoIncrement:n,defaultValue:d,defaultValueLiteral:s,foreignKey:o,updatedField:u,onUpdate:E,onUpdateLiteral:c,onDelete:N,onDeleteLiteral:f,defaultField:T,encrypted:b,json:m,newTempField:_,notNullValue:S,originName:A,plainText:p,pattern:y,patternFlags:g,richText:R}=e,h="";return h+=`\`${t}\` ${l}`,r?h+=" DEFAULT NULL":s?h+=` DEFAULT ${s}`:d?String(d).match(/uuid\(\)/i)?h+=" DEFAULT UUID()":h+=` DEFAULT '${d}'`:S&&(h+=" NOT NULL"),c&&(h+=` ON UPDATE ${c}`),i&&!a&&(h+=" PRIMARY KEY",a=!0),n&&(h+=" AUTO_INCREMENT",a=!0),{fieldEntryText:h,newPrimaryKeySet:a||!1}}},3444:(e,a,t)=>{let l=t(16926);e.exports=async function(e){let a;try{a=await l({query:e})}catch(e){console.log("ERROR in noDatabaseDbHandler =>",e.message)}return a||null}},57897:(e,a,t)=>{e.exports=function({tableInfoArray:e}){let a=t(95610),l=e.filter(e=>e.primaryKey);return a.forEach(a=>{let t=e.filter(e=>e.fieldName===a.fieldName);t&&t[0]||("id"!==a.fieldName||l[0]?e.push(a):e.unshift(a))}),e}},35031:(e,a,t)=>{let l=t(29021),r=t(38864),i=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/,n=t(74941),d=t(16926);e.exports=async function({dbFullName:e,tableName:a,tableInfoArray:t,userId:s,dbSchema:o,tableIndexes:u,tableSchema:E,clone:c,childDb:N,tableIndex:f,tableNameFull:T,recordedDbEntry:b}){let m=[],_=t;try{let t=[];if(t.push(`ALTER TABLE \`${a}\``),N)try{if(!b)throw Error("Recorded Db entry not found!");let e=await r({database:"datasquirel",queryString:"SELECT * FROM user_database_tables WHERE db_id = ? AND table_slug = ?",queryValuesArray:[b.id,a]}),t=e?.[0];t?.id||await d({query:"INSERT INTO user_database_tables SET ?",values:{user_id:b.user_id,db_id:b.id,db_slug:b.db_slug,table_name:T,table_slug:a,child_table:E?.childTable?"1":null,child_table_parent_database:E?.childTableDbFullName||null,child_table_parent_table:E.childTableName||null,date_created:Date(),date_created_code:Date.now(),date_updated:Date(),date_updated_code:Date.now()},database:"datasquirel"})}catch(e){}let f=await r({queryString:`SHOW INDEXES FROM \`${a}\``,database:e}),S=await r({queryString:`SHOW COLUMNS FROM \`${a}\``,database:e}),A=[];for(let t=0;te.fieldName===n||e.originName===n);if(d&&d[0]){if(d[0].updatedField&&d[0].fieldName){A.push(d[0].fieldName),await r({queryString:`ALTER TABLE ${a} RENAME COLUMN \`${d[0].originName}\` TO \`${d[0].fieldName}\``,database:e}),console.log(`Column Renamed from "${d[0].originName}" to "${d[0].fieldName}"`);try{let t=o.findIndex(a=>a.dbFullName===e),r=o[t].tables.findIndex(e=>e.tableName===a),i=o[t].tables[r].fields.findIndex(e=>e.fieldName===d[0].fieldName);delete o[t].tables[r].fields[i].originName,delete o[t].tables[r].fields[i].updatedField,_=o[t].tables[r].fields,l.writeFileSync(`${String(process.env.DSQL_USER_DB_SCHEMA_PATH)}/user-${s}/main.json`,JSON.stringify(o),"utf8")}catch(e){console.log("Update table error =>",e.message)}}continue}await r({queryString:`ALTER TABLE ${a} DROP COLUMN \`${n}\``,database:e})}for(let t=0;te.alias===l);if(!e?.[0])throw Error(`This Index(${l}) Has been Deleted!`)}catch(t){await r({queryString:`ALTER TABLE ${a} DROP INDEX \`${l}\``,database:e})}}if(u&&u[0])for(let t=0;te.Key_name===d)[0])throw Error("This Index Does not Exist")}catch(t){await r({queryString:`CREATE${l?.match(/fullText/i)?" FULLTEXT":""} INDEX \`${d}\` ON ${a}(${n?.map(e=>e.value).map(e=>`\`${e}\``).join(",")}) COMMENT 'schema_index'`,database:e})}}let p=await r({queryString:`SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = '${e}' AND TABLE_NAME='${a}' AND CONSTRAINT_TYPE='FOREIGN KEY'`,database:e});if(p)for(let t=0;t{if(e.Field===E)return i=a,!0}):null,{fieldEntryText:D}=n({columnData:d});if(h&&h[0]?.Field){let{Field:e,Type:a,Null:t,Key:r,Default:n,Extra:d}=h[0],c=l1)return await r({queryString:y,database:e});return"No Changes Made to Table"}catch(e){return console.log('Error in "updateTable" shell function =>',e.message),"Error in Updating Table"}}},38864:(e,a,t)=>{t(29021);let l=t(16926);e.exports=async function({queryString:e,queryValuesArray:a,database:t,tableSchema:r}){let i;try{i=e&&a&&Array.isArray(a)&&a[0]?await l({query:e,values:a,database:t}):await l({query:e,database:t})}catch(e){console.log("Shell Vardb Error =>",e.message)}return i}},27836:e=>{e.exports={parse:function(e,a){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,a)}catch(e){return}}},stringify:function(e,a,t){try{return JSON.stringify(e,a,t)}catch(e){return}}}},95610:e=>{e.exports=JSON.parse('[{"fieldName":"id","dataType":"BIGINT","notNullValue":true,"primaryKey":true,"autoIncrement":true},{"fieldName":"uuid","dataType":"UUID","defaultValueLiteral":"UUID()"},{"fieldName":"date_created","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_created_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_created_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP"},{"fieldName":"date_updated","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_updated_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_updated_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP","onUpdateLiteral":"CURRENT_TIMESTAMP"}]')}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/2996.js b/dsql-app/.local_dist/server/chunks/2996.js deleted file mode 100644 index e4ba8fa..0000000 --- a/dsql-app/.local_dist/server/chunks/2996.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=2996,exports.ids=[2996],exports.modules={55312:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(8732),l=t(82015),i=t.n(l),n=t(32415),r=t(2471);t(27462),t(55158);var d=t(56987),c=t(12042);function o(e){let{user:a,dbImage:t,setDbImage:l,query:o}=i().useContext(r.AddDatabaseContext);if(!a)return(0,s.jsx)(i().Fragment,{});let[u,m]=i().useState(null),[g,p]=i().useState(!1);return(0,s.jsx)("section",{className:"card",children:(0,s.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[g&&(0,s.jsx)(n.A,{}),(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"New Database Information"}),a&&t&&l&&(0,s.jsx)(d.A,{user:a,dbImage:t,setDbImage:l,setLoading:p,query:o})]}),a&&t&&l&&(0,s.jsx)(c.A,{user:a,dbImage:t,setDbImage:l})]})})}},56987:(e,a,t)=>{let s;t.d(a,{A:()=>p});var l=t(8732),i=t(82015),n=t.n(i),r=t(27462),d=t(64535);t(22326);var c=t(63715),o=t(86152);async function u({e,setLoading:a,dbImage:t,database:s,user:l}){a(!0);let i={db_description:e.target.database_description?.value?.match(/./)?e.target.database_description.value:null,db_name:e.target.database_name?.value?.match(/./)?e.target.database_name.value:null,db_slug:e.target.database_slug?.value?.match(/./)?e.target.database_slug.value:null,db_full_name:s.db_full_name,id:s.id,active_clone:s.active_clone,active_clone_parent_db:s.active_clone_parent_db};if(t){if("string"==typeof t)i.db_image=t;else if("object"==typeof t){let e=await (0,c.A)("/api/addUserMedia",{method:"post",body:{media:[t],folder:i.db_slug.replace(/_/g,"-"),type:"image"}},!0);i.db_image=e?.mediaData[0]?.media_thumbnail_url?e.mediaData[0].media_thumbnail_url:"/images/database-placeholder.png"}}else i.db_image="/images/database-placeholder.png";(0,c.A)("/api/updateUserDatabase",{method:"post",body:i},!0).then(e=>{e.success?(0,o.A)().then(()=>{window.location.pathname=`/admin/${l?.id}/databases`,setTimeout(()=>{a(!1)},1e3)}):(alert("Error! Please Try Again"),setTimeout(()=>{a(!1)},1e3))})}async function m({e,setLoading:a,dbImage:t,keepUpdated:s,keepDataUpdated:l,query:i,user:n}){a(!0);let r={db_name:e.target.database_name.value,db_slug:e.target.database_slug.value,db_description:e.target.database_description?.value?.match(/./)?e.target.database_description.value:null};if(t){if("string"==typeof t)r.db_image=t;else if("object"==typeof t){let e=await (0,c.A)("/api/addUserMedia",{method:"post",body:{media:[t],folder:r.db_slug.replace(/_/g,"-"),type:"image"}},!0);r.db_image=e?.mediaData[0]?.media_thumbnail_url?e.mediaData[0].media_thumbnail_url:"/images/database-placeholder.png"}}i?.duplicate&&(r.duplicate=i.duplicate,r.keepUpdated=!!s&&s,r.keepDataUpdated=!!l&&l),(0,c.A)("/api/createUserDatabase",{method:"post",body:r},!0).then(e=>{e.success?(0,o.A)().then(()=>{window.location.pathname=`/admin/${n?.id}/databases/${r.db_slug}`}):setTimeout(()=>{a(!1)},1e3)})}var g=t(58403);function p({user:e,dbImage:a,setDbImage:t,database:i,setLoading:c,query:o}){async function p(a){return i?.db_slug===a?null:await (0,r.A)({tableName:"user_databases",columnName:"db_slug",value:a,userId:e.id})}let[h,b]=n().useState(null),[x,f]=n().useState(!1),[_,w]=n().useState(!1);return(0,l.jsxs)("form",{className:"w-full max-w-none xl:max-w-lg flex flex-col items-start gap-4 relative",onSubmit:t=>{t.preventDefault(),i?u({e:t,setLoading:c,dbImage:a,database:i,user:e}):m({e:t,setLoading:c,dbImage:a,keepUpdated:x,keepDataUpdated:_,query:o,user:e})},children:[h&&(0,l.jsx)(d.A,{message:h}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"database_name",children:"Name"}),(0,l.jsx)("input",{type:"text",name:"database_name",id:"database_name",placeholder:"Database Name",onInput:async e=>{let a=e.target,t=a.closest("form");if(a.value.match(/./)?(a.classList.remove("warning"),b(null)):a.classList.add("warning"),t){t.database_slug.value=a.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,"");let e=t.database_slug.value;window.clearTimeout(s),s=setTimeout(()=>{p(e).then(e=>{e?.result?(t.database_slug.classList.add("warning"),b("Duplicate Database Name")):(t.database_slug.classList.remove("warning"),b(null))})},300)}},defaultValue:i?i.db_name:"",required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"database_slug",children:"Slug"}),(0,l.jsx)("input",{type:"text",name:"database_slug",id:"database_slug",placeholder:"Database Slug",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),b(null)):a.classList.add("warning");let t=a.value;window.clearTimeout(s),s=setTimeout(()=>{p(t).then(e=>{e?.result?(a.classList.add("warning"),b("Duplicate Database Name")):(a.classList.remove("warning"),b(null))})},300)},defaultValue:i?i.db_slug:"",required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"database_description",children:"Description (optional)"}),(0,l.jsx)("textarea",{name:"database_description",id:"database_description",placeholder:"Short Description of database",defaultValue:i?i.db_description:""})]}),o?.duplicate&&(0,l.jsx)(n().Fragment,{children:(0,l.jsxs)("div",{className:"card col items-start",children:[(0,l.jsx)(g.A,{checkBoxValues:[{payload:"Keep New Database Updated?",title:"Keep New Database Updated?",name:"clone_database",onChangeHandler:e=>{e.target.checked?f(!0):f(!1)}}]}),(0,l.jsx)("span",{className:"text-sm italic text-slate-600 dark:text-slate-300",children:"By checking this box the new Database stays up to date with changes to the structure of the parent Database"})]})}),(0,l.jsxs)("button",{type:"submit",className:"w-full",children:[i?"Update":"Create"," Database"]})]})}},12042:(e,a,t)=>{t.d(a,{A:()=>c});var s=t(8732),l=t(82015),i=t.n(l),n=t(79100),r=t(55158),d=t(62506);function c({user:e,dbImage:a,setDbImage:t,database:l}){let c=i().useRef();return(0,s.jsxs)("div",{className:"card no-hover col items-center justify-center",children:[(0,s.jsx)("h4",{className:"m-0",children:"Database Image"}),(0,s.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,s.jsx)("img",{src:a?"string"==typeof a?a:a.imageBase64Full:"/images/database-placeholder.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:c,"data-imagepreview":"image"})}),(0,s.jsxs)("div",{className:"w-full flex-col",id:"edit-database-image-option-wrapper",children:[(0,s.jsxs)(d.A,{column:!0,className:"w-full",children:[(0,s.jsx)("button",{className:"outlined w-full whitespace-normal",onClick:e=>{(0,r.PB)("user-media-popup")},children:"Choose Image from uploads"}),(0,s.jsx)("button",{className:"outlined secondary w-full whitespace-normal",onClick:e=>{let a=e.target;a?.closest("#edit-database-image-option-wrapper")?.querySelector("input")?.click()},children:"Choose Image from Computer"})]}),(0,s.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{let a=e.target.files[0];t(await (0,n.A)({imageInputFile:a,maxWidth:400}))}})]})]})}},42105:(e,a,t)=>{t.d(a,{A:()=>d});var s=t(8732),l=t(82015),i=t.n(l);t(63715);var n=t(55158),r=t(32415);function d({setDbImage:e}){let[a,t]=i().useState(!0),[l,d]=i().useState(null);return(0,s.jsxs)(n.Ay,{title:"user-media-popup",children:[a&&(0,s.jsx)(r.A,{width:"20px"}),(0,s.jsx)("h4",{className:"m-0 text-lg",children:"Your Uploaded Images"}),(0,s.jsx)("div",{className:"grid grid-cols-2",children:l&&l[0]&&l.filter(e=>"image"==e.media_type).map((a,t)=>(0,s.jsx)("div",{className:"w-full h-44 cursor-pointer hover:opacity-70",onClick:t=>{e(a.media_thumbnail_url||null),(0,n.fs)()},children:(0,s.jsx)("img",{src:a.media_thumbnail_url,alt:"User Media",className:"w-full h-full object-contain"})},t+1))})]})}t(64417)},64535:(e,a,t)=>{t.d(a,{A:()=>l});var s=t(8732);function l({message:e}){return(0,s.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:e})]})}t(82015)},27462:(e,a,t)=>{t.d(a,{A:()=>l}),t(22326);var s=t(63715);async function l({tableName:e,columnName:a,value:t,dbFullName:l,dispatch:i,userId:n,dbId:r}){return await (0,s.A)(`/api/checkDuplicateData?tableName=${e}&type=${a}&value=${t}${l?"&dbFullName="+l:""}${n?"&userId="+n:""}${r?"&dbId="+r:""}`)}},79100:(e,a,t)=>{t.d(a,{A:()=>s});async function s({imageInputFile:e,maxWidth:a}){let t,s,l=document.querySelector("[data-imagepreview='image']"),i=e.name.replace(/\..*/,""),n=document.createElement("canvas"),r=e.type,d=a||null,c=URL.createObjectURL(e),o=new Image;return o.src=c,t=await new Promise((e,a)=>{o.onerror=function(){URL.revokeObjectURL(this.src),console.log("Cannot load image")},o.onload=function(){if(URL.revokeObjectURL(this.src),d){let e=d/o.naturalWidth;n.width=o.naturalWidth{e.src=t}),e(t)}}),s=await new Promise((e,a)=>{n.toBlob(a=>{e(a?.size)},r,.95)}),{imageBase64:t.replace(/.*?base64,/,""),imageBase64Full:t,imageName:i,imageSize:s}}},41658:(e,a,t)=>{let s=t(29021),l=t(22373),i=t(13608);e.exports=async function(e){let a;"production".match(/dev/)&&s.appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{a=await i(e)}catch(e){l({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return a||null}},13608:(e,a,t)=>{let s=t(9973),l=t(31976),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,charset:"utf8mb4",ssl:l()}});e.exports=function(...e){try{return new Promise((a,t)=>{i.query(...e).then(e=>{i.end(),a(JSON.parse(JSON.stringify(e)))}).catch(e=>{i.end(),a({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}},2471:(e,a,t)=>{t.r(a),t.d(a,{AddDatabaseContext:()=>f,default:()=>_,getServerSideProps:()=>w});var s=t(8732),l=t(82015),i=t.n(l),n=t(95222),r=t(20048),d=t.n(r),c=t(41658),o=t.n(c),u=t(46437),m=t(58548),g=t(55312);function p(e){let{query:a,duplicateDb:t,user:l}=i().useContext(f),n=a?.duplicate?(0,s.jsxs)("span",{children:["Duplicate"," ",(0,s.jsx)("a",{href:`/admin/${l?.id}/databases/${t?.db_slug}`,target:"_blank",children:t?.db_name})," ","Database"]}):"Add A New Database";return(0,s.jsxs)(i().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"flex-wrap",children:[(0,s.jsx)(u.A,{}),(0,s.jsx)("h1",{className:"text-3xl m-0",children:n})]}),(0,s.jsx)(m.A,{user:l})]}),(0,s.jsx)(g.A,{})]})}var h=t(42105),b=t(67216),x=t.n(b);let f=i().createContext({});function _({user:e,databases:a,query:t,duplicateDb:l}){let r=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[d,c]=i().useState("/images/database-placeholder.png");return(0,s.jsx)(f.Provider,{value:{user:e,databases:a,dbImage:d,setDbImage:c,query:t,duplicateDb:l},children:(0,s.jsxs)(i().Fragment,{children:[(0,s.jsx)(n.A,{head:r,user:e,children:(0,s.jsx)(p,{})}),(0,s.jsx)(h.A,{setDbImage:c})]})})}async function w({req:e,res:a,query:t}){let s=await d()(e,a);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};if(!s?.verification_status?.toString()?.match(/1/))return{redirect:{destination:"/admin",permanent:!1}};let l=await o()(`SELECT SCHEMA_NAME AS dbFullName FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'user_${s.id}%'`),i={};if(t.duplicate){let e=await x()(`SELECT * FROM user_databases WHERE db_full_name='${t.duplicate}'`);e&&e[0]&&(i=e[0])}return{props:{user:s,databases:l,query:t,duplicateDb:i}}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3737.js b/dsql-app/.local_dist/server/chunks/3155.js similarity index 97% rename from dsql-app/.local_dist/server/chunks/3737.js rename to dsql-app/.local_dist/server/chunks/3155.js index 7fa12e2..1a07ca1 100644 --- a/dsql-app/.local_dist/server/chunks/3737.js +++ b/dsql-app/.local_dist/server/chunks/3155.js @@ -1 +1 @@ -"use strict";exports.id=3737,exports.ids=[3737],exports.modules={13737:(e,t,r)=>{let n,a;r.d(t,{A:()=>d});var o=r(8732),l=r(82015),i=r.n(l);function s({value:e,format:t}){let r;if(!e)return 0;try{r="string"===t?e.toString().replace(/\D/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,","):parseInt(e.toString().replace(/\D/g,""))}catch(e){r=0,console.log(e)}return r}function u({value:e,format:t,decimals:r}){let n;let a=e?.toString()?.match(/^\-/)?"-":"";try{if("string"===t){let t=e.toString().split(".");n=a+t[0].toString().replace(/[^0-9\.]/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,",")+(t[1]?r?`.${t[1].substring(0,r)}`:`.${t[1].substring(0,2)}`:"")}else n=parseFloat(a+e.toString().replace(/[^0-9\.]/g,""))}catch(e){n=0,console.log(e)}return n}function d(e){try{let{title:c,name:p,defaultValue:m,placeholder:g,autoComplete:v,onInputHandler:h,required:w,inputType:f,setAlert:x,prefix:b,minValue:S,maxValue:y,encrypted:j,numberText:I,appendCurrency:T,elementRef:F,onChangeHandler:L,value:N,step:D,decimal:M,pattern:W,info:E,fontSize:k,maxWidth:R,setValue:q,id:B}=e;function t(e){e.target.value.match(/./)?(e.target.classList.remove("warning"),x&&x(null)):e.target.required&&e.target.classList.add("warning"),I&&(e.target.value=e.target.value.toString().match(/^0+$/)?"0":e.target.value.toString().replace(M?/[^0-9\.]/g:/\D/g,"").replace(/^0*/,"").replace(/\B(?=(\d{3})+(?!\d))/g,",")),h&&h(e),L&&L(e)}function r(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),r=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!r.classList.contains("hidden")){r.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&r.classList.contains("hidden"))){if(!t){r.classList.add("hidden");return}if(r.classList.contains("hidden")){r.classList.remove("hidden");return}r.classList.add("hidden")}}let C=F||i().useRef();function l(e){let t=M?parseFloat(u({value:C.current?.value||0}).toString())-(D?parseFloat(D.toString()):20):parseInt(s({value:C.current.value}).toString())-(D||20),r=M?u({value:t,format:"raw"}):s({value:t,format:"raw"});S&&"number"==typeof r&&ry||(C.current.value=r.toString(),q&&q(C.current.value))}return(0,o.jsxs)("div",{className:"form-input-wrapper flex flex-col items-start gap-0.5 w-full relative",style:{...R?{maxWidth:R}:{}},children:[c&&(0,o.jsx)("label",{htmlFor:p,children:c}),(0,o.jsxs)("div",{className:"flex items-center w-full relative",children:[b&&(0,o.jsx)("div",{className:"absolute left-4 bottom-2 text-lg",children:b}),(0,o.jsx)("input",{type:f||"text",name:p,id:B||p,ref:C,placeholder:g||c||"",autoComplete:v,onInput:e=>{t(e)},onChange:e=>{t(e)},value:N||void 0,defaultValue:N?void 0:m||void 0,pattern:W?W.toString():void 0,required:!!w&&w,style:{...k?{fontSize:k}:{},...b?{paddingLeft:"35px"}:{}},min:S,max:y,"data-encrypted":j||null,"data-appendcurrency":T||null,className:"bg-white"+(E?" pr-16":"")}),I&&(0,o.jsxs)("div",{className:"absolute gap-1"+(E?" right-12":" right-4"),style:{top:"50%",transform:"translate(0,-50%)"},children:[(0,o.jsx)("span",{className:"number-text-button w-10 md:w-8 h-10 md:h-8 rounded-full bg-slate-100 dark:bg-slate-800 flex items-center justify-center cursor-pointer hover:bg-slate-200 text-2xl font-semibold touch-none",onMouseDown:e=>{e.preventDefault(),window.innerWidth<1200||(l(e),n=setTimeout(()=>{a=setInterval(()=>{l(e)},50)},200))},onTouchStart:e=>{e.preventDefault(),window.innerWidth>=1200||(l(e),n=setTimeout(()=>{a=setInterval(()=>{l(e)},50)},200))},onMouseUp:e=>{window.clearTimeout(n),window.clearInterval(a)},onTouchEnd:e=>{window.clearTimeout(n),window.clearInterval(a)},onMouseLeave:e=>{window.clearTimeout(n),window.clearInterval(a)},onTouchMove:e=>{e.preventDefault()},children:(0,o.jsx)("span",{className:"pointer-events-none",children:"-"})}),(0,o.jsx)("span",{className:"number-text-button w-10 md:w-8 h-10 md:h-8 rounded-full bg-slate-100 dark:bg-slate-800 flex items-center justify-center cursor-pointer hover:bg-slate-200 text-2xl font-semibold touch-none",onMouseDown:e=>{e.preventDefault(),window.innerWidth<1200||(d(e),n=setTimeout(()=>{a=setInterval(()=>{d(e)},50)},200))},onTouchStart:e=>{e.preventDefault(),window.innerWidth>=1200||(d(e),n=setTimeout(()=>{a=setInterval(()=>{d(e)},50)},200))},onMouseUp:e=>{window.clearTimeout(n),window.clearInterval(a)},onTouchEnd:e=>{window.clearTimeout(n),window.clearInterval(a)},onMouseLeave:e=>{window.clearTimeout(n),window.clearInterval(a)},children:(0,o.jsx)("span",{className:"pointer-events-none",children:"+"})})]}),E&&(0,o.jsxs)("div",{className:"info-wrapper absolute right-2 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:r,onMouseLeave:r,onClick:r,children:[(0,o.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,o.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,o.jsx)("span",{children:E})}),(0,o.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormInput =>",e),(0,o.jsx)("div",{children:"Form Input Error"})}}}}; \ No newline at end of file +"use strict";exports.id=3155,exports.ids=[3155],exports.modules={83155:(e,t,r)=>{let n,a;r.d(t,{A:()=>d});var o=r(8732),l=r(82015),i=r.n(l);function s({value:e,format:t}){let r;if(!e)return 0;try{r="string"===t?e.toString().replace(/\D/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,","):parseInt(e.toString().replace(/\D/g,""))}catch(e){r=0,console.log(e)}return r}function u({value:e,format:t,decimals:r}){let n;let a=e?.toString()?.match(/^\-/)?"-":"";try{if("string"===t){let t=e.toString().split(".");n=a+t[0].toString().replace(/[^0-9\.]/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,",")+(t[1]?r?`.${t[1].substring(0,r)}`:`.${t[1].substring(0,2)}`:"")}else n=parseFloat(a+e.toString().replace(/[^0-9\.]/g,""))}catch(e){n=0,console.log(e)}return n}function d(e){try{let{title:c,name:p,defaultValue:m,placeholder:g,autoComplete:v,onInputHandler:h,required:w,inputType:f,setAlert:x,prefix:b,minValue:S,maxValue:y,encrypted:j,numberText:I,appendCurrency:T,elementRef:F,onChangeHandler:L,value:N,step:D,decimal:M,pattern:W,info:E,fontSize:k,maxWidth:R,setValue:q,id:B}=e;function t(e){e.target.value.match(/./)?(e.target.classList.remove("warning"),x&&x(null)):e.target.required&&e.target.classList.add("warning"),I&&(e.target.value=e.target.value.toString().match(/^0+$/)?"0":e.target.value.toString().replace(M?/[^0-9\.]/g:/\D/g,"").replace(/^0*/,"").replace(/\B(?=(\d{3})+(?!\d))/g,",")),h&&h(e),L&&L(e)}function r(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),r=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!r.classList.contains("hidden")){r.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&r.classList.contains("hidden"))){if(!t){r.classList.add("hidden");return}if(r.classList.contains("hidden")){r.classList.remove("hidden");return}r.classList.add("hidden")}}let C=F||i().useRef();function l(e){let t=M?parseFloat(u({value:C.current?.value||0}).toString())-(D?parseFloat(D.toString()):20):parseInt(s({value:C.current.value}).toString())-(D||20),r=M?u({value:t,format:"raw"}):s({value:t,format:"raw"});S&&"number"==typeof r&&ry||(C.current.value=r.toString(),q&&q(C.current.value))}return(0,o.jsxs)("div",{className:"form-input-wrapper flex flex-col items-start gap-0.5 w-full relative",style:{...R?{maxWidth:R}:{}},children:[c&&(0,o.jsx)("label",{htmlFor:p,children:c}),(0,o.jsxs)("div",{className:"flex items-center w-full relative",children:[b&&(0,o.jsx)("div",{className:"absolute left-4 bottom-2 text-lg",children:b}),(0,o.jsx)("input",{type:f||"text",name:p,id:B||p,ref:C,placeholder:g||c||"",autoComplete:v,onInput:e=>{t(e)},onChange:e=>{t(e)},value:N||void 0,defaultValue:N?void 0:m||void 0,pattern:W?W.toString():void 0,required:!!w&&w,style:{...k?{fontSize:k}:{},...b?{paddingLeft:"35px"}:{}},min:S,max:y,"data-encrypted":j||null,"data-appendcurrency":T||null,className:"bg-white"+(E?" pr-16":"")}),I&&(0,o.jsxs)("div",{className:"absolute gap-1"+(E?" right-12":" right-4"),style:{top:"50%",transform:"translate(0,-50%)"},children:[(0,o.jsx)("span",{className:"number-text-button w-10 md:w-8 h-10 md:h-8 rounded-full bg-slate-100 dark:bg-slate-800 flex items-center justify-center cursor-pointer hover:bg-slate-200 text-2xl font-semibold touch-none",onMouseDown:e=>{e.preventDefault(),window.innerWidth<1200||(l(e),n=setTimeout(()=>{a=setInterval(()=>{l(e)},50)},200))},onTouchStart:e=>{e.preventDefault(),window.innerWidth>=1200||(l(e),n=setTimeout(()=>{a=setInterval(()=>{l(e)},50)},200))},onMouseUp:e=>{window.clearTimeout(n),window.clearInterval(a)},onTouchEnd:e=>{window.clearTimeout(n),window.clearInterval(a)},onMouseLeave:e=>{window.clearTimeout(n),window.clearInterval(a)},onTouchMove:e=>{e.preventDefault()},children:(0,o.jsx)("span",{className:"pointer-events-none",children:"-"})}),(0,o.jsx)("span",{className:"number-text-button w-10 md:w-8 h-10 md:h-8 rounded-full bg-slate-100 dark:bg-slate-800 flex items-center justify-center cursor-pointer hover:bg-slate-200 text-2xl font-semibold touch-none",onMouseDown:e=>{e.preventDefault(),window.innerWidth<1200||(d(e),n=setTimeout(()=>{a=setInterval(()=>{d(e)},50)},200))},onTouchStart:e=>{e.preventDefault(),window.innerWidth>=1200||(d(e),n=setTimeout(()=>{a=setInterval(()=>{d(e)},50)},200))},onMouseUp:e=>{window.clearTimeout(n),window.clearInterval(a)},onTouchEnd:e=>{window.clearTimeout(n),window.clearInterval(a)},onMouseLeave:e=>{window.clearTimeout(n),window.clearInterval(a)},children:(0,o.jsx)("span",{className:"pointer-events-none",children:"+"})})]}),E&&(0,o.jsxs)("div",{className:"info-wrapper absolute right-2 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:r,onMouseLeave:r,onClick:r,children:[(0,o.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,o.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,o.jsx)("span",{children:E})}),(0,o.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormInput =>",e),(0,o.jsx)("div",{children:"Form Input Error"})}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3247.js b/dsql-app/.local_dist/server/chunks/3247.js deleted file mode 100644 index bd93e78..0000000 --- a/dsql-app/.local_dist/server/chunks/3247.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict";exports.id=3247,exports.ids=[3247],exports.modules={43001:(e,t,s)=>{s.d(t,{A:()=>b});var a=s(8732),r=s(82015),i=s.n(r),n=s(26295),d=s(58548),l=s(24671);s(37515);var c=s(16291);function x(e){let{databases:t,setTargetDatabase:s,user:r}=i().useContext(n.DashboardContext);return(0,a.jsx)(i().Fragment,{children:(0,a.jsx)(c.A,{databases:t,setTargetDatabase:s,title:"Recently added Databases",more:!0,user:r})})}var o=s(92736),u=s(34637),m=s(93213),h=s(83158);let j=(0,s(82544).A)("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);function y({icon:e,metric:t,count:s,url:r}){return(0,a.jsxs)("a",{href:r,className:"card col w-full",children:[(0,a.jsx)("div",{className:"absolute top-4 right-4",children:e}),(0,a.jsxs)("div",{className:"content-block",children:[(0,a.jsx)("span",{className:"metric text-slate-800 dark:text-white",children:s}),(0,a.jsx)("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:t})]})]})}function C(e){let{databases:t,setTargetDatabase:s,metrics:r,user:d}=i().useContext(n.DashboardContext);return(0,a.jsx)("section",{className:"p-0",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 w-full gap-6 items-stretch",children:[(0,a.jsx)(y,{metric:"Databases Created",count:r?.dbCount||0,icon:(0,a.jsx)(u.A,{size:20,className:"text-secondary2"}),url:`/admin/${d?.id}/databases`}),(0,a.jsx)(y,{metric:"Tables Created",count:r?.tablesCount||0,icon:(0,a.jsx)(m.A,{size:20,className:"text-primary"})}),(0,a.jsx)(y,{metric:"Media Added",count:r?.mediaCount||0,icon:(0,a.jsx)(h.A,{size:20,className:"text-slate-500"}),url:`/admin/${d?.id}/media`}),(0,a.jsx)(y,{metric:"API Keys",count:r?.apiKeysCount||0,icon:(0,a.jsx)(j,{size:20,className:"text-slate-900 dark:text-white"}),url:`/admin/${d?.id}/api-keys`})]})})}function b(e){let{databases:t,user:s}=i().useContext(n.DashboardContext);return(0,a.jsxs)(i().Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Dashboard"}),(0,a.jsx)(d.A,{user:s})]}),s?.verification_status?.toString().match(/1/)?(0,a.jsxs)(i().Fragment,{children:[(0,a.jsx)(C,{}),(0,a.jsx)(x,{}),(0,a.jsx)(o.A,{user:s})]}):(0,a.jsx)(l.A,{})]})}},93213:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},26295:(e,t,s)=>{s.r(t),s.d(t,{DashboardContext:()=>m,default:()=>h,getServerSideProps:()=>j});var a=s(8732),r=s(82015),i=s.n(r),n=s(95222),d=s(20048),l=s.n(d),c=s(43001),x=s(34033),o=s(67216),u=s.n(o);let m=i().createContext({});function h({user:e,databases:t,metrics:s}){let r=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,l]=i().useState(null);return(0,a.jsx)(n.A,{head:r,user:e,children:(0,a.jsxs)(m.Provider,{value:{user:e,databases:t,targetDatabase:d,setTargetDatabase:l,metrics:s},children:[(0,a.jsx)(c.A,{}),(0,a.jsx)(x.A,{targetDatabase:d})]})})}async function j({req:e,res:t,query:s}){let a=await l()(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await u()("SELECT * FROM user_databases WHERE user_id=? ORDER BY id DESC LIMIT 3",[a.id]),i=await u()(` - SELECT ( - SELECT COUNT(id) FROM user_databases WHERE user_id=? - ) AS dbCount, - ( - SELECT COUNT(id) FROM user_database_tables WHERE user_id=? - ) AS tablesCount, - ( - SELECT COUNT(id) FROM user_media WHERE user_id=? - ) AS mediaCount, - ( - SELECT COUNT(id) FROM api_keys WHERE user_id=? - ) AS apiKeysCount - `,[a.id,a.id,a.id,a.id]);return{props:{user:a,databases:r,metrics:i&&i[0]?i[0]:{}}}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3460.js b/dsql-app/.local_dist/server/chunks/3460.js deleted file mode 100644 index e7768ed..0000000 --- a/dsql-app/.local_dist/server/chunks/3460.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=3460,exports.ids=[3460],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},14587:(e,a,t)=>{t.d(a,{A:()=>x});var s=t(8732),l=t(82015),n=t.n(l),d=t(86173),i=t(55158),r=t(63715),c=t(32415),o=t(62506),h=t(6070);function x({database:e,setTargetDatabase:a,delegated:t,user:l}){let x=`/admin/${l?.id}/databases/${e.db_slug}`+(t?`?delegated=true&dbUserId=${e.user_id}`:""),{active_clone:p,active_clone_parent_db:u}=e,[m,y]=n().useState(!1);return(0,s.jsxs)("a",{href:x,className:"card",onClick:a=>{(a.target.closest(".db-list-item-actions-block")||a.target.closest(".cancel-link"))&&a.preventDefault(),t&&(a.preventDefault(),y(!0),(0,r.A)("/api/getDelegatedDatabaseToken",{method:"post",body:{rootUserId:e.user_id,priviledges:e.user_priviledge,database:e.db_slug}},!0).then(e=>{e.success&&(window.location.href=x)}),setTimeout(()=>{y(!1)},1e3))},children:[m&&(0,s.jsx)(c.A,{width:"20px"}),(0,s.jsx)("img",{src:e.db_image?e.db_image:"/images/folder.svg",alt:"Folder Image",width:20,className:e.db_image?"avatar":"avatar opacity-50"}),(0,s.jsxs)("div",{className:"flex-col items-start grow",children:[(0,s.jsx)("span",{className:"title",children:e.db_name}),u&&(0,s.jsxs)("span",{className:"text-xs bg-emerald-100 dark:bg-emerald-100/10 text-emerald-700 dark:text-emerald-200 px-2 py-0.5 rounded-full mb-1",children:["This Database is an active Clone of"," ",(0,s.jsx)("b",{children:u.replace(/datasquirel_user_\d+_/,"")})]}),(0,s.jsx)("div",{className:"-mt-2",children:(0,s.jsx)(d.A,{slugText:e.db_slug,smaller:!0})}),(0,s.jsx)("div",{className:"-mt-1 gap-1",children:(0,s.jsx)(d.A,{slugText:e.db_full_name,smaller:!0,full:!0})}),!t&&(0,s.jsxs)("span",{className:"text-sm text-slate-400",children:["Created: ",e.date_created?.substring(0,21)]}),t&&(0,s.jsxs)("div",{className:"flex items-center mt-2",children:[(0,s.jsx)("img",{src:e.image_thumbnail,alt:"",className:"w-8 h-8 rounded-full object-cover"}),(0,s.jsxs)("div",{className:"flex-col items-start gap-0",children:[(0,s.jsxs)("span",{className:"text-xs text-slate-600",children:[e.first_name," ",e.last_name]}),(0,s.jsx)("span",{className:"text-xs text-slate-400",children:e.email})]})]}),(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsx)("div",{className:"db-list-item-actions-block flex-wrap",children:(0,s.jsxs)(o.A,{children:[!t&&(0,s.jsx)("button",{className:"outlined light-gray small-text",onClick:a=>{window.location.pathname=`/admin/${l?.id}/databases/${e.db_slug}/edit-database`},children:(0,s.jsx)("span",{children:"Edit"})}),!t&&!p&&(0,s.jsx)("button",{className:"outlined light-gray small-text",onClick:a=>{window.location.href=`/admin/${l?.id}/databases/add-database?duplicate=${e.db_full_name}`},children:(0,s.jsx)("span",{children:"Duplicate"})}),!t&&(0,s.jsx)("button",{className:"outlined light-gray small-text",onClick:t=>{a&&a(e),(0,i.PB)("delete-database-confirmation")},children:(0,s.jsx)("span",{children:"Delete"})})]})}),(0,s.jsx)(h.A,{className:"text-slate-600",size:20})]})]})]})}},37515:(e,a,t)=>{t.d(a,{A:()=>h});var s=t(8732),l=t(82015),n=t.n(l),d=t(86176),i=t(58548),r=t(24671),c=t(16291),o=t(92736);function h(e){let{databases:a,setTargetDatabase:t,user:l}=n().useContext(d.DatabasesContext);return(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsx)("h1",{className:"text-3xl m-0",children:"Databases"}),(0,s.jsxs)("a",{href:`/admin/${l?.id}/databases/add-database`,className:"button flex items-center gap-2",children:[(0,s.jsx)("span",{className:"symbol",children:"+"}),(0,s.jsx)("span",{children:"Add Database"})]})]}),(0,s.jsx)(i.A,{user:l})]}),l?.verification_status?.toString().match(/1/)?(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(c.A,{databases:a,setTargetDatabase:t,user:l}),(0,s.jsx)(o.A,{user:l})]}):(0,s.jsx)(r.A,{})]})}},16291:(e,a,t)=>{t.d(a,{A:()=>r});var s=t(8732),l=t(82015),n=t.n(l),d=t(14587);let i=(0,t(82544).A)("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);function r({databases:e,setTargetDatabase:a,title:t,more:l,user:r}){return(0,s.jsx)(n().Fragment,{children:(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:t||"Database List"}),r&&e&&e[0]&&a&&(0,s.jsx)("div",{className:"w-full grid grid-cols-1 sl:grid-cols-2 xl:grid-cols-3 items-stretch gap-6",children:e.map(e=>(0,s.jsx)(d.A,{database:e,setTargetDatabase:a,user:r},e.id))}),l&&e&&e[0]&&(0,s.jsx)("a",{href:`/admin/${r?.id}/databases`,className:"button w-full more-padding",children:"See All Databases"}),!e||!e[0]&&(0,s.jsxs)("a",{href:`/admin/${r?.id}/databases/add-database`,className:"button outlined gray dashed w-full p-10 flex-col",children:[(0,s.jsx)("span",{className:"text-slate-400",children:"No Databases Created."}),(0,s.jsx)(i,{}),(0,s.jsx)("span",{className:"",children:"Add Database"})]})]})})}},92736:(e,a,t)=>{t.d(a,{A:()=>r});var s=t(8732),l=t(82015),n=t.n(l),d=t(32415);t(63715);var i=t(14587);function r({user:e}){let[a,t]=n().useState(null),[l,r]=n().useState(!1);return(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Delegated Databases"}),l&&(0,s.jsx)(d.A,{}),e&&a?a[0]?(0,s.jsx)(n().Fragment,{children:(0,s.jsx)("div",{className:"w-full grid grid-cols-1 sl:grid-cols-2 xl:grid-cols-3 items-stretch gap-6",children:a.map(a=>(0,s.jsx)(i.A,{database:a,delegated:!0,user:e},a.id))})}):(0,s.jsx)(n().Fragment,{children:(0,s.jsx)("span",{className:"info gray w-full font-normal justify-center",children:"No Delegated Databases Yet"})}):(0,s.jsx)(n().Fragment,{children:(0,s.jsx)("div",{className:"w-full justify-center",children:(0,s.jsx)(d.A,{position:"relative",width:"20px"})})})]})}},34033:(e,a,t)=>{t.d(a,{A:()=>c});var s=t(8732),l=t(82015),n=t.n(l),d=t(63715),i=t(55158),r=t(32415);function c({targetDatabase:e}){let[a,t]=n().useState(!1);return(0,s.jsxs)(i.Ay,{title:"delete-database-confirmation",children:[a&&(0,s.jsx)(r.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.db_name?e.db_name:"This Database","' database?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(a?" pointer-events-none opacity-40":""),onClick:a=>{if(!e){alert("No Target Database Selected!");return}t(!0),window.confirm("Note that you will loose all data in this database. Continue?")?(0,d.A)("/api/deleteUserDatabase",{method:"post",body:e},!0).then(e=>{e.success&&window.location.reload()}):t(!1)},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},86173:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(8732),l=t(96089);function n({slugText:e,smaller:a,outlined:t,full:n}){return(0,s.jsxs)("span",{className:"button break-words text-wrap cancel-link "+(t?" outlined gray":"light-gray")+(a?" small-text":""),onClick:a=>{navigator.clipboard.writeText(e).then(()=>{alert(`${n?"Database Full name":"Database Slug"} "${e}" Copied to Clipboard. Use this as the database name when querying data`)})},style:{wordWrap:"break-word",wordBreak:"break-all"},children:[(0,s.jsx)(l.A,{}),(0,s.jsx)("span",{children:e})]})}t(82015)},55158:(e,a,t)=>{t.d(a,{Ay:()=>i,PB:()=>r,fs:()=>c});var s=t(8732),l=t(58150),n=t(82015),d=t.n(n);function i({children:e,title:a,data:t,fullPage:n,wrapperClasses:i,closePopupDispatch:r,wrapperStyle:o,noContainer:h}){return n?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":a||null,style:o,children:[h?(0,s.jsx)(d().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),r&&r()},children:(0,s.jsx)(l.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),r&&r()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[h?(0,s.jsx)(d().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),r&&r()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),h&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),r&&r()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),r&&r()}})]})}function r(e,a){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",a&&a(t))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},24671:(e,a,t)=>{t.d(a,{A:()=>l});var s=t(8732);function l(e){return(0,s.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,s.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}t(82015)},62506:(e,a,t)=>{t.d(a,{A:()=>d});var s=t(8732),l=t(82015),n=t.n(l);function d({children:e,column:a,className:t}){let l=n().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(t?" "+t:""),ref:l,children:e})}},23293:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},6070:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},96089:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},86176:(e,a,t)=>{t.r(a),t.d(a,{DatabasesContext:()=>p,default:()=>u,getServerSideProps:()=>m});var s=t(8732),l=t(82015),n=t.n(l),d=t(95222),i=t(20048),r=t.n(i),c=t(37515),o=t(34033),h=t(67216),x=t.n(h);let p=n().createContext({});function u({user:e,databases:a}){let t=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Databases | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[l,i]=n().useState(0);return(0,s.jsx)(p.Provider,{value:{user:e,databases:a,targetDatabase:l,setTargetDatabase:i},children:(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(d.A,{head:t,user:e,children:(0,s.jsx)(c.A,{})}),(0,s.jsx)(o.A,{targetDatabase:l})]})})}async function m({req:e,res:a,query:t}){let s=await r()(e,a);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let l=await x()("SELECT * FROM user_databases WHERE user_id=? ORDER BY id DESC",[s.id]);return{props:{user:s,databases:l}}}},9455:(e,a)=>{var t;Object.defineProperty(a,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3474.js b/dsql-app/.local_dist/server/chunks/3474.js new file mode 100644 index 0000000..ab0e30e --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/3474.js @@ -0,0 +1,16 @@ +"use strict";exports.id=3474,exports.ids=[3474],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},92090:(e,a,t)=>{t.a(e,async(e,r)=>{try{t.d(a,{A:()=>h});var l=t(8732),s=t(82015),n=t.n(s),i=t(53926),d=t(59023),o=t(46169),c=t(16757),u=t(20136),m=t(50264),p=e([m]);function h(){let{singleUser:e,database:a,user:t}=n().useContext(m.SingleDbUserContext),r=Object.keys(e).filter(e=>!e.match(/^id$|^date_|^user_id$|^social_|^disk_usage|user_type/)),[s,p]=n().useState(!1),[h,y]=n().useState(e.image);return(0,l.jsxs)(n().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.A,{}),h&&"string"==typeof h&&(0,l.jsx)("img",{src:h,alt:"",className:"avatar large outlined"}),(0,l.jsxs)("h1",{className:"text-3xl m-0",children:[e.first_name," ",e.last_name]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("a",{href:`/admin/${t?.id}/databases/${a.db_slug}/users/${e.id}/change-password`,className:"button outlined gray",children:"Change Password"}),(0,l.jsx)("button",{className:"bg-red-500",onClick:r=>{p(!0),window.confirm("Delete this user?")&&(0,o.A)("/api/deleteDbUser",{method:"post",body:{userId:e.id,dbFullName:a.db_full_name}},!0).then(e=>{e.success&&(window.location.pathname=`/admin/${t?.id}/databases/${a.db_slug}/users`)})},children:"Delete User"})]})]}),(0,l.jsx)(i.A,{user:t})]}),(0,l.jsxs)("section",{className:"paper",children:[s&&(0,l.jsx)(c.A,{}),(0,l.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,l.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:t=>{t.preventDefault(),p(!0);let r=t.target,l=Array.from(r),s={};l.forEach(e=>{!e?.nodeName?.match(/button/i)&&e?.name&&e?.value?.match(/./)&&(e?.name?.match(/username|email/)||(s[e.name]=e.value))});let n={dbFullName:a.db_full_name,payload:{...s,id:e.id}};(0,o.A)("/api/updateDbUser",{method:"post",body:n},!0).then(t=>{"object"==typeof h&&h?.imageBase64?(h.imageName=`${a.db_slug}-user-${e.id}`,h.mimeType="jpeg",delete h.imageBase64Full,(0,o.A)("/api/addUserMedia",{method:"post",body:{media:[h],folder:a.db_slug.replace(/_/g,"-"),type:"image"}},!0).then(t=>{t&&t.mediaData&&t.mediaData[0]?.media_url?(0,o.A)("/api/updateDbUser",{method:"post",body:{dbFullName:a.db_full_name,payload:{id:e.id,image:t.mediaData[0].media_url,image_thumbnail:t.mediaData[0].media_thumbnail_url}}},!0).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{p(!1)},500)}):window.location.reload()})):window.location.reload()})},children:[r.map((a,t)=>a?.match(/password|^database|email|username/)?(0,l.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,l.jsx)("label",{htmlFor:a,children:a}),(0,l.jsx)("input",{type:"text",name:a,id:a,value:e[a],placeholder:a,className:"opacity-40 pointer-events-none",onChange:e=>{e.preventDefault()}},t+1)]},t+1):a?.match(/more_user_data/)?(0,l.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,l.jsx)("label",{htmlFor:a,children:a}),(0,l.jsx)("textarea",{name:a,id:a,defaultValue:e[a]?e[a]:void 0,placeholder:a,rows:6},t+1)]},t+1):(0,l.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,l.jsx)("label",{htmlFor:a,children:a}),(0,l.jsx)("input",{type:"text",name:a,id:a,defaultValue:e[a]?e[a]:void 0,placeholder:a},t+1)]},t+1)),(0,l.jsxs)("div",{className:"border border-slate-300 dark:border-slate-600 border-solid bg-slate-100 dark:bg-slate-700 rounded p-6 flex-col items-start w-full",children:[(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"Update Image"}),(0,l.jsx)(u.A,{userImage:h,setUserImage:y})]}),(0,l.jsx)("button",{children:"Update User"})]})})]})]})}m=(p.then?(await p)():p)[0],r()}catch(e){r(e)}})},20136:(e,a,t)=>{t.d(a,{A:()=>i});var r=t(8732),l=t(82015),s=t.n(l),n=t(65842);function i({user:e,userImage:a,setUserImage:t,database:l,className:i}){let d=s().useRef();return(0,r.jsxs)("div",{className:"card no-hover col"+(i?" "+i:""),children:[(0,r.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,r.jsx)("img",{src:a?"string"==typeof a?a:a.imageBase64Full:"/images/user-preset.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:d,"data-imagepreview":"image"})}),(0,r.jsxs)("div",{className:"w-full flex-col image-selector-wrapper",children:[(0,r.jsx)("div",{className:"button outlined secondary w-full whitespace-normal",onClick:e=>{e.target.closest(".image-selector-wrapper").querySelector("input").click()},children:"Upload Image"}),(0,r.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{let a=e.target.files?.[0];if(a){let e=await (0,n.A)({imageInputFile:a,maxWidth:400});t?.(e)}else window.alert("No File Provided!")}})]})]})}},22873:(e,a,t)=>{t.d(a,{A:()=>l});var r=t(71205);async function l({request:e,databaseSlug:a,user:t,query:l}){try{let s=t.id,n=null;if(!l?.delegated)return{dbUserId:s};let i=l.dbUserId,d=`${process.env.DSQL_USER_DB_PREFIX}${i}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${d}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let t=(0,r.A)({encryptedString:e.cookies[o]});if(!t)throw Error("Invalid Token");if((n=JSON.parse(t)).databaseSlug===a)return{dbUserId:s=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:s}}catch(e){return null}}},65842:(e,a,t)=>{t.d(a,{A:()=>l});var r=t(76102);let l=t.n(r)().media.imageInputFileToBase64},23293:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>r});let r=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},77047:(e,a,t)=>{t.d(a,{A:()=>s});var r=t(29021),l=t.n(r);async function s({user:e,message:a,component:t,noMail:r,req:s}){let n=new Date,i=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],a=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],l=t||r||a||s.socket.remoteAddress;if(!l)return null;return String(l)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== +Error Message: ${a} +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),s?.url&&(r+=` +URL: ${s.url}`),s?.body&&(r+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),i&&(r+=` +IP: ${i}`),r+=` +Date: ${n.toDateString()} +========================================`,l().existsSync("./.tmp/error.log")||l().writeFileSync("./.tmp/error.log","","utf-8");let d=l().readFileSync("./.tmp/error.log","utf-8");l().writeFileSync("./.tmp/error.log",r),l().appendFileSync("./.tmp/error.log",` + + + + +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,a,t)=>{t.d(a,{A:()=>c});var r=t(71205);let l=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:a}){let t=[];try{for(let s=0;s",a.message),e}}var n=t(77047),i=t(71934),d=t(43651),o=t(16175);async function c({queryString:e,queryValuesArray:a,database:t,tableSchema:r,useLocal:l}){let c;let u=!!l||!!t?.match(/^datasquirel$/),m=l?o.A:u?i.A:d.A;try{c=e&&a&&Array.isArray(a)&&a[0]?u?await m(e,a):await m({paradigm:"Full Access",queryString:e,queryValues:a}):u?await m(e):await m({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,n.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&r)try{let e=c;return await s({unparsedResults:e,tableSchema:r})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,n.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},43651:(e,a,t)=>{async function r(e,a,t){try{if("string"==typeof a){let r=await e.query(l(a),t);return JSON.parse(JSON.stringify(r))}if("object"!=typeof a)return null;{let t=[];for(let r=0;rs})},16175:(e,a,t)=>{t.d(a,{A:()=>i});var r=t(9973),l=t.n(r),s=t(29021),n=t.n(s);async function i(...e){let a=l()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let a=`${e}/ca-cert.pem`;if(!n().existsSync(a)){console.log(`${a} does not exist`);return}return{ca:n().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},50264:(e,a,t)=>{t.a(e,async(e,r)=>{try{t.r(a),t.d(a,{SingleDbUserContext:()=>x,default:()=>f,getServerSideProps:()=>b});var l=t(8732),s=t(29021),n=t.n(s),i=t(82015),d=t.n(i),o=t(25562),c=t(92702),u=t(55880),m=t(22873),p=t(92090),h=t(71934),y=t(52854),g=e([u,p]);[u,p]=g.then?(await g)():g;let x=d().createContext({});function f({user:e,database:a,table:t,dbSchemaData:r,singleUser:s,query:n,confirmedDelegetedUser:i}){let d=`${s.first_name} ${s.last_name} Users | Datasquirel"`,c=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:d}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,l.jsx)(o.A,{head:c,user:e,extraHeaderContent:(0,l.jsx)(u.A,{database:a,query:n,confirmedDelegetedUser:i,user:e}),children:(0,l.jsx)(x.Provider,{value:{user:e,database:a,table:t,dbSchemaData:r,singleUser:s,query:n,confirmedDelegetedUser:i},children:(0,l.jsx)(p.A,{})})})}async function b({req:e,res:a,query:t}){let r=await (0,c.default)(e,a);if(!r?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let l=await (0,m.A)({request:e,user:r,databaseSlug:t.single,query:t});if(!l)return{redirect:{destination:"/admin",permanent:!1}};let{dbUserId:s,rootUserId:i}=l,d=await (0,h.A)(`SELECT * FROM user_databases WHERE user_id='${s}' AND db_slug='${t.single}'`);if(!d||!d[0])return console.log("Database Not Found"),{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let o=JSON.parse(n().readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s}/main.json`,"utf-8")),u=(o.filter(e=>e.dbFullName===d[0].db_full_name)[0]?.tables).filter(e=>"users"===e.tableName)[0],p=await (0,y.A)({database:d[0].db_full_name,queryString:`SELECT * FROM ${d[0].db_full_name}.users WHERE id='${t.user}'`,tableSchema:u});return p?.[0]?{props:{user:r,database:d?.[0]||null,table:u||{},dbSchemaData:o,singleUser:p?.[0]||null,query:t,confirmedDelegetedUser:l}}:{redirect:{destination:`/admin/${r?.id}/databases/${d[0].db_slug}/users`,permanent:!1}}}r()}catch(e){r(e)}})},9455:(e,a)=>{Object.defineProperty(a,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3496.js b/dsql-app/.local_dist/server/chunks/3496.js new file mode 100644 index 0000000..a77ddf1 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/3496.js @@ -0,0 +1,16 @@ +"use strict";exports.id=3496,exports.ids=[3496],exports.modules={96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(48786),n=t(95969),a=t(29021),i=t.n(a),o=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,n.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let E=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!E)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${E}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=n}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(29021),n=t.n(s);async function a({user:e,message:r,component:t,noMail:s,req:a}){let i=new Date,o=(()=>{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 s=`🚀 SERVER ERROR =========================== +Error Message: ${r} +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(s+=` +IP: ${o}`),s+=` +Date: ${i.toDateString()} +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` + + + + +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511),n=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,s.scryptSync)(a,i,o),u=n.Buffer.alloc(16,0),c=(0,s.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(55511),n=t(79428);function a({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,s.scryptSync)(a,i,o),u=n.Buffer.alloc(16,0),c=(0,s.createCipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},5437:(e,r,t)=>{t.d(r,{A:()=>_});var s=t(33873),n=t.n(s),a=t(47795),i=t.n(a),o=t(66866),l=t(41864);async function u({username:e,host:r,grants:t,userId:s}){let n=!1;if(console.log("Handling Grants for User =>",e,r),!e)return console.log("No username provided."),n;if(!r)return console.log(`No Host provided. \x1b[35m\`--host\`\x1b[0m flag is required`),n;if(!t)return console.log("No grants Array provided."),n;try{let a=await (0,o.A)(`SELECT * FROM mysql.user WHERE User = '${e}' AND Host = '${r}'`);if(a?.[0]?.User){let n=await (0,o.A)(`SHOW GRANTS FOR '${e}'@'${r}'`);for(let e=0;e",e.message)}return n}var c=t(68829),E=t(95969);t(60818).config({path:n().resolve(__dirname,"../../../.env")});let d=process.env.DSQL_DB_HOST||"127.0.0.1";async function _({userId:e,mariadbUserHost:r,mariadbUsername:t,sqlUserID:s}){let n=await (0,l.A)({query:"SELECT * FROM mariadb_users"});if(!n?.[0])return;let a=!!e&&e==Number(process.env.DSQL_SU_USER_ID);for(let _=0;_",e.message)}}}},41864:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(29021),n=t.n(s),a=t(33873),i=t.n(a);async function o({query:e,values:r}){let t,s=global.DSQL_DB_CONN;try{t=e&&r?await s.query(e,r):await s.query(e)}catch(e){if(process.env.FIRST_RUN)return null;console.log("ERROR in dbHandler =>",e.message),console.log(e),console.log(s.config()),n().appendFileSync(i().resolve(__dirname,"../.tmp/dbErrorLogs.txt"),JSON.stringify(e,null,4)+"\n"+Date()+"\n\n\n","utf8"),t=null}finally{await s?.end()}return t?JSON.parse(JSON.stringify(t)):null}},66866:(e,r,t)=>{t.d(r,{A:()=>n});var s=t(41864);async function n(e){let r;try{r=await (0,s.A)({query:e})}catch(e){console.log("ERROR in noDatabaseDbHandler =>",e.message)}return r||null}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5134.js b/dsql-app/.local_dist/server/chunks/3634.js similarity index 80% rename from dsql-app/.local_dist/server/chunks/5134.js rename to dsql-app/.local_dist/server/chunks/3634.js index 22c9137..7898e56 100644 --- a/dsql-app/.local_dist/server/chunks/5134.js +++ b/dsql-app/.local_dist/server/chunks/3634.js @@ -1 +1 @@ -"use strict";exports.id=5134,exports.ids=[5134],exports.modules={46437:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(8732),l=t(23293);function n(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(l.A,{})})}t(82015)},94010:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>i});var l=t(8732);t(82015);var n=t(96089),r=t(75979),d=e([r]);function i({slugText:e,justIcon:a,noIcon:t,title:s,outlined:d,extraClasses:i}){return(0,l.jsxs)("div",{className:(0,r.twMerge)("button small-text hover:!bg-transparent",d?" outlined gray bg-white":" ghost light-gray",i),onClick:a=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:d?void 0:{padding:0},children:[!t&&(0,l.jsx)(n.A,{size:d?15:20}),!a&&(0,l.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:s||"Copy Slug"})]})}r=(d.then?(await d)():d)[0],s()}catch(e){s(e)}})},64098:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>f});var l=t(8732),n=t(82015),r=t.n(n),d=t(94010),i=t(36605),o=t(22603),c=t(63715),m=t(32415),h=t(58526),u=t(98136),b=t(71296),x=t(72935),g=t(25088),p=e([d]);function f({database:e,query:a,confirmedDelegetedUser:t,user:s}){let{active_clone:n,active_clone_parent_db:o}=e,c=t?.delegated;t?.priviledges?.match(/Edit Tables/i),t?.priviledges?.match(/Delete Tables/i);let[m,b]=r().useState(null);return(0,l.jsxs)("div",{className:"flex-wrap justify-center gap-4",children:[(0,l.jsxs)("div",{className:"dropdown-wrapper gap-4",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsxs)("div",{className:"w-8 h-8 relative",children:[(0,l.jsx)("img",{src:e.db_image,alt:"Database Image",width:20,className:"w-full h-full rounded-full object-cover"}),t?.delegated&&(0,l.jsxs)("div",{className:" absolute -bottom-2 left-5 gap-1",children:[(0,l.jsx)("img",{src:t.rootUserImage,alt:"Root User Image",className:"w-5 h-5 rounded-full object-cover border-2 border-white dark:border-slate-800 border-solid"}),(0,l.jsx)("span",{className:"text-xs",children:t.rootUserEmail})]})]}),(0,l.jsx)("span",{className:"font-semibold text-base"+(t?.delegated?" -mt-3":""),children:e.db_name})]}),(0,l.jsx)(h.A,{size:20}),(0,l.jsxs)("div",{className:"dropdown p-0",children:[(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/edit-database`,className:"button plain-text more-padding normal-weight",children:"Edit Database"}),(0,l.jsx)("hr",{className:"m-0"}),!n&&(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/add-database?duplicate=${e.db_full_name}`,className:"button plain-text more-padding normal-weight",children:"Duplicate Database"}),(0,l.jsx)("hr",{className:"m-0"})]}),(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/schema`,className:"button plain-text more-padding normal-weight",children:"Schema"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/users`,className:"button plain-text more-padding normal-weight",children:"Database Users"}),!c&&(0,l.jsx)(j,{database:e,user:s})]})]}),(0,l.jsx)("hr",{className:"vertical"}),(0,l.jsx)(d.A,{slugText:e.db_slug,title:"Db Slug"}),(0,l.jsx)("div",{className:"-mt-1 gap-1",children:(0,l.jsx)(d.A,{slugText:e.db_full_name,title:"Full DB Name"})}),!c&&(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("hr",{className:"vertical"}),(0,l.jsxs)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/shell`,className:"button ghost small-text",style:{height:"30px",padding:0},children:[(0,l.jsx)(u.A,{size:20}),(0,l.jsx)("span",{className:"text-sm font-semibold",children:"Shell"})]})]}),(0,l.jsx)("hr",{className:"vertical"}),(0,l.jsx)(i.A,{})]})}function j({database:e,user:a}){let[t,s]=r().useState(!1),n=r().useRef();return(0,l.jsxs)(r().Fragment,{children:[t&&(0,l.jsx)(m.A,{width:"20px"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("a",{href:`/admin/${a?.id}/databases/${e.db_slug}/shell`,className:"button plain-text more-padding normal-weight",children:"Shell"}),(0,l.jsx)("hr",{className:"m-0"}),e?.remote_connected==1?(0,l.jsx)(w,{database:e}):(0,l.jsx)("a",{href:`/admin/${a?.id}/databases/${e.db_slug}/connect`,className:"button plain-text more-padding normal-weight",children:"Connect"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsxs)("button",{className:"button plain-text more-padding normal-weight w-full",onClick:a=>{(0,o.A)({url:`/api/exportDatabase?dbName=${e.db_full_name}`,fileName:`${e.db_full_name}.sql`})},children:[(0,l.jsx)(b.A,{size:20}),(0,l.jsx)("span",{children:"Export Database"})]}),(0,l.jsx)("input",{type:"file",name:"upload-update-schema",id:"",ref:n,className:"hidden"}),(0,l.jsxs)("button",{className:"button gray outlined more-padding normal-weight w-full rounded-none -mb-[1px]",onClick:a=>{n.current&&(n.current.addEventListener("change",a=>{let t=a.target,l=t.files?.[0];if(!l){alert("No File Selected");return}var n=new FileReader;n.onload=function(a){var t=a.target?.result;t||alert("Invalid File!");try{let a=t?.toString();if(!a)throw Error("Invalid File!");let l=JSON.parse(a);window.confirm("Are you sure you want to use this schema file for the current database?")&&window.confirm("Remember if any existing table doesn't exist in the new schema file that table and all its content will be erased forever. Continue?")&&(s(!0),(0,c.A)("/api/user-schema/replace-database-schema",{method:"POST",body:{schema:l,dbId:e.id}},!0).then(e=>{e.success&&window.location.reload()}).finally(()=>{s(!1)}))}catch(e){alert("Invalid File. Please enter a valid JSON file")}},n.readAsText(l)}),n.current?.click())},children:[(0,l.jsx)(x.A,{size:20}),(0,l.jsx)("span",{children:"Update From Schema"})]}),(0,l.jsxs)("button",{className:"button gray outlined more-padding normal-weight w-full rounded-none",onClick:a=>{(0,o.A)({url:`/api/downloadDatabaseSchema?dbName=${e.db_full_name}`,fileName:`${e.db_full_name}.json`})},children:[(0,l.jsx)(g.A,{size:20}),(0,l.jsx)("span",{children:"Download Schema"})]})]})}function w({database:e}){return(0,l.jsx)("button",{className:"button plain-text more-padding normal-weight w-full",onClick:a=>{window.confirm("Disconnect this Database from the remote host?")&&(0,c.A)("/api/connect/disconnect",{method:"POST",body:{dbId:e.id}},!0).then(e=>{e.success?window.location.reload():(console.log(e),alert(e.msg||"Remote disconnection failed. Please try again."))})},children:"Disconnect"})}d=(p.then?(await p)():p)[0],s()}catch(e){s(e)}})},22603:(e,a,t)=>{t.d(a,{A:()=>s});function s({url:e,fileName:a,setLoading:t}){t&&t(!0),fetch(e,{method:"GET",headers:{"x-csrf-auth":localStorage.getItem("csrf")}}).then(e=>e.body).then(e=>{let a=e?.getReader();if(a)return new ReadableStream({start:e=>(function t(){return a?.read().then(({done:a,value:s})=>{if(a){e.close();return}return e.enqueue(s),t()})})()})}).then(e=>new Response(e)).then(e=>e.blob()).then(e=>URL.createObjectURL(e)).then(e=>{let s=document.createElement("a");s.href=e,s.download=a,s.style.display="none",document.body.appendChild(s),s.click(),URL.revokeObjectURL(e),document.body.removeChild(s),setTimeout(()=>{t&&t(!1)},1e3)}).catch(e=>{console.log(e),setTimeout(()=>{t&&t(!1)},1e3)})}}}; \ No newline at end of file +"use strict";exports.id=3634,exports.ids=[3634],exports.modules={59023:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(8732),l=t(23293);function n(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(l.A,{})})}t(82015)},73872:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>i});var l=t(8732);t(82015);var n=t(96089),r=t(75979),d=e([r]);function i({slugText:e,justIcon:a,noIcon:t,title:s,outlined:d,extraClasses:i}){return(0,l.jsxs)("div",{className:(0,r.twMerge)("button small-text hover:!bg-transparent",d?" outlined gray bg-white":" ghost light-gray",i),onClick:a=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:d?void 0:{padding:0},children:[!t&&(0,l.jsx)(n.A,{size:d?15:20}),!a&&(0,l.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:s||"Copy Slug"})]})}r=(d.then?(await d)():d)[0],s()}catch(e){s(e)}})},55880:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>j});var l=t(8732),n=t(82015),r=t.n(n),d=t(73872),i=t(87639),o=t(63025),c=t(46169),m=t(16757),h=t(58526),u=t(98136),b=t(71296),x=t(72935),g=t(25088),p=e([d]);function j({database:e,query:a,confirmedDelegetedUser:t,user:s}){let{active_clone:n,active_clone_parent_db:o}=e,c=t?.delegated;t?.priviledges?.match(/Edit Tables/i),t?.priviledges?.match(/Delete Tables/i);let[m,b]=r().useState(null);return(0,l.jsxs)("div",{className:"flex-wrap justify-center gap-4",children:[(0,l.jsxs)("div",{className:"dropdown-wrapper gap-4",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsxs)("div",{className:"w-8 h-8 relative",children:[(0,l.jsx)("img",{src:e.db_image,alt:"Database Image",width:20,className:"w-full h-full rounded-full object-cover"}),t?.delegated&&(0,l.jsxs)("div",{className:" absolute -bottom-2 left-5 gap-1",children:[(0,l.jsx)("img",{src:t.rootUserImage,alt:"Root User Image",className:"w-5 h-5 rounded-full object-cover border-2 border-white dark:border-slate-800 border-solid"}),(0,l.jsx)("span",{className:"text-xs",children:t.rootUserEmail})]})]}),(0,l.jsx)("span",{className:"font-semibold text-base"+(t?.delegated?" -mt-3":""),children:e.db_name})]}),(0,l.jsx)(h.A,{size:20}),(0,l.jsxs)("div",{className:"dropdown p-0",children:[(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/edit-database`,className:"button plain-text more-padding normal-weight",children:"Edit Database"}),(0,l.jsx)("hr",{className:"m-0"}),!n&&(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/add-database?duplicate=${e.db_full_name}`,className:"button plain-text more-padding normal-weight",children:"Duplicate Database"}),(0,l.jsx)("hr",{className:"m-0"})]}),(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/schema`,className:"button plain-text more-padding normal-weight",children:"Schema"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/users`,className:"button plain-text more-padding normal-weight",children:"Database Users"}),!c&&(0,l.jsx)(f,{database:e,user:s})]})]}),(0,l.jsx)("hr",{className:"vertical"}),(0,l.jsx)(d.A,{slugText:e.db_slug,title:"Db Slug"}),(0,l.jsx)("div",{className:"-mt-1 gap-1",children:(0,l.jsx)(d.A,{slugText:e.db_full_name,title:"Full DB Name"})}),!c&&(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("hr",{className:"vertical"}),(0,l.jsxs)("a",{href:`/admin/${s?.id}/databases/${e.db_slug}/shell`,className:"button ghost small-text",style:{height:"30px",padding:0},children:[(0,l.jsx)(u.A,{size:20}),(0,l.jsx)("span",{className:"text-sm font-semibold",children:"Shell"})]})]}),(0,l.jsx)("hr",{className:"vertical"}),(0,l.jsx)(i.A,{})]})}function f({database:e,user:a}){let[t,s]=r().useState(!1),n=r().useRef();return(0,l.jsxs)(r().Fragment,{children:[t&&(0,l.jsx)(m.A,{width:"20px"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("a",{href:`/admin/${a?.id}/databases/${e.db_slug}/shell`,className:"button plain-text more-padding normal-weight",children:"Shell"}),(0,l.jsx)("hr",{className:"m-0"}),e?.remote_connected==1?(0,l.jsx)(w,{database:e}):(0,l.jsx)("a",{href:`/admin/${a?.id}/databases/${e.db_slug}/connect`,className:"button plain-text more-padding normal-weight",children:"Connect"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsxs)("button",{className:"button plain-text more-padding normal-weight w-full",onClick:a=>{(0,o.A)({url:`/api/exportDatabase?dbName=${e.db_full_name}`,fileName:`${e.db_full_name}.sql`})},children:[(0,l.jsx)(b.A,{size:20}),(0,l.jsx)("span",{children:"Export Database"})]}),(0,l.jsx)("input",{type:"file",name:"upload-update-schema",id:"",ref:n,className:"hidden"}),(0,l.jsxs)("button",{className:"button gray outlined more-padding normal-weight w-full rounded-none -mb-[1px]",onClick:a=>{n.current&&(n.current.addEventListener("change",a=>{let t=a.target,l=t.files?.[0];if(!l){alert("No File Selected");return}var n=new FileReader;n.onload=function(a){var t=a.target?.result;t||alert("Invalid File!");try{let a=t?.toString();if(!a)throw Error("Invalid File!");let l=JSON.parse(a);window.confirm("Are you sure you want to use this schema file for the current database?")&&window.confirm("Remember if any existing table doesn't exist in the new schema file that table and all its content will be erased forever. Continue?")&&(s(!0),(0,c.A)("/api/user-schema/replace-database-schema",{method:"POST",body:{schema:l,dbId:e.id}},!0).then(e=>{e.success&&window.location.reload()}).finally(()=>{s(!1)}))}catch(e){alert("Invalid File. Please enter a valid JSON file")}},n.readAsText(l)}),n.current?.click())},children:[(0,l.jsx)(x.A,{size:20}),(0,l.jsx)("span",{children:"Update From Schema"})]}),(0,l.jsxs)("button",{className:"button gray outlined more-padding normal-weight w-full rounded-none",onClick:a=>{(0,o.A)({url:`/api/downloadDatabaseSchema?dbName=${e.db_full_name}`,fileName:`${e.db_full_name}.json`})},children:[(0,l.jsx)(g.A,{size:20}),(0,l.jsx)("span",{children:"Download Schema"})]})]})}function w({database:e}){return(0,l.jsx)("button",{className:"button plain-text more-padding normal-weight w-full",onClick:a=>{window.confirm("Disconnect this Database from the remote host?")&&(0,c.A)("/api/connect/disconnect",{method:"POST",body:{dbId:e.id}},!0).then(e=>{e.success?window.location.reload():(console.log(e),alert(e.msg||"Remote disconnection failed. Please try again."))})},children:"Disconnect"})}d=(p.then?(await p)():p)[0],s()}catch(e){s(e)}})},63025:(e,a,t)=>{t.d(a,{A:()=>s});function s({url:e,fileName:a,setLoading:t}){t&&t(!0),fetch(e,{method:"GET",headers:{[localStorage.getItem("csrf")||"none"]:"true"}}).then(e=>e.body).then(e=>{let a=e?.getReader();if(a)return new ReadableStream({start:e=>(function t(){return a?.read().then(({done:a,value:s})=>{if(a){e.close();return}return e.enqueue(s),t()})})()})}).then(e=>new Response(e)).then(e=>e.blob()).then(e=>URL.createObjectURL(e)).then(e=>{let s=document.createElement("a");s.href=e,s.download=a,s.style.display="none",document.body.appendChild(s),s.click(),URL.revokeObjectURL(e),document.body.removeChild(s),setTimeout(()=>{t&&t(!1)},1e3)}).catch(e=>{console.log(e),setTimeout(()=>{t&&t(!1)},1e3)})}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3704.js b/dsql-app/.local_dist/server/chunks/3704.js new file mode 100644 index 0000000..fe12fdb --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/3704.js @@ -0,0 +1,16 @@ +"use strict";exports.id=3704,exports.ids=[3704],exports.modules={83704:(e,a,t)=>{t.d(a,{A:()=>g});var s=t(29021),r=t.n(s),i=t(96052),l=t(33873),n=t.n(l),d=t(67580),o=t(30944),u=t(68829),c=t(98e3),m=t(49941);async function _({user:e,social_platform:a,invitation:t,database:s,additionalFields:r,useLocal:i}){let l=s||"datasquirel",n=`SELECT * FROM \`${l}\`.\`users\` WHERE email=? AND social_id=? AND social_platform=?`,d=[e.email,e.social_id,a],u=await (0,o.A)({database:l,queryString:n,queryValuesArray:d,useLocal:i});if(!u?.[0])return{success:!1,payload:null};let c=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),_={id:u[0].id,first_name:u[0].first_name,last_name:u[0].last_name,username:u[0].username,user_type:u[0].user_type,email:u[0].email,social_id:u[0].social_id,image:u[0].image,image_thumbnail:u[0].image_thumbnail,verification_status:u[0].verification_status,social_login:u[0].social_login,social_platform:u[0].social_platform,csrf_k:c,logged_in_status:!0,date:Date.now()};return r?.[0]&&r.forEach(e=>{_[e]=u[0][e]}),t&&(!s||s?.match(/^datasquirel$/))&&(0,m.A)({query:t,user:_,useLocal:i}),{success:!0,payload:_,csrf:c}}async function g({database:e,social_id:a,email:t,social_platform:s,payload:l,invitation:m,supEmail:g,additionalFields:p,useLocal:f}){try{let E=[a.toString(),s],y=await (0,o.A)({database:e||"datasquirel",queryString:"SELECT * FROM datasquirel.users WHERE social_id = ? AND social_login='1' AND social_platform = ? ",queryValuesArray:E,useLocal:f});if(y&&y[0])return await _({user:y[0],social_platform:s,invitation:m,database:e,additionalFields:p,useLocal:f});let S=t||g||null;if(!S)return{success:!1,payload:null,msg:"No Email Present"};let A=`SELECT * FROM datasquirel.users WHERE email='${S}'`,b=await (0,o.A)({database:e||"datasquirel",queryString:A,useLocal:f});if(b&&b[0])return{success:!1,payload:null,msg:"This Email is already taken"};let D=[S,s,a],h=await (0,o.A)({database:e||"datasquirel",queryString:"SELECT * FROM datasquirel.users WHERE email=? AND social_login='1' AND social_platform=? AND social_id=?",queryValuesArray:D,useLocal:f});if(h&&h[0])return await _({user:l,social_platform:s,invitation:m,database:e,additionalFields:p,useLocal:f});let R=(0,u.default)({data:a.toString()}),v={social_login:"1",verification_status:g?"0":"1",password:R};Object.keys(l).forEach(e=>{v[e]=l[e]});let N=await (0,c.A)({dbContext:e?"Dsql User":void 0,paradigm:e?"Full Access":void 0,dbFullName:e||"datasquirel",tableName:"users",duplicateColumnName:"email",duplicateColumnValue:S,data:{...v,email:S},useLocal:f});if(!N?.insertId)return console.log("Social User Failed to insert in 'handleSocialDb.ts' backend function =>",N),{success:!1,payload:null,msg:"Social User Failed to insert in 'handleSocialDb.ts' backend function"};{e||await (0,d.A)({userId:N.insertId,useLocal:f});let a=`SELECT * FROM datasquirel.users WHERE id='${N.insertId}'`,t=await (0,o.A)({database:e||"datasquirel",queryString:a,useLocal:f});if(!t||!t[0])return{success:!1,payload:null,msg:"User Insertion Failed!"};if(g&&e?.match(/^datasquirel$/)){let e=(0,u.default)({data:JSON.stringify({id:N.insertId,email:g,dateCode:Date.now()})});(0,i.default)({to:g,subject:"Verify Email Address",text:"Please click the link to verify your email address",html:r().readFileSync("./email/send-email-verification-link.html","utf8").replace(/{{host}}/,process.env.DSQL_HOST||"").replace(/{{token}}/,e||"")}).then(()=>{})}let l=process.env.DSQL_STATIC_SERVER_DIR;if(!l)return console.log("Static File ENV not Found!"),{success:!1,payload:null,msg:"Static File ENV not Found!"};if(!e||e?.match(/^datasquirel$/)){let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${N.insertId}`,a=n().join(l,`images/user-images/user-${N.insertId}`);r().mkdirSync(e),r().mkdirSync(a),r().writeFileSync(`${e}/main.json`,JSON.stringify([]),"utf8")}return await _({user:t[0],social_platform:s,invitation:m,database:e,additionalFields:p,useLocal:f})}}catch(e){return console.log("ERROR in 'handleSocialDb.ts' backend function =>",e.message),{success:!1,payload:null,msg:e.message}}}},49941:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(67619),r=t(48786),i=t(98e3),l=t(7971);async function n({query:e,user:a,useLocal:t}){try{let s=t?l.A:r.A,{invite:n,database_access:d,priviledge:o,email:u}=e,c=[n,u],m=await s("SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",c);if(!m||!m[0])throw Error("No Invitation Found");let _=[n],g=await s("SELECT first_name,last_name,email FROM users WHERE id=?",_);if(g?.[0]){let e=await s("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[n,a.id,u]);if(e?.[0])console.log("User already added");else{(0,i.A)({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:n,invited_user_id:a.id,database_access:d,first_name:a.first_name,last_name:a.last_name,phone:a.phone,email:a.email,username:a.username,user_type:"admin",user_priviledge:o,image:a.image,image_thumbnail:a.image_thumbnail},useLocal:t});let e=await s("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[n,u]);if(await s("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[n,a.id]),e&&e[0]){let s=e[0].db_tables_data.split("|");for(let e=0;e{t.d(a,{A:()=>u});var s=t(47795),r=t.n(s),i=t(48786),l=t(47546),n=t(98e3),d=t(68829),o=t(7971);async function u({userId:e,useLocal:a}){try{let t=process.env.DSQL_DB_HOST||"127.0.0.1",s=`dsql_user_${e}`,u=r().generate({length:16,numbers:!0,symbols:!0,uppercase:!0,exclude:"*#.'`\""}),c=(0,d.default)({data:u}),m=`CREATE USER IF NOT EXISTS '${s}'@'127.0.0.1' IDENTIFIED BY '${u}'`;a?await (0,o.A)(m):await (0,l.A)(m);let _="UPDATE users SET mariadb_user = ?, mariadb_host = '127.0.0.1', mariadb_pass = ? WHERE id = ?",g=[s,c,e];a?await (0,o.A)(_,g):await (0,i.A)(_,g),await (0,n.A)({tableName:"mariadb_users",data:{user_id:e,username:s,host:t,password:c,primary:"1",grants:'[{"database":"*","table":"*","privileges":["ALL"]}]'},dbContext:"Master",useLocal:a}),console.log(`User ${e} SQL credentials successfully added.`)}catch(e){console.log("Error in adding SQL user in 'addMariadbUser' function =>",e.message)}}},96052:(e,a,t)=>{t.r(a),t.d(a,{default:()=>n});var s=t(29021),r=t.n(s),i=t(21572);let l=t.n(i)().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 n({to:e,subject:a,text:t,html:s,alias:i,senderName:n}){let d;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let o=(i?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!r().existsSync("./email/index.html"))return;let u=r().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,s||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"${n||"Datasquirel"}" <${o}>`,s.sender=o,i&&(s.replyTo=o),s.to=e,s.subject=a,s.text=t,s.html=u,d=await l.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return d}},43775:(e,a,t)=>{t.d(a,{A:()=>i});var s=t(95969);let r=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function i({unparsedResults:e,tableSchema:a}){let t=[];try{for(let i=0;i",a.message),e}}},67619:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var s=t(29021),r=t.n(s);async function i({user:e,message:a,component:t,noMail:s,req:i}){let l=new Date,n=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],a=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],r=t||s||a||i.socket.remoteAddress;if(!r)return null;return String(r)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +Error Message: ${a} +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),i?.url&&(s+=` +URL: ${i.url}`),i?.body&&(s+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),n&&(s+=` +IP: ${n}`),s+=` +Date: ${l.toDateString()} +========================================`,r().existsSync("./.tmp/error.log")||r().writeFileSync("./.tmp/error.log","","utf-8");let d=r().readFileSync("./.tmp/error.log","utf-8");r().writeFileSync("./.tmp/error.log",s),r().appendFileSync("./.tmp/error.log",` + + + + +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,a,t)=>{t.d(a,{A:()=>d});var s=t(43775),r=t(67619),i=t(48786),l=t(37275),n=t(7971);async function d({queryString:e,queryValuesArray:a,database:t,tableSchema:d,useLocal:o}){let u;let c=!!o||!!t?.match(/^datasquirel$/),m=o?n.A:c?i.A:l.default;try{u=e&&a&&Array.isArray(a)&&a[0]?c?await m(e,a):await m({paradigm:"Full Access",queryString:e,queryValues:a}):c?await m(e):await m({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,r.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&d)try{let e=u;return await (0,s.A)({unparsedResults:e,tableSchema:d})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,r.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,a,t)=>{t.d(a,{A:()=>i});var s=t(55511),r=t(79428);function i({encryptedString:e,encryptionKey:a,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=a||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,n=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=(0,s.scryptSync)(i,l,n),o=r.Buffer.alloc(16,0),u=(0,s.createDecipheriv)("aes-192-cbc",d,o);try{let a=u.update(e,"hex","utf8");return a+=u.final("utf8")}catch(a){return console.log("Error in decrypting =>",a.message),e}}},47546:(e,a,t)=>{t.d(a,{A:()=>s});function s(...e){let a=global.DSQL_DB_CONN;try{return new Promise((t,s)=>{a.query(...e).then(e=>{a.end(),t(JSON.parse(JSON.stringify(e)))}).catch(e=>{a.end(),t({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3791.js b/dsql-app/.local_dist/server/chunks/3791.js new file mode 100644 index 0000000..c302f2f --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/3791.js @@ -0,0 +1 @@ +"use strict";exports.id=3791,exports.ids=[3791],exports.modules={23791:(e,a,s)=>{s.a(e,async(e,l)=>{try{s.d(a,{A:()=>o,p:()=>u});var t=s(8732),i=s(82015),n=s.n(i),r=s(6803),c=s(537),d=e([r]);function o({database:e,tables:a,setTargetTable:s,confirmedDelegetedUser:l,query:i,user:d}){return l?.delegated,l?.priviledges?.match(/Edit Tables/i),l?.priviledges?.match(/Delete Tables/i),l?.priviledges?.match(/Create Tables/i),(0,t.jsxs)(n().Fragment,{children:[e.active_clone&&d?(0,t.jsx)(c.A,{database:e,user:d}):(0,t.jsx)(t.Fragment,{}),e.remote_connected?(0,t.jsx)(u,{database:e}):(0,t.jsx)(t.Fragment,{}),(0,t.jsxs)("section",{className:"paper gray",children:[a&&a[0]?(0,t.jsxs)("div",{className:"flex-wrap gap-4 justify-between w-full",children:[(0,t.jsx)("h2",{className:"text-xl m-0",children:"Tables"}),(0,t.jsx)("a",{href:`/admin/${d?.id}/databases/${e.db_slug}/tables`,className:"button outlined gray small-text",children:"See All Tables"})]}):(0,t.jsx)("h2",{className:"text-xl m-0",children:"This Database is empty"}),(0,t.jsx)("hr",{}),d?(0,t.jsx)(r.A,{database:e,tables:a,setTargetTable:s,confirmedDelegetedUser:l,query:i,user:d}):null]})]})}function u({database:e}){return(0,t.jsx)("div",{className:"info green",children:(0,t.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,t.jsx)("b",{children:e.remote_db_full_name?.replace(/datasquirel_user_\d+_/,"")})," ","on"," ",(0,t.jsx)("a",{className:"font-bold text-inherit",href:e.remote_connection_host,target:"_blank",children:e.remote_connection_host})," ","Host"]})})}r=(d.then?(await d)():d)[0],l()}catch(e){l(e)}})},17208:(e,a,s)=>{s.d(a,{A:()=>o});var l=s(8732),t=s(82015),i=s.n(t),n=s(46169),r=s(83921),c=s(16757),d=s(2459);function o({database:e}){let a=i().useRef(),[s,t]=i().useState(!1);return(0,l.jsxs)(i().Fragment,{children:[(0,l.jsx)("input",{type:"file",name:"sql-file-input",id:"sql-file-input",accept:".sql",className:"hidden",ref:a}),(0,l.jsxs)("button",{className:"flex-col normal-weight outlined gray dashed w-full p-8 relative",onClick:s=>{a.current?.addEventListener("change",a=>{let s=a.target;if(!s.files?.[0]){window.alert("No FIles selected");return}r.A({inputFile:s.files[0]}).then(a=>{window.confirm(`Use this file '${a.fileName}' as your import file?`)&&(t(!0),n.A("/api/importDatabase",{method:"post",body:{database:e,fileBase64:a.fileBase64}},!0).then(e=>{e.success?window.location.reload():window.alert("Import Failed!"),setTimeout(()=>{t(!1)},1e3)}))})}),a.current?.click()},children:[s&&(0,l.jsx)(c.A,{}),(0,l.jsx)("span",{className:"text-slate-400",children:"Do you have an SQL file already?"}),(0,l.jsx)(d.A,{}),(0,l.jsx)("span",{className:"",children:"Import Database"})]})]})}},7605:(e,a,s)=>{s.d(a,{A:()=>o});var l=s(8732),t=s(82015),i=s.n(t),n=s(46169),r=s(83921),c=s(16757),d=s(38552);function o({database:e}){let a=i().useRef(),[s,t]=i().useState(!1);return(0,l.jsxs)(i().Fragment,{children:[(0,l.jsx)("input",{type:"file",name:"json_file_input",id:"json_file_input",accept:".json",className:"hidden",ref:a}),(0,l.jsxs)("button",{className:"flex-col normal-weight outlined gray dashed w-full p-8 relative",onClick:s=>{a.current?.addEventListener("change",a=>{let s=a.target;if(!s.files?.[0]){window.alert("No FIles selected");return}r.A({inputFile:s.files[0]}).then(a=>{window.confirm(`Use this file '${a.fileName}' as your import file?`)&&(t(!0),n.A("/api/importDatabaseSchema",{method:"post",body:{database:e,fileBase64:a.fileBase64}},!0).then(e=>{e.success?window.location.reload():window.alert("Import Failed!"),setTimeout(()=>{t(!1)},1e3)}))})}),a.current?.click()},children:[s&&(0,l.jsx)(c.A,{}),(0,l.jsx)("span",{className:"text-slate-400",children:"Do you have a JSON schema?"}),(0,l.jsx)(d.A,{}),(0,l.jsx)("span",{className:"",children:"Import JSON schema"})]})]})}},83556:(e,a,s)=>{s.a(e,async(e,l)=>{try{s.d(a,{A:()=>h});var t=s(8732),i=s(82015),n=s.n(i),r=s(73872),c=s(91140),d=s(55904),o=s(93213),u=s(6070),m=e([r]);function h({table:e,setTargetTable:a,database:s,confirmedDelegetedUser:l,query:i,icons:m,user:h}){let p=l?.delegated,x=l?.priviledges?.match(/Edit Tables/i),f=l?.priviledges?.match(/Delete Tables/i);l?.priviledges?.match(/Create Table/i);let{active_clone:b,active_clone_parent_db:j,remote_connected:g}=s;return(0,t.jsxs)("a",{href:`/admin/${h?.id}/databases/${s.db_slug}/tables/${e.table_slug}`,className:"card w-full items-center justify-between py-4"+(e?.child_table?" green":""),onClick:e=>{e.target.closest(".db-list-item-actions-block")&&e.preventDefault()},children:[(0,t.jsxs)("div",{className:"flex-wrap items-center flex",children:[(0,t.jsx)(o.A,{size:20,opacity:.3}),(0,t.jsx)("span",{className:"title",style:{fontSize:"16px"},children:e.table_name}),(0,t.jsxs)("span",{className:"text-sm text-slate-400",children:["Created: ",e.date_created?.substring(0,21)]})]}),(0,t.jsxs)("div",{className:"flex-wrap",children:[(0,t.jsx)("div",{className:"db-list-item-actions-block flex-wrap",children:(0,t.jsxs)(d.A,{children:[(0,t.jsx)(r.A,{slugText:e.table_slug||"",outlined:!0}),(!p||p&&x)&&!j&&!g&&(0,t.jsx)(n().Fragment,{children:(0,t.jsx)("div",{className:"button outlined light-gray small-text",onClick:a=>{window.location.pathname=`/admin/${h?.id}/databases/${s.db_slug}/tables/${e.table_slug}/edit-table`},children:(0,t.jsx)("span",{children:"Edit"})})}),!j&&!e.child_table&&(0,t.jsx)("div",{className:"button outlined light-gray small-text",onClick:a=>{window.location.href=`/admin/${h?.id}/databases/${s.db_slug}/tables/add-table?clone=true&clone_db=${s.db_slug}&clone_table=${e.table_slug}`},children:(0,t.jsx)("span",{children:"Clone"})}),(!p||p&&f)&&!j&&!g&&(0,t.jsx)("div",{className:"button outlined light-gray small-text",onClick:s=>{a(e),(0,c.PB)("delete-table-confirmation")},children:(0,t.jsx)("span",{children:"Delete"})})]})}),(0,t.jsx)(u.A,{className:"text-slate-600",size:20})]})]})}r=(m.then?(await m)():m)[0],l()}catch(e){l(e)}})},6803:(e,a,s)=>{s.a(e,async(e,l)=>{try{s.d(a,{A:()=>f});var t=s(8732),i=s(82015),n=s.n(i),r=s(83556),c=s(17208),d=s(7605),o=s(11717),u=s(62338),m=s(46512),h=s(96089),p=s(2833),x=e([r]);function f({database:e,tables:a,setTargetTable:s,confirmedDelegetedUser:l,query:i,user:x}){let f=l?.delegated;l?.priviledges?.match(/Edit Tables/i),l?.priviledges?.match(/Delete Tables/i);let b=l?.priviledges?.match(/Create Table/i),j=(!a||!a[0])&&!f||(!a||!a[0])&&!!f&&!!b,{active_clone:g,active_clone_parent_db:N,remote_connected:y}=e;return(0,t.jsx)(n().Fragment,{children:(0,t.jsxs)("div",{className:"w-full flex-col",children:[a&&a[0]&&a.map(a=>(0,t.jsx)(r.A,{table:a,setTargetTable:s,database:e,confirmedDelegetedUser:l,query:i,icons:{edit:(0,t.jsx)(o.A,{}),duplicate:(0,t.jsx)(u.A,{}),delete:(0,t.jsx)(m.A,{}),copy:(0,t.jsx)(h.A,{})},user:x},a.id)),j&&!N&&!y&&(0,t.jsx)(n().Fragment,{children:(0,t.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 items-stretch gap-6",children:[(0,t.jsxs)("a",{href:`/admin/${x?.id}/databases/${e.db_slug}/tables/add-table`,className:"button flex-col normal-weight outlined gray dashed border-dotted w-full p-8",children:[(0,t.jsx)("span",{className:"text-slate-400",children:"No Tables Created."}),(0,t.jsx)(p.A,{}),(0,t.jsx)("span",{className:"",children:"Add Table"})]}),(0,t.jsx)(c.A,{database:e}),(0,t.jsx)(d.A,{database:e})]})}),(!a||!a[0])&&f&&(0,t.jsx)("span",{className:"text-sm bg-slate-100 px-3 py-2 rounded w-full flex items-center justify-center text-slate-400",children:"Tables will show here once the owner of the database adds one"})]})})}r=(x.then?(await x)():x)[0],l()}catch(e){l(e)}})},537:(e,a,s)=>{s.d(a,{A:()=>t});var l=s(8732);function t({database:e,user:a}){let s=e.active_clone_parent_db?.replace(/datasquirel_user_\d+_/,""),t=`/admin/${a?.id}/databases/${s}`;return(0,l.jsx)("div",{className:"info green",children:(0,l.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:t,target:"_blank",className:"query-url",children:s})})]})})}s(82015)},91140:(e,a,s)=>{s.d(a,{Ay:()=>r,PB:()=>c,fs:()=>d});var l=s(8732),t=s(58150),i=s(82015),n=s.n(i);function r({children:e,title:a,data:s,fullPage:i,wrapperClasses:r,closePopupDispatch:c,wrapperStyle:o,noContainer:u}){return i?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(r||""),"data-popupid":a||null,style:o,children:[u?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":s?JSON.stringify(s):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{d(),c&&c()},children:(0,l.jsx)(t.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[u?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":s?JSON.stringify(s):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]})}function c(e,a){let s=document.querySelector(`[data-popupid='${e}']`);s&&(s.style.display="flex",a?.(s))}function d(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},55904:(e,a,s)=>{s.d(a,{A:()=>n});var l=s(8732),t=s(82015),i=s.n(t);function n({children:e,column:a,className:s}){let t=i().useRef();return(0,l.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:t,children:e})}},83921:(e,a,s)=>{s.d(a,{A:()=>l});async function l({inputFile:e}){try{let a=e.name.replace(/\..*/,""),s=await new Promise((a,s)=>{var l=new FileReader;l.readAsDataURL(e),l.onload=function(){a(l.result)},l.onerror=function(e){console.log("Error: ",e.message)}});return{fileBase64:s.replace(/.*?base64,/,""),fileBase64Full:s,fileName:a,fileSize:e.size,fileType:e.type}}catch(a){return console.log("Image Processing Error! =>",a.message),{fileBase64:null,fileBase64Full:null,fileName:e.name,fileSize:null,fileType:null}}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/3932.js b/dsql-app/.local_dist/server/chunks/3932.js deleted file mode 100644 index b28296b..0000000 --- a/dsql-app/.local_dist/server/chunks/3932.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=3932,exports.ids=[3932],exports.modules={30671:(e,s)=>{Object.defineProperty(s,"M",{enumerable:!0,get:function(){return function e(s,t){return t in s?s[t]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,t)):"function"==typeof s&&"default"===t?s:void 0}}})},93615:(e,s,t)=>{let{IncomingMessage:a}=t(81630),r=t(77463),l=t(6505);e.exports=async function(e){let{keyCookieName:s,csrfCookieName:t}=l(),a=`${s}_su`;if(!e.cookies?.[a])return console.log("No auth key cookie found"),null;let n=r({encryptedString:e.cookies[a]});if(!n)return console.log("No user payload found"),null;let i=JSON.parse(n);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},49888:(e,s,t)=>{t.d(s,{A:()=>b});var a=t(8732),r=t(82015),l=t.n(r),n=t(27912),i=t.n(n),c=t(93353),o=t(82544);let d=(0,o.A)("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);var h=t(25294);let x=(0,o.A)("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var u=t(2459);let p=(0,o.A)("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]),m=(0,o.A)("DatabaseBackup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]]),g=(0,o.A)("SquareChevronRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),j=(0,o.A)("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);function y(e){let[s,t]=l().useState(!0);return(0,a.jsxs)("aside",{className:"aside"+(s?" mobile-collapsed":" mobile-expanded"),style:{maxWidth:s?"250px":"300px",zIndex:800},children:[(0,a.jsx)(c.A,{adminAside:!0,collapseAsideMobile:s,setCollapseAsideMobile:t}),(0,a.jsx)("hr",{className:"opacity-0 mt-4"}),(0,a.jsxs)("div",{className:"main-links"+(s?" hidden lg:flex":" "),children:[(0,a.jsxs)("a",{href:"/su","data-currentlink":"/su","data-strictlink":"true",children:[(0,a.jsx)(d,{size:20}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)("a",{href:"/su/users","data-currentlink":"/su/users",children:[(0,a.jsx)(h.A,{size:20}),(0,a.jsx)("span",{children:"Users"})]}),(0,a.jsxs)("a",{href:"/su/error-logs","data-currentlink":"/su/error-logs",children:[(0,a.jsx)(x,{size:20}),(0,a.jsx)("span",{children:"Error Logs"})]}),(0,a.jsxs)("a",{href:"/su/servers","data-currentlink":"/su/servers",children:[(0,a.jsx)(u.A,{size:20}),(0,a.jsx)("span",{children:"Servers"})]}),(0,a.jsxs)("a",{href:"/su/load-balancing","data-currentlink":"/su/load-balancing",children:[(0,a.jsx)(p,{size:20}),(0,a.jsx)("span",{children:"Load Balancing"})]}),!1,(0,a.jsxs)("a",{href:"/su/backups","data-currentlink":"/su/backups",children:[(0,a.jsx)(m,{size:20}),(0,a.jsx)("span",{children:"Backups"})]}),(0,a.jsxs)("a",{href:"/su/console","data-currentlink":"/su/console",children:[(0,a.jsx)(g,{size:20}),(0,a.jsx)("span",{children:"Console"})]}),(0,a.jsxs)("a",{href:"/su/envar","data-currentlink":"/su/envar",children:[(0,a.jsx)(j,{size:20}),(0,a.jsx)("span",{children:"Env"})]})]})]})}var f=t(34254),v=t(58526);function k({user:e,extraHeaderContent:s}){let[t,r]=l().useState(e||null);return(0,a.jsx)("section",{className:"overflow-visible w-full px-0 md:px-8 py-0 flex justify-center bg-white dark:bg-slate-800 shadow-lg gap-4 dark:shadow-black/10 z-50 shadow-slate-900/5",style:{zIndex:700,border:"none"},children:(0,a.jsxs)("div",{className:"w-full items-center justify-between gap-4 md:gap-8",children:[(0,a.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 px-4 xl:px-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto bg-white xl:bg-transparent pb-10 xl:pb-0",id:"main-nav-content-wrapper",children:[(0,a.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,a.jsx)("a",{href:"/",className:"hidden xl:flex",children:(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,a.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{border:"none"},children:(0,a.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,a.jsx)("div",{className:"flex items-center w-full gap-6 grow flex-col xl:flex-row justify-start xl:justify-between",children:(0,a.jsx)("div",{className:"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2",children:(0,a.jsxs)("div",{className:"ml-auto dropdown-wrapper",children:[(0,a.jsx)("div",{className:"bg-white rounded-full overflow-hidden",style:{width:"36px",height:"36px"},children:(0,a.jsx)("img",{src:"/images/user-preset-thumbnail.png",alt:"User Image",width:35,className:"w-full h-full object-cover"})}),(0,a.jsx)("span",{children:(0,a.jsx)("b",{children:"Super User"})}),(0,a.jsx)(v.A,{size:20}),(0,a.jsx)("div",{className:"dropdown",children:(0,a.jsx)("a",{href:"/su/logout",children:"Logout"})})]})})})]}),(0,a.jsx)("div",{className:"ml-2",children:(0,a.jsx)(f.A,{})}),(0,a.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})}function b({children:e,head:s,user:t}){return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)(i(),{children:[(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin.css"}),s]}),(0,a.jsxs)("div",{className:"admin w-full flex items-start gap-0",children:[(0,a.jsx)(y,{}),(0,a.jsxs)("main",{className:"relative",children:[(0,a.jsx)(k,{user:t}),(0,a.jsx)("div",{className:"flex-col items-start gap-6 px-4 sl:px-8 py-8 bg-slate-50 dark:bg-slate-900",children:e}),(0,a.jsx)("footer",{className:"flex justify-center w-full items-center p-4",children:(0,a.jsxs)("div",{className:"max-w-6xl w-full justify-center flex-wrap",children:[(0,a.jsxs)("a",{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Datasquirel Logo",width:30}),(0,a.jsx)("span",{className:"text-lg font-bold",children:"Datasquirel"})]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600 text-center",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/docs",children:"Docs"}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/terms",children:"Terms"})]})})]})]})]})}t(54896)},2459:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},25294:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},6505:e=>{e.exports=function(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",r=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=s;e?.userId&&(n+=`user_${e.userId}_`),l&&(n+=`${l}_`),n+=t;let i=s;e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),i+=a;let c=s;return e?.userId&&(c+=`user_${e.userId}_`),l&&(c+=`${l}_`),{keyCookieName:n,csrfCookieName:i,oneTimeCodeName:c+=r}}},77463:(e,s,t)=>{let{scryptSync:a,createDecipheriv:r}=t(55511),{Buffer:l}=t(79428);e.exports=({encryptedString:e,encryptionKey:s,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=s||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=r("aes-192-cbc",a(n,i,c),l.alloc(16,0));try{let s=o.update(e,"hex","utf8");return s+=o.final("utf8")}catch(s){return console.log("Error in decrypting =>",s.message),e}}},49407:(e,s,t)=>{t.r(s),t.d(s,{default:()=>l});var a=t(8732);t(82015);var r=t(20883);function l(e){return(0,a.jsxs)(r.Html,{lang:"en",children:[(0,a.jsxs)(r.Head,{children:[(0,a.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,a.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,a.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,a.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,a.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,a.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,a.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,a.jsxs)("body",{children:[(0,a.jsx)(r.Main,{}),(0,a.jsx)(r.NextScript,{})]})]})}},9455:(e,s)=>{var t;Object.defineProperty(s,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/4050.js b/dsql-app/.local_dist/server/chunks/4050.js deleted file mode 100644 index ce1f38e..0000000 --- a/dsql-app/.local_dist/server/chunks/4050.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=4050,exports.ids=[4050],exports.modules={96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},47670:(e,t,r)=>{let s=r(72583),n=r(16570),a=r(33364);r(27825);let o=r(51348),c=r(21339),i=r(20503),l=r(44900);async function u({dbContext:e,paradigm:t,dbFullName:r,tableName:u,data:d,tableSchema:p,duplicateColumnName:_,duplicateColumnValue:S,update:g,encryptionKey:h,encryptionSalt:D,useLocal:f}){let E=!!f||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),y=f?l:E?o:c;if(d?.date_created_timestamp&&delete d.date_created_timestamp,d?.date_updated_timestamp&&delete d.date_updated_timestamp,d?.date_updated&&delete d.date_updated,d?.date_updated_code&&delete d.date_updated_code,d?.date_created&&delete d.date_created,d?.date_created_code&&delete d.date_created_code,_&&"string"==typeof _){let s=E?await y(`SELECT * FROM \`${u}\` WHERE \`${_}\`=?`,[S]):await y({paradigm:"Read Only",database:r,queryString:`SELECT * FROM \`${u}\` WHERE \`${_}\`=?`,queryValues:[S]});if(s?.[0]&&!g)return null;if(s&&s[0]&&g)return await a({dbContext:e,paradigm:t,dbFullName:r,tableName:u,data:d,tableSchema:p,encryptionKey:h,encryptionSalt:D,identifierColumnName:_,identifierValue:S||""})}let m=Object.keys(d),L=[],O=[];for(let e=0;ee.fieldName==t):null,o=a&&a[0]?a[0]:null;if(null==r||void 0==r||o?.dataType?.match(/int$/i)&&"string"==typeof r&&!r?.match(/./))continue;o?.encrypted&&(r=i({data:r,encryptionKey:h,encryptionSalt:D}),console.log("DSQL: Encrypted value =>",r));let c=/<[^>]+>/g;(o?.richText||String(r).match(c))&&(r=s(r,n)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),L.push("`"+t+"`"),"object"==typeof r&&(r=JSON.stringify(r)),"number"==typeof r?O.push(String(r)):O.push(r)}catch(e){console.log("DSQL: Error in parsing data keys =>",e.message);continue}d?.date_created||(L.push("`date_created`"),O.push(Date())),d?.date_created_code||(L.push("`date_created_code`"),O.push(Date.now())),d?.date_updated||(L.push("`date_updated`"),O.push(Date())),d?.date_updated_code||(L.push("`date_updated_code`"),O.push(Date.now()));let A=`INSERT INTO \`${u}\` (${L.join(",")}) VALUES (${O.map(()=>"?").join(",")})`;return E?await y(A,O):await y({paradigm:t,database:r,queryString:A,queryValues:O})}e.exports=u},33364:(e,t,r)=>{let s=r(72583),n=r(16570),a=r(51348),o=r(21339),c=r(20503),i=r(44900);async function l({dbContext:e,paradigm:t,dbFullName:r,tableName:l,data:u,tableSchema:d,identifierColumnName:p,identifierValue:_,encryptionKey:S,encryptionSalt:g,useLocal:h}){if(!u||!Object.keys(u).length)return null;let D=!!h||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),f=h?i:D?a:o,E=Object.keys(u),y=[],m=[];for(let e=0;ee.fieldName===t):null,o=a&&a[0]?a[0]:null;if(null==r||void 0==r)continue;let i=/<[^>]+>/g;(o?.richText||String(r).match(i))&&(r=s(r,n)),o?.encrypted&&(r=c({data:r,encryptionKey:S,encryptionSalt:g})),"object"==typeof r&&(r=JSON.stringify(r)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),y.push(`\`${t}\`=?`),"number"==typeof r?m.push(String(r)):m.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}y.push(`date_updated='${Date()}'`),y.push(`date_updated_code='${Date.now()}'`);let L=`UPDATE ${l} SET ${y.join(",")} WHERE \`${p}\`=?`;return m.push(_),D?await f(L,m):await f({paradigm:t,database:r,queryString:L,queryValues:m})}e.exports=l},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},20503:(e,t,r)=>{let{scryptSync:s,createCipheriv:n}=r(55511),{Buffer:a}=r(79428);e.exports=({data:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=t||process.env.DSQL_ENCRYPTION_PASSWORD,c=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=n("aes-192-cbc",s(o,c,i),a.alloc(16,0));try{let t=l.update(e,"utf8","hex");return t+=l.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},51348:(e,t,r)=>{let s=r(9973),n=r(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,t,r)=>{let s=r(29021);r(33873);let n=r(9973),a=r(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:t,queryString:r,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function p(e){o.end(),i({error:e.message,queryStringGenerated:r,queryValuesGenerated:c,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:a()}}),c&&Array.isArray(c)&&c[0]?o.query(r,c).then(d).catch(p):o.query(r).then(d).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,t,r)=>{let s=r(9973),n=r(21580);async function a(...e){let t=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,t,r)=>{let s=r(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!s.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,t,r)=>{e.exports=r(75600)}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/4312.js b/dsql-app/.local_dist/server/chunks/4312.js deleted file mode 100644 index 5a57193..0000000 --- a/dsql-app/.local_dist/server/chunks/4312.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=4312,exports.ids=[4312],exports.modules={84312:(e,s,t)=>{t.d(s,{A:()=>u});var l=t(8732),a=t(82015),n=t.n(a),i=t(63715),r=t(55158),d=t(32415),c=t(58403),o=t(51548);function u({targetUser:e,user:s,setTargetUser:a}){let u=t(49436);if(!e)return null;let[m,h]=n().useState(!0),[x,p]=n().useState([]),[b,f]=n().useState(!1),[g,j]=n().useState(e?e.user_priviledge?.split("|"):[]),[v,w]=n().useState(e?.database_access?e.database_access.split("|"):[]),[_,N]=n().useState(e?e.database_access?.split("|")[0]:null),[y,A]=n().useState([]),[k,S]=n().useState([]);return(0,l.jsxs)(r.Ay,{title:"target-user-popup",closePopupDispatch:()=>{a(null)},children:[m&&(0,l.jsx)(d.A,{position:"relative"}),!m&&e&&(0,l.jsx)(n().Fragment,{children:(0,l.jsxs)("div",{className:"flex-col w-full items-start p-4",children:[(0,l.jsxs)("h4",{className:"m-0",children:["Edit ",e.first_name," ",e.last_name,"'s Access"]}),(0,l.jsx)("hr",{}),(0,l.jsxs)("form",{className:"flex flex-col items-start w-full",onSubmit:s=>{s.preventDefault(),h(!0),(0,i.A)("/api/updateAdminUserAccess",{method:"post",body:{userObject:e,user_priviledge:g.join("|"),database_access:v?.join("|"),db_tables:v&&v[0]?k.join("|"):"",inv_user_id:e.invited_user_id}},!0).then(e=>{window.location.reload(),setTimeout(()=>{h(!1)},500)})},children:[(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"User Priviledges"}),(0,l.jsx)(c.A,{checkBoxValues:u.map(e=>({title:e,name:e,default:!!g.includes(e),onChangeHandler:s=>{g.includes(e)?j([...g.filter(s=>s!=e)]):j(s=>[...s,e])}})),smallText:!0,flexRow:!0}),(0,l.jsx)("hr",{className:"my-6"}),(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-2 text-slate-600",children:"Databases Access"}),(0,l.jsx)("span",{className:"button outlined gray px-4 py-1 -mt-1 mb-1.5",onClick:e=>{b?(x.forEach(e=>{setTimeout(()=>{let s=document.getElementById(e.db_slug);s?.checked&&s.click()},200)}),f(!1)):(x.forEach(e=>{setTimeout(()=>{let s=document.getElementById(e.db_slug);s.checked||s.click()},200)}),f(!0))},children:b?"Deselect All":"Select All"}),(0,l.jsx)(c.A,{checkBoxValues:x.map(e=>({title:e.db_name,name:e.db_slug,onChangeHandler:s=>{v.includes(e.db_slug)?w([...v.filter(s=>s!=e.db_slug)]):w(s=>[...s,e.db_slug]),v.length===x.length?f(!0):f(!1)},default:!!v.includes(e.db_slug)})),smallText:!0,flexRow:!0}),v&&v[0]&&(0,l.jsxs)(n().Fragment,{children:[(0,l.jsx)("hr",{className:"my-6"}),(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-2 text-slate-600",children:"Database Tables"}),(0,l.jsx)(o.A,{required:!0,selectOptions:x.filter(e=>v.includes(e.db_slug)).map(e=>({title:e.db_name,payload:e.db_slug})),name:"databases",onChangeHandler:e=>{N(e.target.value)}}),(0,l.jsx)("div",{className:"h-2"}),y&&y[0]&&(0,l.jsx)(c.A,{checkBoxValues:y.map(e=>({title:e.table_name,name:e.table_slug,onChangeHandler:s=>{k.includes(`${_}-${e.table_slug}`)?S([...k.filter(s=>s!=`${_}-${e.table_slug}`)]):S(s=>[...s,`${_}-${e.table_slug}`])},default:!!k.includes(`${_}-${e.table_slug}`)})),smallText:!0,flexRow:!0})]}),(0,l.jsx)("button",{className:"mt-4 w-full",children:"Update User Access"})]})]})})]})}},58403:(e,s,t)=>{t.d(s,{A:()=>a});var l=t(8732);function a({name:e,checkBoxValues:s,setAlert:t,labelColor:a,flexRow:n,baseText:i,smallText:r,className:d}){return(0,l.jsx)("div",{className:"flex items-start gap-x-4"+(n?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(d||""),children:s.map((s,n)=>{let{payload:d,title:c,onChangeHandler:o,fixed:u,jsx:m}=s,h=s.name?`${e}-${s.name}`:d?e+"-"+d:e;return(0,l.jsxs)("div",{className:"flex items-center"+(s.default&&u?" pointer-events-none":"")+(r?" gap-1 ":" gap-2 ")+(s?.className?s.className:""),children:[(0,l.jsx)("input",{className:"m-0"+(r?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!s.default,name:h,id:h,onChange:e=>{t&&t(null),o&&o(e,s)},value:d,style:{minWidth:"20px"},...s.props}),m||(0,l.jsx)("label",{htmlFor:h,className:"m-0 "+(a||"text-slate-800 dark:text-white/80")+(i||r?" text-base":" text-lg"),children:c})]},n+1)})})}t(82015)},51548:(e,s,t)=>{t.d(s,{A:()=>n});var l=t(8732),a=t(58526);function n({selectOptions:e,name:s,onChangeHandler:t,required:n,setAlert:i,title:r,defaultValue:d,info:c,id:o}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let s=e.target.closest(".info-wrapper"),t=s.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!t.classList.contains("hidden")){t.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&t.classList.contains("hidden"))){if(!s){t.classList.add("hidden");return}if(t.classList.contains("hidden")){t.classList.remove("hidden");return}t.classList.add("hidden")}}return(0,l.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[r&&(0,l.jsxs)("label",{htmlFor:s,children:[r,n?"":" (optional)"]}),(0,l.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,l.jsx)("select",{name:s,id:o||s,className:"w-full bg-white",required:n,onChange:e=>{i&&i(null),e.target.classList.remove("warning"),t&&t(e)},defaultValue:d||void 0,children:e.map((e,s)=>{let{payload:t,title:a}=e;return(0,l.jsx)("option",{value:t,selected:!!e.default,children:a},s+1)})}),(0,l.jsx)(a.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,l.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,l.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,l.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,l.jsx)("span",{children:c})}),(0,l.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,l.jsx)("div",{children:"Form Select Error"})}}t(82015)},49436:e=>{e.exports=JSON.parse('["Edit Tables","Update Entries","Create Table","Delete Entries","Delete Tables"]')}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/4333.js b/dsql-app/.local_dist/server/chunks/4333.js deleted file mode 100644 index fbf9806..0000000 --- a/dsql-app/.local_dist/server/chunks/4333.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=4333,exports.ids=[4333],exports.modules={62506:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(8732),l=t(82015),c=t.n(l);function i({children:e,column:s,className:t}){let l=c().useRef();return(0,a.jsx)("div",{className:"items-stretch gap-0"+(s?" flex-col":" flex-wrap xl:flex-nowrap")+(t?" "+t:""),ref:l,children:e})}},59200:(e,s,t)=>{t.d(s,{A:()=>u});var a=t(8732),l=t(82015),c=t.n(l),i=t(63715),r=t(32415),n=t(82544);let o=(0,n.A)("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]),d=(0,n.A)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);function p({docPageObject:e}){let[s,t]=c().useState(!1),[l,n]=c().useState([]);return(0,a.jsxs)("div",{className:"card col relative cursor-pointer",onClick:s=>{s.target?.closest(".cancel-link")?s.preventDefault():window.location.pathname=`/su/docs/pages/${e.id}`},children:[s&&(0,a.jsx)(r.A,{width:"20px"}),(0,a.jsxs)("div",{className:"w-full items-start",children:[(0,a.jsx)(o,{}),(0,a.jsxs)("div",{className:"flex-col items-start gap-0 relative z-10",children:[(0,a.jsx)("span",{className:"title",children:e.title}),(0,a.jsx)("span",{className:"-my-3",dangerouslySetInnerHTML:{__html:e.description||""}})]}),(0,a.jsxs)("div",{className:"ml-auto cancel-link",children:[(0,a.jsx)("button",{onClick:()=>{window.location.href=`/su/docs/edit-page?id=${e.id}`},className:"outlined small-text light-gray",children:"Edit Page"}),(0,a.jsx)("button",{onClick:()=>{window.confirm("Delete this page?")&&(t(!0),(0,i.A)("/api/admin/docs/delete-page",{method:"post",body:e}).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{t(!1)},1e3)}))},className:"outlined small-text light-gray",children:"Delete Page"})]})]}),l&&(0,a.jsxs)("div",{className:"-mt-[40px] pt-[40px] ml-[10px] pl-[20px] border-0 border-l border-slate-200 border-solid w-full flex-col items-start cancel-link",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d,{}),(0,a.jsx)("span",{className:"text-slate-300 font-semibold",children:"Children Pages"})]}),l.map((e,s)=>(0,a.jsxs)("div",{className:"card w-full",onClick:()=>{window.location.pathname=`/su/docs/pages/${e.id}`},children:[(0,a.jsx)(o,{}),(0,a.jsx)("span",{children:e.title})]},s))]})]})}var m=t(62506);function u({data:e}){let{env:s}=e,t=e.docPages,[l,n]=c().useState(!1);function o(e){window.confirm(e?"Update Docs DB from JSON file?":"Update docs json file?")&&(n(!0),(0,i.A)("/api/admin/docs/persist",{method:"post",body:{pull:e}}).then(s=>{s.success?window.alert(e?"Docs database table Updated Sucessfully!":"JSON data written Successfully!"):window.alert("Operation failed!"),setTimeout(()=>{n(!1)},1e3)}).catch(e=>{setTimeout(()=>{n(!1)},1e3)}))}return(0,a.jsxs)(c().Fragment,{children:[l&&(0,a.jsx)(r.A,{}),(0,a.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full mb-6",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Documentation Pages"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("a",{href:"/su/docs/create-page",className:"button",children:"Create Page"}),(0,a.jsxs)(m.A,{children:[(0,a.jsx)("button",{className:"outlined gray",onClick:()=>{o(!1)},children:"Push"}),(0,a.jsx)("button",{className:"outlined gray",onClick:()=>{o(!0)},children:"Pull"})]})]})]}),(0,a.jsx)("div",{className:"paper flex-col items-stretch gap-10 w-full",children:t.map((e,s)=>(0,a.jsx)(p,{docPageObject:e},s))})]})]})}},67216:(e,s,t)=>{let a=t(9973),l=t(31976),c=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:l()}});async function i(...e){try{let s=await c.query(...e);return await c.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},31976:(e,s,t)=>{let a=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let s=`${e}/ca-cert.pem`;if(!a.existsSync(s)){console.log(`${s} does not exist`);return}return{ca:a.readFileSync(`${e}/ca-cert.pem`)}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/4385.js b/dsql-app/.local_dist/server/chunks/4385.js deleted file mode 100644 index 8f2c21f..0000000 --- a/dsql-app/.local_dist/server/chunks/4385.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict";exports.id=4385,exports.ids=[4385],exports.modules={14385:(e,a,t)=>{let s=t(29021),r=t(59474),i=t(33873),l=t(5194),n=t(57638),o=t(20503),d=t(47670),u=t(86041);e.exports=async function({database:e,social_id:a,email:t,social_platform:c,payload:_,invitation:m,supEmail:p,additionalFields:E,useLocal:g}){try{let S=[a.toString(),c],y=await n({database:e||"datasquirel",queryString:"SELECT * FROM users WHERE social_id = ? AND social_login='1' AND social_platform = ? ",queryValuesArray:S,useLocal:g});if(y&&y[0])return await u({user:y[0],social_platform:c,invitation:m,database:e,additionalFields:E,useLocal:g});let f=t||p||null;if(!f)return{success:!1,payload:null,msg:"No Email Present"};let D=`SELECT * FROM users WHERE email='${f}'`,b=await n({database:e||"datasquirel",queryString:D,useLocal:g});if(b&&b[0])return{success:!1,payload:null,msg:"This Email is already taken"};let h=[f,c,a],R=await n({database:e||"datasquirel",queryString:"SELECT * FROM users WHERE email=? AND social_login='1' AND social_platform=? AND social_id=?",queryValuesArray:h,useLocal:g});if(R&&R[0])return await u({user:_,social_platform:c,invitation:m,database:e,additionalFields:E,useLocal:g});let A=o({data:a.toString()}),v={social_login:"1",verification_status:p?"0":"1",password:A};Object.keys(_).forEach(e=>{v[e]=_[e]});let N=await d({dbContext:e?"Dsql User":void 0,paradigm:e?"Full Access":void 0,dbFullName:e||"datasquirel",tableName:"users",duplicateColumnName:"email",duplicateColumnValue:f,data:{...v,email:f},useLocal:g});if(!N?.insertId)return console.log("Social User Failed to insert in 'handleSocialDb.js' backend function =>",N),{success:!1,payload:null,msg:"Social User Failed to insert in 'handleSocialDb.js' backend function"};{e||await l({userId:N.insertId,useLocal:g});let a=`SELECT * FROM users WHERE id='${N.insertId}'`,t=await n({database:e||"datasquirel",queryString:a,useLocal:g});if(!t||!t[0])return{success:!1,payload:null,msg:"User Insertion Failed!"};if(p&&e?.match(/^datasquirel$/)){let e=o({data:JSON.stringify({id:N.insertId,email:p,dateCode:Date.now()})});r({to:p,subject:"Verify Email Address",text:"Please click the link to verify your email address",html:s.readFileSync("./email/send-email-verification-link.html","utf8").replace(/{{host}}/,process.env.DSQL_HOST||"").replace(/{{token}}/,e||"")}).then(e=>{})}let d=process.env.DSQL_STATIC_SERVER_DIR;if(!d)return console.log("Static File ENV not Found!"),{success:!1,payload:null,msg:"Static File ENV not Found!"};if(!e||e?.match(/^datasquirel$/)){let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${N.insertId}`,a=i.join(d,`images/user-images/user-${N.insertId}`);s.mkdirSync(e),s.mkdirSync(a),s.writeFileSync(`${e}/main.json`,JSON.stringify([]),"utf8")}return await u({user:t[0],social_platform:c,invitation:m,database:e,additionalFields:E,useLocal:g})}}catch(e){return console.log("ERROR in 'handleSocialDb.js' backend function =>",e.message),{success:!1,payload:null,msg:e.message}}}},86041:(e,a,t)=>{let s=t(44767),{ServerResponse:r}=t(81630),i=t(57638);async function l({user:e,social_platform:a,invitation:t,database:r,additionalFields:l,useLocal:n}){let o=[e.email,e.social_id,a],d=await i({database:r||"datasquirel",queryString:"SELECT * FROM users WHERE email=? AND social_id=? AND social_platform=?",queryValuesArray:o,useLocal:n});if(!d?.[0])return{success:!1,payload:null};let u=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),c={id:d[0].id,first_name:d[0].first_name,last_name:d[0].last_name,username:d[0].username,user_type:d[0].user_type,email:d[0].email,social_id:d[0].social_id,image:d[0].image,image_thumbnail:d[0].image_thumbnail,verification_status:d[0].verification_status,social_login:d[0].social_login,social_platform:d[0].social_platform,csrf_k:u,logged_in_status:!0,date:Date.now()};return l?.[0]&&l.forEach(e=>{c[e]=d[0][e]}),t&&(!r||r?.match(/^datasquirel$/))&&s({query:t,user:c,useLocal:n}),{success:!0,payload:c,csrf:u}}t(20503),t(31341),e.exports=l},44767:(e,a,t)=>{let s=t(48225),r=t(51348),i=t(47670),l=t(44900);e.exports=async function({query:e,user:a,useLocal:t}){try{let s=t?l:r,{invite:n,database_access:o,priviledge:d,email:u}=e,c=[n,u],_=await s("SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",c);if(!_||!_[0])throw Error("No Invitation Found");let m=[n],p=await s("SELECT first_name,last_name,email FROM users WHERE id=?",m);if(p?.[0]){let e=await s("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[n,a.id,u]);if(e?.[0])console.log("User already added");else{i({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:n,invited_user_id:a.id,database_access:o,first_name:a.first_name,last_name:a.last_name,phone:a.phone,email:a.email,username:a.username,user_type:"admin",user_priviledge:d,image:a.image,image_thumbnail:a.image_thumbnail},useLocal:t});let e=await s("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[n,u]);if(await s("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[n,a.id]),e&&e[0]){let s=e[0].db_tables_data.split("|");for(let e=0;e{let s=t(47795),r=t(51348),i=t(45356),l=t(47670),n=t(20503),o=t(44900);e.exports=async function({userId:e,useLocal:a}){try{let t=process.env.DSQL_DB_HOST||"127.0.0.1",d=`dsql_user_${e}`,u=s.generate({length:16,numbers:!0,symbols:!0,uppercase:!0,exclude:"*#.'`\""}),c=n({data:u}),_=`CREATE USER IF NOT EXISTS '${d}'@'127.0.0.1' IDENTIFIED BY '${u}'`;a?await o(_):await i(_);let m="UPDATE users SET mariadb_user = ?, mariadb_host = '127.0.0.1', mariadb_pass = ? WHERE id = ?",p=[d,c,e];a?await o(m,p):await r(m,p),await l({tableName:"mariadb_users",data:{user_id:e,username:d,host:t,password:c,primary:"1",grants:'[{"database":"*","table":"*","privileges":["ALL"]}]'},dbContext:"Master",useLocal:a}),console.log(`User ${e} SQL credentials successfully added.`)}catch(e){console.log("Error in adding SQL user in 'addMariadbUser' function =>",e.message)}}},31341:e=>{e.exports=function(e){let a=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",r=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=a;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=t;let n=a;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=s;let o=a;return e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),{keyCookieName:l,csrfCookieName:n,oneTimeCodeName:o+=r}}},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},59474:(e,a,t)=>{let s=t(29021),r=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:a,text:t,html:i,alias:l}){let n;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let o=(l?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!s.existsSync("./email/index.html"))return;let d=s.readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,i||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"Datasquirel" <${o}>`,s.sender=o,l&&(s["replyTo "]=o),s.to=e,s.subject=a,s.text=t,s.html=d,n=await r.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return n}},6061:(e,a,t)=>{let s=t(72835),r=t(30003);e.exports=async function({unparsedResults:e,tableSchema:a}){let t=[];try{for(let i=0;i",a.message),e}}},48225:(e,a,t)=>{let s=t(29021),{IncomingMessage:r}=t(81630);e.exports=async function({user:e,message:a,component:t,noMail:r,req:i}){let l=new Date,n=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],a=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],r=t||s||a||i.socket.remoteAddress;if(!r)return null;return String(r)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== -Error Message: ${a} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(r+=` -URL: ${i.url}`),i?.body&&(r+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),n&&(r+=` -IP: ${n}`),r+=` -Date: ${l.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let o=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",r),s.appendFileSync("./.tmp/error.log",` - - - - -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,a,t)=>{t(29021);let s=t(6061),r=t(48225),i=t(51348),l=t(21339),n=t(44900);e.exports=async function({queryString:e,queryValuesArray:a,database:t,tableSchema:o,useLocal:d}){let u;let c=!!d||!!t?.match(/^datasquirel$/),_=d?n:c?i:l;try{u=e&&a&&Array.isArray(a)&&a[0]?c?await _(e,a):await _({paradigm:"Full Access",database:t,queryString:e,queryValues:a}):c?await _(e):await _({paradigm:"Full Access",database:t,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&o)try{let e=u;return await s({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,a,t)=>{let{scryptSync:s,createDecipheriv:r}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:a,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=a||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=r("aes-192-cbc",s(l,n,o),i.alloc(16,0));try{let a=d.update(e,"hex","utf8");return a+=d.final("utf8")}catch(a){return console.log("Error in decrypting =>",a.message),e}}},45356:(e,a,t)=>{let s=t(9973),r=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,charset:"utf8mb4",ssl:r()}});e.exports=function(...e){try{return new Promise((a,t)=>{i.query(...e).then(e=>{i.end(),a(JSON.parse(JSON.stringify(e)))}).catch(e=>{i.end(),a({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/45.js b/dsql-app/.local_dist/server/chunks/45.js deleted file mode 100644 index ef37a1f..0000000 --- a/dsql-app/.local_dist/server/chunks/45.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=45,exports.ids=[45],exports.modules={64535:(e,a,s)=>{s.d(a,{A:()=>t});var l=s(8732);function t({message:e}){return(0,l.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,l.jsx)("span",{children:e})]})}s(82015)},70045:(e,a,s)=>{let l;s.d(a,{A:()=>u});var t=s(8732),r=s(82015),n=s.n(r),i=s(63715);async function o({e,setLoading:a,user:s,image:l,query:t}){a(!0);let r={first_name:e.target.first_name.value,last_name:e.target.last_name.value,email:s?null:e.target.email_address.value,username:s?null:e.target.username.value,password:s?null:e.target.password.value,image:l||null};t?.invite&&(r.inviteObject=t),(0,i.A)(s?"/api/updateUser":"/api/registerUser",{method:"post",body:r},!!s).then(e=>{console.log(e),!s&&e?.insertId?(localStorage.setItem("id",e.insertId),(0,i.A)("/api/loginUser",{method:"post",body:{email:r.email,password:r.password}}).then(e=>{console.log(e),localStorage.setItem("csrf",e.user.csrf_k),localStorage.setItem("stripe_id",e.user.stripe_id),localStorage.setItem("user",JSON.stringify(e.userPayload)),window.location.href="/admin"})):s&&e?.user?window.location.reload():e?.msg&&alert(e.msg)}).catch(e=>{console.log(e)}).finally(()=>{setTimeout(()=>{a(!1)},2e3)})}var d=s(64535),m=s(32415),c=s(72414);function u({user:e,query:a,image:s}){let r=a?.email?a.email:e?.email?e.email:"",[u,p]=n().useState(null),[x,g]=n().useState(!1);return(0,t.jsxs)("div",{className:"relative w-full max-w-2xl flex-col items-start",children:[x&&(0,t.jsx)(m.A,{}),!e&&(0,t.jsxs)(n().Fragment,{children:[(0,t.jsx)("hr",{className:"opacity-0"}),(0,t.jsx)(c.A,{user:null,userType:"admin",setLoading:g}),(0,t.jsxs)("div",{className:"w-full justify-center relative",children:[(0,t.jsx)("span",{className:"bg-white dark:bg-slate-800 px-3 relative z-10",children:"OR"}),(0,t.jsx)("hr",{className:"absolute"})]})]}),(0,t.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:l=>{l.preventDefault(),o({e:l,setLoading:g,user:e,image:s,query:a})},children:[u&&(0,t.jsx)(d.A,{message:u}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"first_name",children:"First Name"}),(0,t.jsx)("input",{type:"text",name:"first_name",id:"first_name",placeholder:"First Name",autoComplete:"given-name",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),p(null)):a.classList.add("warning")},defaultValue:e?e.first_name:"",required:!0})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"last_name",children:"Last Name"}),(0,t.jsx)("input",{type:"text",name:"last_name",id:"last_name",placeholder:"Last Name",autoComplete:"family-name",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),p(null)):a.classList.add("warning")},defaultValue:e?e.last_name:"",required:!0})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"username",children:"Username"}),(0,t.jsx)("input",{type:"text",name:"username",id:"username",placeholder:"Username",autoComplete:"username",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),p(null)):a.classList.add("warning"),window.clearTimeout(l),l=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=username&value=${a.value}&tableName=users`).then(e=>{console.log(e),e?.result?(p("Username Already Exists"),a.classList.add("warning")):(p(null),a.classList.remove("warning"))})},300)},defaultValue:e?e.username:"",required:!e,readOnly:!!e})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"email_address",children:"Email Address"}),(0,t.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",onInput:e=>{let a=e.target;window.clearTimeout(l),l=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=email&value=${a.value}&tableName=users`).then(e=>{console.log(e),e?.result?(p("Email Already Exists"),a.classList.add("warning")):(p(null),a.classList.remove("warning"))})},300)},defaultValue:r,required:!0,readOnly:!!e})]}),!e&&(0,t.jsxs)(n().Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"password",children:"Password"}),(0,t.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password",required:!0})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"confirm_password",children:"Confirm Password"}),(0,t.jsx)("input",{type:"password",name:"confirm_password",id:"confirm_password",placeholder:"Confirm Password",onInput:e=>{let a=e.target;a.closest("form")?.password.value===a.value?a.classList.remove("warning"):a.classList.add("warning")},required:!0})]}),(0,t.jsxs)("span",{className:"text-sm",children:['By clicking "Create Account" you agree to our'," ",(0,t.jsx)("a",{href:"/terms",target:"_blank",className:"font-bold",children:"Terms and Conditions"})]})]}),(0,t.jsx)("button",{type:"submit",className:"w-full",children:e?(0,t.jsx)("span",{children:"Update Account Info"}):(0,t.jsx)("span",{children:"Create Account"})}),!e&&(0,t.jsx)(n().Fragment,{children:(0,t.jsxs)("span",{className:"text-sm",children:["Already Have an Account?"," ",(0,t.jsx)("a",{href:"/login",className:"font-bold",children:"Login"})]})})]})]})}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/4627.js b/dsql-app/.local_dist/server/chunks/4627.js new file mode 100644 index 0000000..cb72f3f --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/4627.js @@ -0,0 +1 @@ +"use strict";exports.id=4627,exports.ids=[4627],exports.modules={23180:(e,t,a)=>{a.d(t,{A:()=>b});var l=a(8732),i=a(82015),s=a.n(i),d=a(42960),n=a(46169),r=a(72390),c=a(51339),o=a(16757),p=a(6748),u=a(27825),m=a.n(u),f=a(60424),h=a(95939),x=a(41836);function y({user:e,table:t,entry:a,url:i,query:d}){let[n,r]=s().useState(!1),c=s().useRef(null);return(0,l.jsx)("div",{className:"relative z-[1000]",children:(0,l.jsx)(x.Popover,{isOpen:n,onClickOutside:()=>r(!1),containerClassName:"z-[1000]",positions:["bottom"],align:"end",content:(0,l.jsx)("div",{className:"bg-white dark:bg-slate-900 rounded shadow-md cancel-link",children:(0,l.jsxs)("div",{className:"flex-col min-w-[200px] items-stretch gap-0",children:[(0,l.jsx)("button",{className:"plain-text justify-start py-3",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(a)).then(()=>{window.alert("Post Copied"),r(!1)})},children:"Copy Object"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("button",{className:"plain-text justify-start py-3",onClick:()=>{let a=(0,f.A)({paradigm:"JavaScript",table:t,query:d,user:e});navigator.clipboard.writeText(a||"").then(()=>{window.alert("JavaScript Type Definition Copied"),r(!1)})},children:"Copy JS Type Definition"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("button",{className:"plain-text justify-start py-3",onClick:()=>{let a=(0,f.A)({paradigm:"TypeScript",table:t,query:d,user:e});navigator.clipboard.writeText(a||"").then(()=>{window.alert("TypeScript Type Definition Copied"),r(!1)})},children:"Copy TS Type Definition"}),(0,l.jsx)("hr",{className:"m-0"}),(0,l.jsx)("a",{href:i,className:"button plain-text justify-start py-3",children:(0,l.jsx)("span",{children:"View Entry"})})]})}),children:(0,l.jsx)("button",{onClick:()=>{r(!n)},ref:c,className:"ghost p-2",children:(0,l.jsx)(h.A,{})})})})}function b({user:e,database:t,table:a,dbSchemaData:i,richTextEditors:u,jsonTextEditors:f,dataTypes:h,entry:x,entryPage:b,confirmedDelegetedUser:N,query:g}){let w=a.fields.filter(e=>e.fieldName&&!e.fieldName.match(d.A)),j=a.fields.find(e=>"uuid"===e.fieldName),v=N?.delegated;N?.priviledges?.match(/Edit Tables/i),N?.priviledges?.match(/Delete Tables/i),N?.priviledges?.match(/Create Tables/i),N?.priviledges?.match(/Edit Entries/i);let T=N?.priviledges?.match(/Delete Entries/i);j&&w.unshift({dataType:"UUID",fieldName:"uuid",defaultField:!0}),w.unshift({dataType:"BIGINT",fieldName:"id",defaultField:!0}),w.push({dataType:"VARCHAR(250)",fieldName:"date_created",defaultField:!0}),w.push({dataType:"BIGINT",fieldName:"date_created_code",defaultField:!0}),w.push({dataType:"TIMESTAMP",fieldName:"date_created_timestamp",defaultField:!0}),w.push({dataType:"VARCHAR(250)",fieldName:"date_updated",defaultField:!0}),w.push({dataType:"BIGINT",fieldName:"date_updated_code",defaultField:!0}),w.push({dataType:"TIMESTAMP",fieldName:"date_updated_timestamp",defaultField:!0});let[_,E]=s().useState(!1),[S,C]=s().useState(!0),[k,A]=s().useState(x),[F,I]=s().useState(!1);s().useRef(null);let D=s().useRef([]),[$,R]=s().useState(`/admin/${e?.id}/databases/${t.db_slug}/tables/${a.tableName}/entries/${k.id}`),L=`${t.db_slug}-${a.tableName}-${k.id}-submit-button`;return(0,l.jsxs)("div",{className:"card col w-full overflow-hidden",children:[(0,l.jsx)("a",{href:$,onClick:e=>{let t=e.target;(t.closest(".cancel-link")||t.closest(".MuiPopover-root"))&&e.preventDefault()},className:"w-full",children:(0,l.jsxs)("div",{className:"w-full bg-slate-700 text-white py-2 px-4 rounded justify-between flex-wrap hover:bg-slate-800 cursor-pointer relative z-[1000] ",onClick:e=>{let t=e.target;t.closest(".cancel-link")||t.closest(".MuiPopover-root")||(e.ctrlKey?window.open($,"__blank"):window.location.href=$)},children:[(0,l.jsxs)("span",{children:["Entry #",k.id]}),(0,l.jsxs)("div",{className:"flex-wrap cancel-link",children:[(!v||v&&T)&&(0,l.jsx)("span",{className:"text-slate-300 hover:text-fuchsia-200 cursor-pointer"+(_?" pointer-events-none opacity-40":""),onClick:e=>{window.confirm(`Delete Entry #${k.id}?`)&&(E(!0),(0,n.A)("/api/deleteTableEntry"+window.location.search,{method:"post",body:{dbFullName:t.db_full_name,tableName:a.tableName,entryId:k.id,dbSlug:t.db_slug,dbId:t.id,delegated:g?.delegated,confirmedDelegetedUser:N}},!0).then(e=>{e.success?(0,r.A)().then(()=>{window.location.reload()}):(window.alert(e.msg),setTimeout(()=>{E(!1)},500))}))},children:"Delete Entry"}),!b&&(0,l.jsxs)(s().Fragment,{children:[(0,l.jsx)("span",{className:"opacity-20",children:"|"}),(0,l.jsx)("span",{className:"text-slate-300 hover:text-fuchsia-200 cursor-pointer",onClick:e=>{S?C(!1):C(!0)},children:S?(0,l.jsx)("span",{children:"Expand"}):(0,l.jsx)("span",{children:"Collapse"})})]}),(0,l.jsx)("span",{className:"opacity-20",children:"|"}),(0,l.jsx)("div",{className:"button ghost px-0",onClick:l=>{let i=m().cloneDeep(x);delete i.date_created,delete i.date_created_code,delete i.date_created_timestamp,delete i.date_updated,delete i.date_updated_code,delete i.date_updated_timestamp,delete i.id,delete i.uuid,localStorage.setItem("duplicate_entry",JSON.stringify(i)),window.location.href=`/admin/${e?.id}/databases/${t.db_slug}/tables/${a.tableName}/entries/add-entry?duplicate=true&id=${x.id}`},children:(0,l.jsx)("span",{className:"text-slate-300",children:"Duplicate"})}),(0,l.jsx)("span",{className:"opacity-20",children:"|"}),(0,l.jsx)(y,{table:a,user:e,entry:x,query:g,url:$})]})]})}),(0,l.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-8 minimal-scrollbars relative",style:b?{}:{maxHeight:S?"300px":"none",paddingTop:"10px",paddingBottom:"10px",overflow:"hidden"},onSubmit:e=>{e.preventDefault(),E(!0);let l={},i=e.target;w.forEach(e=>{if(!e.fieldName||!i[e.fieldName])return;let t="string"!=typeof i[e.fieldName].value,a="number"!=typeof i[e.fieldName].value;(t||a||i[e.fieldName].value)&&(i[e.fieldName]?.dataset.default||(l[e.fieldName]=i[e.fieldName].value))}),D.current[0]&&D.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(l[e.fieldName]=e.ref.current.getContent())}),f.current[0]&&f.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(l[e.fieldName]=e.ref.current.getValue())}),(0,n.A)("/api/updateTableEntry",{method:"post",body:{dbFullName:t.db_full_name,dbSlug:t.db_slug,dbId:t.id,tableName:a.tableName,entryId:k.id,payload:l,tableSchema:a,delegated:g?.delegated,confirmedDelegetedUser:N}},!0).then(e=>{e.success?(0,n.A)("/api/refreshEntry",{method:"POST",body:{table:a.tableName,db:t.db_full_name,id:k.id,schema:JSON.stringify(a)}}).then(e=>{e.success&&(A(e.entry),setTimeout(()=>{E(!1)},500))}):(window.alert(e.msg+"\n"+(e.err||"")),setTimeout(()=>{E(!1)},500))})},onKeyUp:e=>{e.ctrlKey&&"Enter"==e.key&&window.confirm("Update this Form?")&&document.getElementById(L)?.click()},children:[_&&(0,l.jsx)(o.A,{}),(S&&!b?w.slice(0,3):w).map((e,t)=>{let a=h.filter(t=>t.name===e.dataType?.replace(/\d|\(|\)/g,""));return(0,l.jsx)(p.A,{fieldObject:e,dataTypeSchema:a[0],richTextEditors:u,currentRichTextEditorForms:D,entry:k,query:g,entryPage:b,confirmedDelegetedUser:N,jsonTextEditors:f,formButtonId:L},t+1)}),(0,l.jsx)("button",{type:"submit",className:_?" pointer-events-none opacity-40":"",id:L,children:"Update Entry"})]}),!b&&(0,l.jsx)(c.A,{collapse:S,setCollapse:C})]})}},80830:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(8732),i=a(58526);function s({selectOptions:e,name:t,onChangeHandler:a,required:s,setAlert:d,title:n,defaultValue:r,info:c,id:o}){try{function p(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,l.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[n&&(0,l.jsxs)("label",{htmlFor:t,children:[n,s?"":" (optional)"]}),(0,l.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,l.jsx)("select",{name:t,id:o||t,className:"w-full bg-white",required:s,onChange:e=>{d&&d(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:r||void 0,children:e.map((e,t)=>{let{payload:a,title:i}=e;return(0,l.jsx)("option",{value:a,selected:!!e.default,children:i},t+1)})}),(0,l.jsx)(i.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,l.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:p,onMouseLeave:p,onClick:p,children:[(0,l.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,l.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,l.jsx)("span",{children:c})}),(0,l.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,l.jsx)("div",{children:"Form Select Error"})}}a(82015)},95939:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5212.js b/dsql-app/.local_dist/server/chunks/5212.js deleted file mode 100644 index 4e248fd..0000000 --- a/dsql-app/.local_dist/server/chunks/5212.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=5212,exports.ids=[5212],exports.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},13362:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8732);function r({image:e,title:t,description:s,color:r,imageHeight:n}){return(0,a.jsxs)("div",{className:"color-card shadow-xl"+(r?" "+("green"==r?"green":"gray"==r?"gray":""):""),children:[(0,a.jsx)("h3",{className:"title m-0 text-2xl",children:t}),s&&(0,a.jsx)("span",{className:"text-slate-600 dark:text-slate-400 text-left",children:s}),(0,a.jsx)("div",{className:"image-block",style:n?{height:`${n}px`}:void 0,children:(0,a.jsx)("img",{src:e,alt:`${t} Image`})})]})}function n({image:e,title:t,description:s,color:r,height:n,h2:i,url:l,cta:o}){return(0,a.jsxs)("div",{className:"contained-section shadow-xl"+(r?" "+("green"==r?"green":"gray"==r?"gray":"purple"==r?"purple":""):""),style:n?{height:`${n}px`}:void 0,children:[(0,a.jsxs)("div",{className:"content text-left",children:[i?(0,a.jsx)("h2",{className:"m-0 text-white",children:t}):(0,a.jsx)("h3",{className:"m-0 text-white",children:t}),s&&(0,a.jsx)("span",{className:"text-slate-400",children:s}),l&&o&&(0,a.jsx)("a",{href:l,className:"button mt-4",children:o})]}),(0,a.jsx)("div",{className:"image-block",children:(0,a.jsx)("img",{src:e,alt:`${t} Image`})}),(0,a.jsx)("img",{src:"/images/geometric-overlay.webp",className:"absolute z-0 left-0 top-0 w-full h-full opacity-80 mix-blend-overlay",alt:"Background Image"})]})}function i(e){return(0,a.jsx)("section",{className:"py-20",children:(0,a.jsxs)("div",{className:"main-container flex-col items-center text-center",children:[(0,a.jsx)("h2",{className:"m-0 lg:text-left",children:"All your data storage needs in one place"}),(0,a.jsx)("p",{className:"m-0 ",children:"Datasquirel solves the hassle of storing data across different platforms using a centralized, easy-to-use, SQL-based cloud database administration system. Now you can have all your data in one place and retrieve from any location or environment using HTTP REST API calls and SQL queries."}),(0,a.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 w-full mt-10 gap-10",children:[(0,a.jsx)(r,{image:"/images/screenshots/databases-light.webp",title:"Data and Content",description:"Create databases, tables, dynamic datatypes including rich text, JSON and other editable code blocks",imageHeight:400}),(0,a.jsx)(r,{image:"/images/screenshots/media-list-white.webp",title:"Images, Videos, and other Media",description:"Static images automatically compressed with multiple format support, videos, pdf, excel documents, and more.",color:"green",imageHeight:400})]}),(0,a.jsx)("div",{className:"mt-10 w-full",children:(0,a.jsx)(n,{image:"/images/screenshots/tables-list-white.webp",title:"All the power of SQL without the hassle",description:"Indexes, Foreign keys, encryption, triggers, stored proceedures, etc. You get the best of both worlds: the full power of SQL, and the best UI yet to better manipulate your data.",cta:"Learn More",url:"/about",height:500})})]})})}s(82015)},76892:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(8732),r=s(92441);function n({user:e}){return(0,a.jsxs)("section",{className:"py-24 border-0 border-t border-b border-slate-100 dark:border-slate-100/10 border-solid",children:[(0,a.jsx)("div",{className:"w-full max-w-6xl gap-10 justify-between flex-col relative z-10",children:(0,a.jsxs)("div",{className:"flex-col items-center max-w-2xl text-center ",style:{minWidth:"45%"},children:[(0,a.jsx)("h2",{className:"m-0 leading-tight",children:"Get started For Free."}),(0,a.jsx)("span",{className:"text-lg font-normal",children:"Get Started At no cost. Learn how to create and retrieve data by viewing our documentation."}),(0,a.jsxs)("div",{className:"flex items-start justify-center w-full mt-4",children:[!e?.logged_in_status&&(0,a.jsx)("a",{href:"/create-account",className:"button",children:(0,a.jsx)("span",{className:"",children:"Sign Up For Free"})}),(0,a.jsxs)("a",{href:"/docs",className:"button outlined gray",children:[(0,a.jsx)(r.A,{}),(0,a.jsx)("span",{children:"See The Docs"})]})]})]})}),(0,a.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"})]})}s(82015)},12642:(e,t,s)=>{s(8732),s(82015)},6845:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(63715);function r({setUser:e}){let t=localStorage.getItem("user");if(t)try{e(JSON.parse(t));return}catch(t){e({});return}(0,a.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let s=t.user?t.user:{};e(s),localStorage.setItem("user",JSON.stringify(s))}).catch(e=>{console.log(e)})}},92441:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var a=s(8732);s(82015);var r=s(20883);function n(e){return(0,a.jsxs)(r.Html,{lang:"en",children:[(0,a.jsxs)(r.Head,{children:[(0,a.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,a.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,a.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,a.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,a.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,a.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,a.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,a.jsxs)("body",{children:[(0,a.jsx)(r.Main,{}),(0,a.jsx)(r.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5264.js b/dsql-app/.local_dist/server/chunks/5264.js deleted file mode 100644 index d4ba852..0000000 --- a/dsql-app/.local_dist/server/chunks/5264.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict";exports.id=5264,exports.ids=[5264],exports.modules={96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},6420:(e,r,s)=>{s(81630);let t=s(51348),n=s(72835),a=s(29021),o=s(31341);async function i(e,r,s,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let E=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!E)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a.existsSync(`${E}/${_.csrf_k}`))return null;if(0==_.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},48225:(e,r,s)=>{let t=s(29021),{IncomingMessage:n}=s(81630);e.exports=async function({user:e,message:r,component:s,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"],s=a.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||t||r||a.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== -Error Message: ${r} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,t.existsSync("./.tmp/error.log")||t.writeFileSync("./.tmp/error.log","","utf-8");let l=t.readFileSync("./.tmp/error.log","utf-8");t.writeFileSync("./.tmp/error.log",n),t.appendFileSync("./.tmp/error.log",` - - - - -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:a}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",t(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,s)=>{let{scryptSync:t,createCipheriv:n}=s(55511),{Buffer:a}=s(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=n("aes-192-cbc",t(o,i,l),a.alloc(16,0));try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},31819:(e,r,s)=>{let t=s(3444);async function n({username:e,host:r,grants:s,userId:n}){let a=!1;if(console.log("Handling Grants for User =>",e,r),!e)return console.log("No username provided."),a;if(!r)return console.log(`No Host provided. \x1b[35m\`--host\`\x1b[0m flag is required`),a;if(!s)return console.log("No grants Array provided."),a;try{let o=await t(`SELECT * FROM mysql.user WHERE User = '${e}' AND Host = '${r}'`);if(o?.[0]?.User){let a=await t(`SHOW GRANTS FOR '${e}'@'${r}'`);for(let e=0;e",e.message)}return a}e.exports=n},46889:(e,r,s)=>{let t=s(33873);s(60818).config({path:t.resolve(__dirname,"../../../.env")});let n=s(47795),a=s(3444),o=s(16926),i=s(31819),l=s(20503),c=s(72835),u=process.env.DSQL_DB_HOST||"127.0.0.1";async function _({userId:e,mariadbUserHost:r,mariadbUser:s,sqlUserID:t}){let _=await o({query:"SELECT * FROM users"});_?.[0]||process.exit();for(let E=0;E<_.length;E++){let S=_[E];if(S&&(!e||S.id==e))try{let{mariadb_user:_,mariadb_host:E,mariadb_pass:d,id:p}=S,f=await a(`SELECT * FROM mysql.user WHERE User = '${_}' AND Host = '${E}'`),y=e&&t?await o({query:"SELECT * FROM mariadb_users WHERE id = ? AND user_id = ?",values:[t,e]}):null,g=Array.isArray(y)?y?.[0]:void 0,D=!!g&&!!String(g.primary)?.match(/1/),R=!!f?.[0]?.User,N=`dsql_user_${p}`,m=g?.password?g.password:R?d:n.generate({length:16,numbers:!0,symbols:!0,uppercase:!0,exclude:"*#.'`\""}),O=g?.password?g.password:R?d:l({data:m,encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD,encryptionSalt:process.env.DSQL_ENCRYPTION_SALT});if(!R&&!t&&!D&&!r&&!s){let e=await a(`CREATE USER IF NOT EXISTS '${N}'@'${u}' IDENTIFIED BY '${m}'`);console.log("createNewUser",e),console.log(`User ${S.id}: ${S.first_name} ${S.last_name} SQL credentials successfully updated.`),await o({query:"UPDATE users SET mariadb_user = ?, mariadb_host = ?, mariadb_pass = ? WHERE id = ?",values:[N,u,O,S.id]})}if(D){let e=r||E;await o({query:"UPDATE users SET mariadb_user = ?, mariadb_host = ?, mariadb_pass = ? WHERE id = ?",values:[N,e,O,S.id]})}let L=await o({query:"SELECT * FROM mariadb_users WHERE user_id = ? AND `primary` = 1",values:[p]}),v=!!(Array.isArray(L)&&L?.[0]?.user_id),A=[{database:"*",table:"*",privileges:["ALL"]}];v||await o({query:"INSERT INTO mariadb_users (user_id, username, password, `primary`, grants) VALUES (?, ?, ?, ?, ?)",values:[p,N,O,"1",JSON.stringify(A)]});let T=await o({query:"SELECT * FROM mariadb_users WHERE user_id = ? AND `primary` != '1'",values:[p]});if(Array.isArray(T))for(let s=0;s",e.message)}}process.exit()}e.exports=_},16926:(e,r,s)=>{let t=s(29021),n=s(33873),a=s(9973),o=s(21580),i=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,charset:"utf8mb4",ssl:o()}});e.exports=async function({query:e,values:r,database:s}){let l;s&&(i=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:s,charset:"utf8mb4",ssl:o()}}));try{l=e&&r?await i.query(e,r):await i.query(e),await i.end()}catch(e){if(process.env.FIRST_RUN)return null;console.log("ERROR in dbHandler =>",e.message),console.log(e),console.log(i.config()),t.appendFileSync(n.resolve(__dirname,"../.tmp/dbErrorLogs.txt"),JSON.stringify(e,null,4)+"\n"+Date()+"\n\n\n","utf8"),l=null}return l?JSON.parse(JSON.stringify(l)):null}},3444:(e,r,s)=>{let t=s(16926);e.exports=async function(e){let r;try{r=await t({query:e})}catch(e){console.log("ERROR in noDatabaseDbHandler =>",e.message)}return r||null}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),a=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5392.js b/dsql-app/.local_dist/server/chunks/5392.js new file mode 100644 index 0000000..dcd6231 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/5392.js @@ -0,0 +1 @@ +"use strict";exports.id=5392,exports.ids=[5392],exports.modules={53926:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(8732),n=t(82015),r=t.n(n);function i({confirmedDelegetedUser:e,linksArray:s,user:t}){let[n,i]=r().useState(s||null);return n&&n[1]?(0,a.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:n.map((e,s,t)=>s===n.length-1?(0,a.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},s):(0,a.jsxs)(r().Fragment,{children:[(0,a.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,a.jsx)("span",{className:"opacity-20",children:"|"})]},s))}):(0,a.jsx)(r().Fragment,{})}},87639:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(8732),n=t(82015),r=t.n(n);t(46169);var i=t(72390),l=t(16757),c=t(66916),d=t(66918),o=t(23293);function x(){let[e,s]=r().useState(!0),[t,n]=r().useState(0),[x,m]=r().useState(0);return e?(0,a.jsx)("div",{className:"button ghost small-text",style:{height:"30px"},children:(0,a.jsx)(l.A,{width:"15px",position:"relative"})}):(0,a.jsx)(r().Fragment,{children:t?(0,a.jsxs)("div",{className:"button ghost small-text normal-weight p-0",style:{height:"30px",padding:0},onClick:e=>{s(!0),(0,i.A)().then(()=>{m(e=>e+1),s(!1)})},children:[e&&(0,a.jsx)(l.A,{width:"15px"}),(0,a.jsx)(c.A,{size:20,className:"text-slate-400 mr-[3px]"}),(0,a.jsx)("span",{className:"font-bold text-slate-700 dark:text-white",children:t&&t.toFixed(2)}),(0,a.jsx)("span",{className:"text-slate-500",children:"mb"}),(0,a.jsx)(d.A,{size:17,className:"text-slate-400",strokeWidth:2})]}):(0,a.jsxs)("span",{className:"text-sm info gray font-normal w-auto",children:[(0,a.jsx)(o.A,{}),(0,a.jsx)("span",{children:"No Disk Usage Data Available Yet"})]})})}},92702:(e,s,t)=>{t.r(s),t.d(s,{default:()=>c});var a=t(71934),n=t(71205),r=t(29021),i=t.n(r),l=t(41939);async function c(e,s,t){let{keyCookieName:r,csrfCookieName:c}=(0,l.A)();if(!e.cookies?.[r]?.match(/./))return null;let d=(0,n.A)({encryptedString:e.cookies[r]});if(!d)return null;let o=JSON.parse(d);if(!o.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(o.csrf_k)))return null;let x=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!x)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${x}/${o.csrf_k}`))return null;if(0==o.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${o.id}'`);e&&e[0]&&1==e[0].verification_status&&s.setHeader("Set-Cookie",["user_refresh=1"])}return o?.date&&Date.now()-o.date>6048e5?null:o}},72390:(e,s,t)=>{t.d(s,{A:()=>n});var a=t(46169);async function n(){let e=await (0,a.A)("/api/getDiskUsage");localStorage.setItem("disk_usage",e.total)}},89923:(e,s,t)=>{t.d(s,{A:()=>a});function a(e,s){return s?!!(e?.id&&String(e?.id)==(process.env.DSQL_SU_USER_ID||"1")):!!(e?.id&&"1"==String(e?.id))}},25562:(e,s,t)=>{t.d(s,{A:()=>N});var a=t(8732),n=t(82015),r=t.n(n),i=t(27912),l=t.n(i),c=t(50139),d=t(52070),o=t(34637),x=t(83158),m=t(25294),h=t(92441),u=t(29743),p=t(10643),j=t(10321),g=t(89923);function f({user:e}){let[s,t]=r().useState(!0);return(0,a.jsxs)("aside",{className:"aside"+(s?" mobile-collapsed":" mobile-expanded"),children:[(0,a.jsx)(c.A,{adminAside:!0,collapseAsideMobile:s,setCollapseAsideMobile:t}),(0,a.jsx)("hr",{className:"opacity-0 mt-4"}),(0,a.jsxs)("div",{className:"main-links"+(s?" hidden lg:flex":" "),children:[(0,a.jsxs)("a",{href:"/admin","data-currentlink":"/admin","data-strictlink":"true",children:[(0,a.jsx)(d.A,{size:20}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/databases`,"data-currentlink":`/admin/${e?.id}/databases`,children:[(0,a.jsx)(o.A,{size:20}),(0,a.jsx)("span",{children:"Databases"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/media`,"data-currentlink":`/admin/${e?.id}/media`,children:[(0,a.jsx)(x.A,{size:20}),(0,a.jsx)("span",{children:"Media"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/users`,"data-currentlink":`/admin/${e?.id}/users`,children:[(0,a.jsx)(m.A,{size:20}),(0,a.jsx)("span",{children:"Users"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/schema`,"data-currentlink":`/admin/${e?.id}/schema`,children:[(0,a.jsx)(h.A,{size:20}),(0,a.jsx)("span",{children:"Schema"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/api-keys`,"data-currentlink":`/admin/${e?.id}/api-keys`,children:[(0,a.jsx)(u.A,{size:20}),(0,a.jsx)("span",{children:"API Keys"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/connect`,"data-currentlink":`/admin/${e?.id}/connect`,children:[(0,a.jsx)(p.A,{size:20}),(0,a.jsx)("span",{children:"Connect"})]}),(0,g.A)(e)&&(0,a.jsx)(r().Fragment,{children:(0,a.jsxs)("a",{href:"/su","data-currentlink":"/su",children:[(0,a.jsx)(j.A,{size:20}),(0,a.jsx)("span",{children:"Super Admin User"})]})}),(0,a.jsx)("hr",{className:"opacity-80"}),(0,a.jsxs)("div",{className:"flex-col gap-0 items-start w-full",children:[(0,a.jsx)("a",{href:`/admin/${e?.id}/settings`,"data-currentlink":`/admin/${e?.id}/settings`,children:(0,a.jsx)("span",{children:"Settings"})}),(0,a.jsx)("a",{href:"/docs","data-currentlink":"/docs",target:"_blank",children:(0,a.jsx)("span",{children:"Documentation"})}),(0,a.jsx)("a",{href:"/logout","data-currentlink":"/logout",children:(0,a.jsx)("span",{children:"Logout"})})]})]})]})}var v=t(192);function y({user:e,extraHeaderContent:s}){let[t,n]=r().useState(e||null);return(0,a.jsx)("section",{className:"overflow-visible w-full px-0 md:px-8 py-0 flex justify-center bg-white dark:bg-slate-800 shadow-lg gap-4 dark:shadow-black/10 shadow-slate-900/5 relative z-[100]",style:{zIndex:700,border:"none"},children:(0,a.jsxs)("div",{className:"w-full items-center justify-between gap-4 md:gap-8",children:[(0,a.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 px-4 xl:px-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto bg-white xl:bg-transparent pb-10 xl:pb-0",id:"main-nav-content-wrapper",children:[(0,a.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,a.jsx)("a",{href:"/",className:"hidden xl:flex",children:(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,a.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{border:"none"},children:(0,a.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,a.jsxs)("div",{className:"flex items-center w-full gap-6 grow flex-col xl:flex-row justify-start xl:justify-between",children:[(0,a.jsx)("div",{className:"gap-6",children:s}),(0,a.jsx)(v.A,{activeUser:t})]})]}),(0,a.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})}t(27550);var _=t(87639);function N({children:e,head:s,user:t,productionEnvironment:n,extraHeaderContent:i,aceEditor:d}){return i||(i=(0,a.jsx)(_.A,{})),(0,a.jsxs)(r().Fragment,{children:[(0,a.jsxs)(l(),{children:[s,(0,a.jsxs)(r().Fragment,{children:[(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]}),(0,a.jsxs)("div",{className:"admin w-full flex items-start gap-0",children:[(0,a.jsx)(f,{user:t}),(0,a.jsxs)("main",{className:"relative",children:[(0,a.jsx)(y,{user:t,extraHeaderContent:i}),(0,a.jsx)("div",{className:"admin-content relative z-10",children:e}),(0,a.jsx)("footer",{className:"flex justify-center w-full items-center p-4",children:(0,a.jsxs)("div",{className:"max-w-6xl w-full justify-center flex-wrap",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 scale-75",children:(0,a.jsx)(c.A,{})}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600 text-center",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/docs",children:"Docs"}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/terms",children:"Terms"})]})})]})]})]})}t(46169)},41939:(e,s,t)=>{t.d(s,{A:()=>a});function a(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",r=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=s;e?.userId&&(i+=`user_${e.userId}_`),r&&(i+=`${r}_`),i+=t;let l=s;e?.userId&&(l+=`user_${e.userId}_`),r&&(l+=`${r}_`),l+=a;let c=s;return e?.userId&&(c+=`user_${e.userId}_`),r&&(c+=`${r}_`),{keyCookieName:i,csrfCookieName:l,oneTimeCodeName:c+=n}}},71205:(e,s,t)=>{t.d(s,{A:()=>r});var a=t(55511),n=t(79428);function r({encryptedString:e,encryptionKey:s,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let r=s||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!r?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,a.scryptSync)(r,i,l),d=n.Buffer.alloc(16,0),o=(0,a.createDecipheriv)("aes-192-cbc",c,d);try{let s=o.update(e,"hex","utf8");return s+=o.final("utf8")}catch(s){return console.log("Error in decrypting =>",s.message),e}}},71934:(e,s,t)=>{t.d(s,{A:()=>a});async function a(...e){let s=global.DSQL_DB_CONN;try{if(!s)throw Error("No Connection provided to DB_HANDLER function!");let t=await s.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await s?.end()}}},5583:(e,s,t)=>{t.r(s),t.d(s,{default:()=>r});var a=t(8732);t(82015);var n=t(20883);function r(){return(0,a.jsxs)(n.Html,{lang:"en",children:[(0,a.jsxs)(n.Head,{children:[(0,a.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,a.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,a.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,a.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,a.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,a.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,a.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,a.jsxs)("body",{children:[(0,a.jsx)(n.Main,{}),(0,a.jsx)(n.NextScript,{})]})]})}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5421.js b/dsql-app/.local_dist/server/chunks/5421.js deleted file mode 100644 index 7c61548..0000000 --- a/dsql-app/.local_dist/server/chunks/5421.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";exports.id=5421,exports.ids=[5421],exports.modules={77802:(e,a,t)=>{t.d(a,{A:()=>F});var l=t(8732),s=t(82015),i=t.n(s);function d({tableFields:e,setTableFields:a,setRefresh:t,setPageRefresh:l,refreshFieldsListRef:s}){let i=e.findIndex(e=>"date_created"===e.fieldName);e.splice(i,0,{newTempField:!0}),a(e),s?.current&&s.current(e=>e+1)}t(80255);var r=t(39897),n=t(32415),o=t(64030),c=t(27825),m=t.n(c);function u({tableFields:e,setTableFields:a,refreshFieldsListRef:t,order:l,field:s,e:i}){let d=m().cloneDeep(e),r=d.findIndex(e=>e.fieldName===s.fieldName);if(r<0)return;let n=d[r];if("up"===l&&r&&r<=1){console.log("Min Reached =>",r);return}if("down"===l&&r&&r>=d.length-7){console.log("Max Reached =>",r);return}try{let e;let a=i.target.closest(".table-field-wrapper"),t=a.previousElementSibling,s=a.nextElementSibling,d=window.DSQL.Flip,r=d.getState(a);"up"===l?(e=d.getState(t),a.parentNode?.insertBefore(a,t)):s?.nextElementSibling&&(e=d.getState(s),a.parentNode?.insertBefore(a,s.nextElementSibling)),d.from(r,{duration:.3,ease:"power1.inOut"}),d.from(e,{duration:.3,ease:"power1.inOut"})}catch(e){console.log("Error =>",e.message)}if(!r){console.log("No target Field Index =>",r);return}d.splice(r,1),"up"===l?d.splice(r-1,0,n):d.splice(r+1,0,n),setTimeout(()=>{a([...d]),t.current&&t.current(e=>e+1)},500)}var p=t(64417),x=t(12097),h=t(63715);function f({field:e,setTargetField:a,fieldIndex:t,tableFields:s,setTableFields:d,refreshFieldsListRef:r,database:n,currentTable:c,user:m,isDelegated:u,setLoading:p}){let[f,g]=i().useState(e),[w,y]=i().useState(!1);return(0,l.jsxs)("div",{className:"flex-col w-full table-field-wrapper"+(w?" shadow-2xl shadow-slate-700/40 relative z-50":""),children:[(0,l.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(w?" rounded-t":" rounded")+(f.fieldName?.match(o.A)?" text-slate-400 pointer-events-none border-slate-200 border":" light-gray"),children:[(0,l.jsx)("span",{className:"font-bold"+(f.fieldName?.match(o.A)?" dark:text-slate-500":" dark:text-white"),children:f.fieldName}),(0,l.jsx)("span",{className:"text-xs py-1 px-2 bg-slate-100 dark:bg-slate-700 dark:text-slate-200 rounded ",children:f.dataType}),f?.foreignKey&&(0,l.jsxs)("div",{className:"text-xs bg-primary text-white px-2 py-0.5 rounded-full",children:[(0,l.jsx)("span",{children:"Foreign Key: "}),(0,l.jsxs)("span",{children:[f.foreignKey.destinationTableName," ("," ",(0,l.jsx)("b",{children:f.foreignKey.destinationTableColumnName})," ",")"]})]}),f.fieldName?.match(o.A)&&(0,l.jsx)("span",{className:"text-slate-300 text-sm font-semibold ml-0 md:ml-auto",children:"Default Field"}),!(!u&&!f.fieldName?.match(o.A)&&f.dataType?.match(/INT/))||f.foreignKey||n?.active_clone?.toString()?.match(/1/)?!u&&!f.fieldName?.match(o.A)&&f.dataType?.match(/INT/)&&!n?.active_clone?.toString()?.match(/1/)?(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(0,l.jsx)("div",{className:"button py-1 text-xs light-gray",onClick:a=>{window.confirm("Delete this foreign Key?")&&(delete e.foreignKey,p(!0),(0,h.A)("/api/updateClonedTableForeignKeys",{method:"post",body:{tableData:c,database:n.db_full_name,dbSlug:n.db_slug,delegated:!!window.location?.search?.match(/delegated=true/i)}},!0).then(e=>{e.success?window.location.reload():window.alert("Update Failed, Please Try again.")}))},style:{color:"var(--slate-500)"},children:"Delete Foreign Key"})}):(0,l.jsx)(i().Fragment,{}):(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(0,l.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:e=>{w?y(!1):y(!0)},style:{color:"var(--slate-500)"},children:"Add Foreign Key"})})]}),w&&!u&&(0,l.jsx)("div",{className:"card col w-full -mt-5 pt-0 no-hover",children:(0,l.jsx)(x.A,{targetField:e,setFieldData:g,tableFields:s,setTableFields:d,database:n,currentTable:c,user:m,setActiveEdit:y,activeClonedTable:!0})})]})}var g=t(65388),w=t(84896);function y({fieldIndex:e,setTableFields:a,database:s,user:d,isNewField:r,setLiteralValue:n,tempFieldData:o,setTempFieldData:c,dataTypeValue:m,setDataTypeValue:u,dataType:p,setDataType:x,dataTypeDesc:h,setDataTypeDesc:f}){let y=t(94327);i().useRef();let b=!!p.match(/uuid/i);return(0,l.jsxs)(i().Fragment,{children:[r&&(0,l.jsx)("span",{className:"absolute -top-4 text-sm bg-fuchsia-600 dark:bg-white text-white dark:text-fuchsia-800 px-3 py-1 rounded-full",children:"New Field"}),(0,l.jsxs)("div",{className:"gap-4 flex-wrap xl:flex-nowrap flex-col xl:flex-row items-stretch w-full xl:w-auto",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_name",children:"Field Name"}),(0,l.jsx)("input",{type:"text",name:"new_field_name",id:"new_field_name",placeholder:"Eg. post_title",onInput:async e=>{let a=e.target,t=a.value.toLowerCase().replace(/ /g,"_");a.value=t},required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"items-start flex-wrap xl:flex-nowrap",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Data Type"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm w-full items-start gap-2",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:h})})]})]}),(0,l.jsxs)("div",{className:"w-full xl:w-auto",children:[(0,l.jsx)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl:w-auto",onChange:e=>{let a=e.target;x(a.value),a.childNodes.forEach(e=>{e.value===a.value&&f(e.dataset.desc),e.value===a.value&&e.dataset.literal&&n(e.dataset.literal)})},children:y.map((e,a)=>e.name.match(/VARCHAR/)?(0,l.jsx)("option",{value:e.name,"data-desc":e.description,children:e.title+"("+(m||200)+")"},a+1):(0,l.jsx)("option",{value:e.name,"data-desc":e.description,"data-literal":e.valueLiteral||void 0,children:e.title},a+1))}),p.match(/VARCHAR/)&&(0,l.jsx)("input",{type:"number",defaultValue:m,className:"px-2",style:{maxWidth:"60px"},max:255,min:5,onChange:e=>{u(e.target.value)}})]})]}),p?.match(/text/i)&&(0,l.jsx)(i().Fragment,{children:(0,l.jsx)(w.A,{targetField:o})}),!b&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Required?"}),(0,l.jsxs)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]}),!b&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_default_value",children:"Default Value (optional)"}),(0,l.jsx)("input",{type:"text",name:"new_field_default_value",id:"new_field_default_value",placeholder:"Default Value"})]}),!b&&(0,l.jsx)(g.A,{database:s,setFieldData:c,targetField:o,user:d,fieldIndex:e})]}),(0,l.jsxs)("div",{className:"secondary mt-auto flex-wrap xl:flex-nowrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full sm:w-auto justify-center grow",children:"Add Field"}),(0,l.jsx)("div",{className:"button outlined-gray mt-auto py-2.5 w-full sm:w-auto justify-center grow",onClick:t=>{a(a=>a.filter((a,t)=>t!=e))},children:"Cancel"})]})]})}function b({fieldIndex:e,tableFields:a,setTableFields:s,refreshFieldsListRef:d,database:r,currentTable:n,user:o}){t(94327);let[c,m]=i().useState("VARCHAR"),[u,p]=i().useState("200"),[x,h]=i().useState("Varchar is simply letters and numbers within the range 0 - 255"),[f,g]=i().useState({}),w=i().useRef(),[b,v]=i().useState(""),j=!!c.match(/uuid/i);return(0,l.jsx)("div",{className:"w-full mt-1 flex-wrap relative z-0 hover:z-20",ref:w,children:(0,l.jsx)("form",{className:"flex flex-row items-start gap-4 w-full justify-between border border-solid p-4 pt-6 border-slate-400 rounded focus:shadow-lg shadow-slate-400/40 dark:shadow-black/30 relative flex-wrap xl:flex-nowrap shadow-xl",onSubmit:a=>{a.preventDefault();let t=f.foreignKey;t&&!t.destinationTableName&&delete f.foreignKey;let l=a.target,i=l.new_field_name.value,r=l.new_field_data_type.value,n=l.new_field_required?.value,o=l.new_field_default_value?.value,c=l.encryption_field?.value,m=l.rich_text_option?.value,p=l.foreign_key_field,x=l.foreign_key_destination_table_name,h=l.foreign_key_destination_table_column_name;p?.value;let g={...f,fieldName:i,dataType:f?.dataType&&f?.foreignKey?f.dataType:r?.match(/VARCHAR/)?`${r}(${u})`:r};n?.match(/yes/i)?g.notNullValue=!0:o?.match(/./)||(g.nullValue=!0),o?.match(/./)&&(g.defaultValue=o),c?.match(/yes/i)&&(g.encrypted=!0),h?.value?.match(/./i)&&!h?.value?.match(/^--$/i)&&(g.dataType=h.dataset.dataType,g.foreignKey={foreignKeyName:h.dataset.foreignKeyName,destinationTableName:x.dataset.destinationTableName,destinationTableColumnName:h.dataset.destinationTableColumnName,cascadeDelete:!0}),m?.match(/yes/i)&&(g.richText=!0),j?(g.defaultValueLiteral=b,g.nullValue=!1):delete g.defaultValueLiteral,console.log("newFieldObject",g),function({fieldIndex:e,setTableFields:a,refreshFieldsListRef:t,payload:l}){a(a=>(a.splice(e,1,l),a)),t?.current&&t.current(e=>e+1)}({fieldIndex:e,setTableFields:s,refreshFieldsListRef:d,payload:g})},children:(0,l.jsx)(y,{database:r,fieldIndex:e,isNewField:!0,literalValue:b,refreshFieldsListRef:d,setLiteralValue:v,setTableFields:s,user:o,currentTable:n,tableFields:a,tempFieldData:f,setTempFieldData:g,dataTypeValue:u,setDataTypeValue:p,dataType:c,setDataType:m,dataTypeDesc:x,setDataTypeDesc:h})})})}var v=t(62506),j=t(58526);function N({field:e,setTargetField:a,fieldIndex:t,tableFields:s,setTableFields:d,refreshFieldsListRef:r,database:n,currentTable:c,confirmedDelegetedUser:m,user:x}){let h=m?.delegated,f=m?.priviledges?.match(/Edit Tables/i);m?.priviledges?.match(/Delete Tables/i),m?.priviledges?.match(/Create Tables/i);let{active_clone:g,active_clone_parent_db:w,remote_connected:y}=n,[b,N]=i().useState(e),[_,T]=i().useState(!1);return(0,l.jsxs)("div",{className:"flex-col w-full table-field-wrapper"+(_?" shadow-2xl shadow-slate-300/40 dark:shadow-black/30 relative z-50":""),children:[(0,l.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(_?" rounded-t":" rounded")+(b.fieldName?.match(o.A)?" text-slate-400 pointer-events-none border-slate-200 border":" light-gray"),children:[(0,l.jsx)("span",{className:"font-bold"+(b.fieldName?.match(o.A)?" dark:text-slate-500":" dark:text-white"),children:b.fieldName}),(0,l.jsx)("span",{className:"text-xs py-1 px-2 bg-slate-100 dark:bg-slate-700 dark:text-slate-200 rounded ",children:b.dataType}),b?.foreignKey&&(0,l.jsxs)("div",{className:"text-xs bg-primary text-white px-2 py-0.5 rounded-full",children:[(0,l.jsx)("span",{children:"Foreign Key: "}),(0,l.jsxs)("span",{children:[b.foreignKey.destinationTableName," ("," ",(0,l.jsx)("b",{children:b.foreignKey.destinationTableColumnName})," ",")"]})]}),b.fieldName?.match(o.A)&&(0,l.jsx)("span",{className:"text-slate-300 text-sm font-semibold ml-0 md:ml-auto",children:"Default Field"}),!b.fieldName?.match(o.A)&&!w&&!y&&(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(!h||h&&f)&&(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)(v.A,{children:[(0,l.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:e=>{_?T(!1):T(!0)},style:{color:"var(--slate-500)"},children:"Edit"}),!w&&!y&&(0,l.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:a=>{window.confirm(`Delete "${e.fieldName}"?`)&&d(e=>e.filter((e,a)=>a!=t))},style:{color:"var(--slate-500)"},children:"Delete"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"button outlined gray p-2 w-8 h-8 rounded-full rotate-180",onClick:a=>{u({tableFields:s,setTableFields:d,refreshFieldsListRef:r,order:"up",field:e,e:a})},children:(0,l.jsx)(j.A,{size:20})}),(0,l.jsx)("div",{className:"button outlined gray p-2 w-8 h-8 rounded-full",onClick:a=>{u({tableFields:s,setTableFields:d,refreshFieldsListRef:r,order:"down",field:e,e:a})},children:(0,l.jsx)(j.A,{size:20})})]})]})})]}),_&&(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(p.A,{fieldIndex:t,tableFields:s,setTableFields:d,refreshFieldsListRef:r,targetField:e,setActiveEdit:T,database:n,currentTable:c,user:x})})]})}var _=t(63014);let T=1;function F({user:e,tableFields:a,setTableFields:t,setTargetField:s,refreshFieldsListRef:o,updateTable:c,updateTableAfterFieldsUpdateFunction:m,collapsed:u,database:p,table:x,confirmedDelegetedUser:h,query:g}){x?.childTable&&x.childTableDbFullName?.replace(new RegExp(/datasquirel_user_\d+_/),"");let w=h?.delegated,y=h?.priviledges?.match(/Edit Tables/i);h?.priviledges?.match(/Delete Tables/i),h?.priviledges?.match(/Create Tables/i);let{active_clone:v,active_clone_parent_db:j,remote_connected:F}=p,[A,C]=i().useState(0);o.current=C;let[S,k]=i().useState(!1),[D,$]=i().useState(u||!1);return w&&!y?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)("section",{className:"paper green",children:[S&&(0,l.jsx)(n.A,{}),x?.childTable?(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Fields"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{let t=(0,_.A)({paradigm:"JavaScript",table:x,query:g,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("JavaScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (JS)"})}),(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{let t=(0,_.A)({paradigm:"TypeScript",table:x,query:g,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("TypeScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (TS)"})})]})]}),(0,l.jsx)("div",{className:"flex-col w-full",style:D?{maxHeight:"200px"}:{},children:a&&a[0]&&a.map((i,d)=>(T++,(0,l.jsx)(f,{field:i,fieldIndex:d,setTargetField:s,setTableFields:t,refreshFieldsListRef:o,tableFields:a,database:p,setLoading:k,currentTable:x,user:e,isDelegated:w},T)))}),u&&(0,l.jsx)(r.A,{collapse:D||!1,setCollapse:$})]}):(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Fields"}),(0,l.jsxs)("div",{children:[(!w||w&&y)&&!j&&!F&&(0,l.jsxs)("div",{className:"button secondary outlined",onClick:e=>{D&&$(!1),d({setTableFields:t,tableFields:a,setRefresh:C,refreshFieldsListRef:o})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Field"})]}),(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{if(!x)return;let t=(0,_.A)({paradigm:"JavaScript",table:x,query:g,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("JavaScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (JS)"})}),(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{if(!x)return;let t=(0,_.A)({paradigm:"TypeScript",table:x,query:g,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("TypeScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (TS)"})})]})]}),(0,l.jsxs)("div",{className:"flex-col w-full",style:D?{maxHeight:"200px"}:{},children:[a&&a[0]&&a.map((i,d)=>(T++,i.newTempField)?(0,l.jsx)(b,{fieldIndex:d,tableFields:a,setTableFields:t,refreshFieldsListRef:o,database:p,currentTable:x,user:e},T):(0,l.jsx)(N,{field:i,fieldIndex:d,setTargetField:s,setTableFields:t,refreshFieldsListRef:o,tableFields:a,database:p,currentTable:x,confirmedDelegetedUser:h,user:e},T)),(!w||w&&y)&&!j&&!F&&(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("div",{className:"button outlined gray w-full more-padding",style:{borderStyle:"dashed"},onClick:e=>{D&&$(!1),d({setTableFields:t,tableFields:a,setRefresh:C,refreshFieldsListRef:o})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Field"})]}),c&&(0,l.jsx)("button",{className:"secondary w-full py-3",onClick:e=>{window.confirm("Update Table Fields?")&&(k(!0),m&&m(k))},children:"Update Table Fields"})]})]}),u&&(0,l.jsx)(r.A,{collapse:D,setCollapse:$})]})]})}},63014:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(64030);function s({paradigm:e,table:a,query:t,user:s}){let i="";try{let s=`DSQL_${t.single}_${t.single_table}`.toUpperCase(),r=a.fields;function d(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let n=[],o=[];n.push(`type ${s} = {`),o.push(`/** - * @typedef {object} ${s}`),r.forEach(e=>{let a=e.nullValue?"?":e.fieldName?.match(l.A)?"?":"";n.push(` ${e.fieldName}${a}: ${d(e.dataType||"")};`),o.push(` * @property {${d(e.dataType||"")}${a}} ${e.fieldName}`)}),n.push("}"),o.push(" */"),e?.match(/javascript/i)&&(i=o.join("\n")),e?.match(/typescript/i)&&(i=n.join("\n"))}catch(e){console.log(e.message),i=null}return i}},39897:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({collapse:e,setCollapse:a}){return(0,l.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:t=>{e?a(!1):a(!0)},children:[(0,l.jsx)("span",{children:e?"Expand":"Collapse"}),(0,l.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,l.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}t(82015)},64030:(e,a,t)=>{t.d(a,{A:()=>l});let l=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},93342:(e,a,t)=>{let l=t(22373),s=t(29021),i=t(33873);e.exports=function({userId:e}){try{let a=i.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(s.readFileSync(a,"utf-8"))}catch(e){return l({component:"grabUserSchemaData",message:e.message}),null}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5664.js b/dsql-app/.local_dist/server/chunks/5664.js deleted file mode 100644 index d36007e..0000000 --- a/dsql-app/.local_dist/server/chunks/5664.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=5664,exports.ids=[5664],exports.modules={51548:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(8732),n=l(58526);function a({selectOptions:e,name:t,onChangeHandler:l,required:a,setAlert:r,title:i,defaultValue:c,info:o,id:d}){try{function h(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),l=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!l.classList.contains("hidden")){l.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&l.classList.contains("hidden"))){if(!t){l.classList.add("hidden");return}if(l.classList.contains("hidden")){l.classList.remove("hidden");return}l.classList.add("hidden")}}return(0,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[i&&(0,s.jsxs)("label",{htmlFor:t,children:[i,a?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:a,onChange:e=>{r&&r(null),e.target.classList.remove("warning"),l&&l(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:l,title:n}=e;return(0,s.jsx)("option",{value:l,selected:!!e.default,children:n},t+1)})}),(0,s.jsx)(n.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,s.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:h,onMouseLeave:h,onClick:h,children:[(0,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,s.jsx)("span",{children:o})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}l(82015)},46437:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(8732),n=l(23293);function a(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(n.A,{})})}l(82015)},58548:(e,t,l)=>{l.d(t,{A:()=>r});var s=l(8732),n=l(82015),a=l.n(n);function r({confirmedDelegetedUser:e,linksArray:t,user:l}){e?.delegated,e?.priviledges?.match(/Edit Tables/i),e?.priviledges?.match(/Delete Tables/i),e?.priviledges?.match(/Create Tables/i);let[n,r]=a().useState(t||null);return n&&n[1]?(0,s.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:n.map((e,t,l)=>t===n.length-1?(0,s.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,s.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,s.jsx)(a().Fragment,{})}},62506:(e,t,l)=>{l.d(t,{A:()=>r});var s=l(8732),n=l(82015),a=l.n(n);function r({children:e,column:t,className:l}){let n=a().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(l?" "+l:""),ref:n,children:e})}},50129:(e,t,l)=>{l.d(t,{A:()=>k});var s=l(8732),n=l(82015),a=l.n(n),r=l(13737),i=l(32415),c=l(40373),o=l(62506),d=l(96725);function h({targetElement:e,setOpenStyleModal:t}){return e?(0,s.jsxs)("div",{className:"flex flex-col items-stretch p-6 max-w-lg",children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("span",{className:"text-xl",children:"Element Style"}),(0,s.jsx)("button",{className:"w-10 h-10 plain-text",onClick:()=>{t(!1)},children:(0,s.jsx)(d.A,{})})]}),(0,s.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded add-css-block",children:[(0,s.jsx)("input",{type:"text",placeholder:"CSS key"}),(0,s.jsx)("input",{type:"text",placeholder:"CSS Value",onKeyDownCapture:t=>{let l=t.target;if(t.key?.match(/enter/i)){let t=l.closest(".add-css-block")?.children[0],s=l.closest(".add-css-block")?.children[1],n=t?.value,a=s?.value;if(!n?.match(/./)||!a?.match(/./))return;e.style[n]=a}}}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".add-css-block")?.children[0],n=l.closest(".add-css-block")?.children[1],a=s?.value,r=n?.value;a?.match(/./)&&r?.match(/./)&&(e.style[a]=r)},children:"Add"})]}),(0,s.jsxs)("div",{className:"flex-wrap",children:[(0,s.jsx)("button",{onClick:t=>{e.removeAttribute("style")},className:"secondary grow",children:"Reset"}),(0,s.jsx)("button",{onClick:t=>{e.style.display="flex",e.style.alignItems="center",e.style.gap="10px"},className:"outlined black grow",children:"Flex"}),(0,s.jsx)("button",{onClick:t=>{e.style.backgroundColor="rgb(241 245 249)"},className:"outlined black grow",children:"BG-Slate-100"}),(0,s.jsx)("button",{onClick:t=>{e.style.backgroundColor="#F6F4F8"},className:"outlined black grow",children:"BG-Main-light"}),(0,s.jsx)("button",{onClick:t=>{e.style.padding="10px"},className:"outlined black grow",children:"Padding-10px"}),(0,s.jsx)("button",{onClick:t=>{e.style.padding="10px 20px"},className:"outlined black grow",children:"Padding-10px-20px"}),(0,s.jsx)("button",{onClick:t=>{e.style.borderRadius="5px"},className:"outlined black grow",children:"Border-Radius-5px"}),(0,s.jsx)("button",{onClick:t=>{e.style.border="1px solid rgb(241 245 249)"},className:"outlined black grow",children:"Border-Slate-100"}),(0,s.jsx)("button",{onClick:t=>{e.style.border="1px solid rgb(226 232 240)"},className:"outlined black grow",children:"Border-Slate-200"}),(0,s.jsx)("button",{onClick:t=>{e.style.border="1px solid rgb(203 213 225)"},className:"outlined black grow",children:"Border-Slate-300"})]}),(0,s.jsx)("span",{className:"font-semibold text-xl mt-4",children:"Add class Name"}),(0,s.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded add-class-name-block",children:[(0,s.jsx)("input",{type:"text",placeholder:"Class Name",onKeyDownCapture:t=>{let l=t.target,s=l.closest(".add-class-name-block")?.children[0];if(t.key?.match(/enter/i)){let t=s?.value;if(!t?.match(/./))return;e.classList.add(t)}}}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".add-class-name-block")?.children[0],n=s?.value;n?.match(/./)&&e.classList.add(n)},children:"Add"}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".add-class-name-block")?.children[0],n=s?.value;n?.match(/./)&&e.classList.remove(n)},className:"outlined",children:"Remove"})]}),e?.nodeName?.match(/^a$/i)?(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("span",{className:"font-semibold text-xl mt-4",children:"Add URL"}),(0,s.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded href-block",children:[(0,s.jsx)("input",{type:"text",placeholder:"Class Name",onKeyDownCapture:t=>{let l=t.target,s=l.closest(".href-block")?.children[0];if(t.key?.match(/enter/i)){let t=s?.value;if(!t?.match(/./))return;e.href=t}},defaultValue:e?.href}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".href-block")?.children[0],n=s?.value;n?.match(/./)&&(e.href=n)},children:"Add"})]})]}):(0,s.jsx)(a().Fragment,{})]}):null}function u({targetElement:e,back:t}){if(!e)return;let l=e.nextElementSibling,s=e.previousElementSibling;!t&&l?l.after(e):t&&s&&s.before(e)}function x({editor:e,node:t,setTargetElement:l}){e.getDoc().querySelectorAll(".target-node").forEach(e=>{e.classList.remove("target-node")});let s=e.getWin(),n=s.getSelection()?.anchorNode?.parentElement,a=t||n||null;a&&(a?.classList?.add("target-node"),l&&l(a))}var m=l(54677);let p=(0,l(82544).A)("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);function g({editorRef:e}){let[t,l]=a().useState(null),[n,r]=a().useState(!1),[i,c]=a().useState(!1);return(0,s.jsxs)("div",{className:"absolute top-[60px] z-50 -left-[38px] w-[40px] flex flex-col items-end",style:{boxShadow:"0 0 40px rgba(15, 23, 42, 0.2)"},children:[(0,s.jsxs)(o.A,{column:!0,className:"gap-[1px]",children:[(0,s.jsx)("div",{onClick:()=>{x({editor:e.current,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button secondary",children:(0,s.jsx)("span",{children:"Click1"})}),(0,s.jsx)("div",{onClick:()=>{u({targetElement:t,back:!0})},style:{width:"40px",height:"40px"},className:"button dark",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{u({targetElement:t})},style:{width:"40px",height:"40px"},className:"button dark",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{c(!0)},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(p,{})}),(0,s.jsx)("div",{onClick:()=>{r(!0)},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(e.getWin(),!t)return;let s=t.cloneNode(!0);s.nodeName.match(/html|document|body/i)||(t.insertAdjacentElement("afterend",s),t.classList.remove("target-node"),l(s))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(e.getWin(),!t||t.nodeName.match(/html|document|body/i))return;let s=t.parentElement;s||(l(t),x({editor:e,node:t,setTargetElement:l})),s?.nodeName.match(/html|document|body/i)?(l(t),x({editor:e,node:t,setTargetElement:l})):s&&(l(s),x({editor:e,node:s,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(e.getWin(),!t)return;let s=t.children[0];s?(l(s),x({editor:e,node:s,setTargetElement:l})):(l(t),x({editor:e,node:t,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{className:"rotate-180"})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(!t)return;let s=t.previousElementSibling;s?(l(s),x({editor:e,node:s,setTargetElement:l})):(l(t),x({editor:e,node:t,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(!t)return;let s=t.nextElementSibling;s?(l(s),x({editor:e,node:s,setTargetElement:l})):(l(t),x({editor:e,node:t,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{if(t){let s=t.parentNode;s.removeChild(t),x({editor:e.current,node:s,setTargetElement:l})}},style:{width:"40px",height:"40px"},className:"button bg-red-500",children:(0,s.jsx)(d.A,{})}),(0,s.jsx)("div",{onClick:()=>{e.current.getDoc().querySelectorAll(".target-node").forEach(e=>{e.classList.remove("target-node")}),l(null)},style:{width:"40px",height:"40px"},className:"button white",children:(0,s.jsx)(m.A,{})})]}),(0,s.jsx)("span",{children:(0,s.jsx)(h,{targetElement:t,setOpenStyleModal:r})})]})}function f({user:e,blockObject:t,placeholder:l,editorRef:n,height:r,extend:i}){let[o,d]=a().useState(!1);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(c.Editor,{tinymceScriptSrc:"/tinymce/tinymce.min.js",onInit:(e,t)=>{if(i){let e=t.getBody();e.style.padding="40px",e.className="RTE-DOCS"}n&&(n.current=t)},initialValue:t&&t.content?t.content:"",init:{height:r||400,width:"100%",relative_urls:!1,remove_script_host:!1,menubar:!1,plugins:i?["advlist","autolink","lists","link","image","charmap","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","preview","help","wordcount","codesample"]:["link"],toolbar:i?"undo redo | blocks | bold italic forecolor | codesample link image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat":"undo redo | blocks | link",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:18px }",placeholder:l||"Type something ...",content_css:i?"/styles/tiny.css":void 0,statusbar:!!i}}),i&&n&&(0,s.jsx)(g,{editorRef:n})]})}var b=l(63715),y=l(46437),j=l(51548),v=l(58548);function k({data:e,user:t}){let l=!!e?.title,[n,c]=a().useState(!1),[o,d]=a().useState(e?.level),[h,u]=a().useState(e?.page_order),[x,m]=a().useState(null),[p,g]=a().useState(null),k=a().useRef(),N=a().useRef();return(0,s.jsx)(a().Fragment,{children:(0,s.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,s.jsxs)("div",{className:"mb-1",children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("h2",{className:"text-xl m-0",children:l?"Update page":"Create a new Docs Page"})]}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(v.A,{user:t})}),(0,s.jsxs)("div",{className:"paper flex-col items-stretch gap-10 w-full relative",children:[n&&(0,s.jsx)(i.A,{}),(0,s.jsxs)("form",{onSubmit:t=>{t.preventDefault(),c(!0);let s=t.target.title,n=N.current?.getDoc(),a=k.current?.getDoc();function r(e){let t=e.href;t?.match(/\~/)&&(e.href=t.replace(/.*?\~\//,"/")),t?.match(/\.\.\//)&&(e.href=t.replace(/.*?\.\.\//,"/"))}n?.querySelectorAll(".target-node").forEach(e=>e.classList.remove("target-node")),n?.querySelectorAll("a").forEach(e=>{r(e)}),a?.querySelectorAll("a").forEach(e=>{r(e)});let i=k.current?.getContent(),d=N.current?.getBody().innerHTML,u=N.current?.getBody().innerText,x={title:s.value,description:i,content:d,text_content:u,level:o,page_order:h};l&&(x.id=e.id),p?.id&&(x.parent_id=p.id),(0,b.A)(`/api/admin/docs/${l?"update-page":"add-page"}`,{method:"post",body:x}).then(e=>{e.success?window.location.reload():(alert("Operation Failed!"),setTimeout(()=>{c(!1)},1e3))})},className:"flex flex-col gap-4 w-full",children:[(0,s.jsx)(r.A,{placeholder:"Enter a title",fontSize:"30px",name:"title",defaultValue:l?e.title:null}),(0,s.jsxs)("div",{className:"card no-hover",children:[(0,s.jsx)(r.A,{numberText:!0,placeholder:"Level",defaultValue:l?o:"1",maxWidth:"140px",minValue:1,maxValue:4,step:1,name:"page-level",title:"Page Level",setValue:d}),(0,s.jsx)(r.A,{numberText:!0,placeholder:"Level",defaultValue:l?h:"1",maxWidth:"140px",minValue:1,step:1,name:"page-order",title:"Page Order",setValue:u}),x&&Array.isArray(x)&&(0,s.jsx)(j.A,{selectOptions:x.map(e=>({title:e.title,payload:e.id,default:p?.id==e.id})),title:"Parent Page",required:!0,onChangeHandler:e=>{let t=x.filter(t=>t.id==e.target.value);t[0]?g(t[0]):window.alert("No Matching parent page!")}})]}),(0,s.jsx)(f,{placeholder:"Describe this page briefly",editorRef:k,blockObject:l?{content:e.description}:null,height:200}),(0,s.jsx)(f,{placeholder:"Page Content",editorRef:N,blockObject:l?{content:e.content}:null,height:600,extend:!0}),(0,s.jsx)("button",{type:"submit",children:l?"Update Page":"Add Page"})]})]})]})})}},23293:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},96725:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(82544).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},54677:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(82544).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},67216:(e,t,l)=>{let s=l(9973),n=l(31976),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function r(...e){try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=r},31976:(e,t,l)=>{let s=l(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!s.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5674.js b/dsql-app/.local_dist/server/chunks/5674.js deleted file mode 100644 index e63d15e..0000000 --- a/dsql-app/.local_dist/server/chunks/5674.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict";exports.id=5674,exports.ids=[5674],exports.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},91479:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(8732);function n({pages:e}){if(!e||!e[0])return null;let t=e?.filter(e=>1==e.level);return(0,r.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,r.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,r.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function t(s,n){return s.map((s,l)=>{let a=`${n}/${s.slug}`,o=e.filter(e=>2==e.level&&e.parent_id==s.id);return(0,r.jsxs)("li",{children:[(0,r.jsx)("a",{href:a,className:s?.level==1?"font-semibold":"text-slate-600",children:s.title}),o&&o[0]&&(0,r.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:t(o,a)})]},l)})}(t,"/docs")})]})}s(82015)},84895:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(8732);function n({title:e,description:t}){return(0,r.jsxs)("section",{className:"py-14",children:[(0,r.jsx)("div",{className:"w-full gap-10 justify-between items-start flex-col lg:flex-row relative z-10",children:(0,r.jsxs)("div",{className:"flex-col items-start max-w-[740px] text-left",style:{minWidth:"45%"},children:[(0,r.jsx)("h1",{className:"m-0 leading-tight",children:e}),(0,r.jsx)("span",{className:"font-normal text-xl -my-4",dangerouslySetInnerHTML:{__html:t}})]})}),(0,r.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}s(82015)},6845:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(63715);function n({setUser:e}){let t=localStorage.getItem("user");if(t)try{e(JSON.parse(t));return}catch(t){e({});return}(0,r.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let s=t.user?t.user:{};e(s),localStorage.setItem("user",JSON.stringify(s))}).catch(e=>{console.log(e)})}},69436:(e,t,s)=>{let r=s(29021),n=s(22373),l=s(9973),a=s(31976),o=l({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,charset:"utf8mb4",ssl:a()}});e.exports=async function(...e){let t;"production".match(/dev/)&&r.appendFileSync("./.tmp/sqlQuery.sql",e[0]+"\n"+Date()+"\n\n\n","utf8");try{t=await new Promise((t,s)=>{o.query(...e,(e,s,r)=>{e?t({error:e.message}):t(s)})}),await o.end()}catch(e){r.appendFileSync("./.tmp/dbErrorLogs.txt",JSON.stringify(e,null,4)+"\n"+Date()+"\n\n\n","utf8"),t=null,n({component:"dbHandler",message:e.message})}return t?JSON.parse(JSON.stringify(t)):null}},22373:(e,t,s)=>{let r=s(29021),{IncomingMessage:n}=s(81630);e.exports=async function({user:e,message:t,component:s,noMail:n,req:l}){let a=new Date,o=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],t=l.headers["x-real-ip"],s=l.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||r||t||l.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== -Error Message: ${t} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),l?.url&&(n+=` -URL: ${l.url}`),l?.body&&(n+=` -Request Body: ${JSON.stringify(l.body,null,4)}`),o&&(n+=` -IP: ${o}`),n+=` -Date: ${a.toDateString()} -========================================`,r.existsSync("./.tmp/error.log")||r.writeFileSync("./.tmp/error.log","","utf-8");let i=r.readFileSync("./.tmp/error.log","utf-8");r.writeFileSync("./.tmp/error.log",n),r.appendFileSync("./.tmp/error.log",` - - - - -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},31976:(e,t,s)=>{let r=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!r.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var r=s(8732);s(82015);var n=s(20883);function l(e){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5839.js b/dsql-app/.local_dist/server/chunks/5839.js new file mode 100644 index 0000000..af2c772 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/5839.js @@ -0,0 +1 @@ +"use strict";exports.id=5839,exports.ids=[5839],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},67325:(e,a,t)=>{t.d(a,{A:()=>o});var l=t(8732);t(82015);var i=t(91140),s=t(83158),n=t(82544);let d=(0,n.A)("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]),r=(0,n.A)("FileVideo2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);function o({user:e}){return(0,l.jsx)(i.Ay,{title:"choose-media-type-popoup",noContainer:!0,wrapperClasses:"items-center",wrapperStyle:{alignItems:"center"},children:(0,l.jsxs)("div",{className:"paper items-center max-w-2xl m-auto z-50 p-4 xl:p-10",children:[(0,l.jsxs)("h4",{className:"m-0 text-center text-lg leading-tight",children:["What kind of Media do you",(0,l.jsx)("br",{}),"want to upload?"]}),(0,l.jsx)("span",{children:"Please Select the media type to upload."}),(0,l.jsxs)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:[(0,l.jsxs)("div",{className:"card cursor-pointer",onClick:a=>{if(e?.verification_status?.toString().match(/1/)){let e=document.getElementById("upload_image_input");e?.click()}else alert("Please Verify to Add Media");setTimeout(()=>{(0,i.fs)()},500)},children:[(0,l.jsx)(s.A,{size:50,className:"text-primary"}),(0,l.jsxs)("div",{className:"content",children:[(0,l.jsx)("span",{className:"title",children:"Images"}),(0,l.jsx)("span",{className:"text-sm",children:"General image formats like JPEG, PNG, SVG, WEBP, etc."})]})]}),(0,l.jsxs)("div",{className:"card cursor-pointer",onClick:a=>{e?.verification_status?.toString().match(/1/)?document.getElementById("upload_file_input")?.click():alert("Please Verify to Add Media"),(0,i.fs)()},children:[(0,l.jsx)(d,{size:50,className:"text-secondary"}),(0,l.jsxs)("div",{className:"content",children:[(0,l.jsx)("span",{className:"title",children:"Files"}),(0,l.jsx)("span",{className:"text-sm",children:"Other documents type. Like PDF, XLSX, CSV, etc."})]})]})]}),(0,l.jsx)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:(0,l.jsxs)("div",{className:"card cursor-pointer",onClick:a=>{e?.verification_status?.toString().match(/1/)?document.getElementById("upload_video_input")?.click():alert("Please Verify to Add Media"),(0,i.fs)()},children:[(0,l.jsx)(r,{size:55,className:"text-slate-600"}),(0,l.jsxs)("div",{className:"content",children:[(0,l.jsx)("span",{className:"title",children:"Videos"}),(0,l.jsxs)("span",{className:"text-sm",children:["Video Files. ",(0,l.jsx)("b",{children:"MP4"})," for now. These files can be streamed. Max 200mb"]})]})]})})]})})}},91692:(e,a,t)=>{t.d(a,{A:()=>N});var l=t(8732),i=t(82015),s=t.n(i),n=t(46169),d=t(16757),r=t(82544);let o=(0,r.A)("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var c=t(58150);function m({folderName:e,folder:a,user:t}){let i=`${a?a+"/":""}${e}`,[r,m]=s().useState(!1);return(0,l.jsxs)("a",{href:`/admin/${t?.id}/media/${i}`,className:"card col items-center justify-center",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[r&&(0,l.jsx)(d.A,{}),(0,l.jsx)(o,{opacity:.5}),(0,l.jsx)("span",{className:"absolute top-4 left-4 text-xs bg-slate-200 dark:bg-slate-700 px-2 py-0.5 rounded-full",children:"Folder"}),(0,l.jsx)("span",{className:"",children:e}),(0,l.jsx)("button",{className:"plain-text absolute top-2 right-2",onClick:e=>{window.confirm("Delete this Folder and all its contents?")&&(m(!0),window.confirm("NOTE: this folder and all its contents will be permanently lost. Continue?")?(0,n.A)("/api/deleteMediaFolder",{method:"post",body:{folder:i}},!0).then(e=>{e.success&&window.location.reload()}):m(!1))},children:(0,l.jsx)(c.A,{})})]},e)}var u=t(91140),p=t(55904),h=t(58671);function x({mediaObject:e,staticHost:a}){let t=e.media_thumbnail_path?e?.private?e.media_thumbnail_url:`${a}${e.media_thumbnail_path}`:e.media_thumbnail_url,i=e.media_path?e?.private?e.media_url:`${a}${e.media_path}`:e.media_url;return(0,l.jsx)(s().Fragment,{children:e.media_type?.match(/file/i)?(0,l.jsx)("div",{className:"cursor-pointer hover:opacity-80",children:(0,l.jsx)("span",{className:"info w-auto small gray absolute top-4 right-4",children:e.media_type.replace(/.*\//,"").toUpperCase()})}):e.media_type?.match(/video/i)?(0,l.jsx)("video",{src:i,className:"w-full h-60 object-cover",controls:!0,muted:!0,autoPlay:!0,loop:!0}):(0,l.jsx)("img",{src:t,alt:e.media_name,className:"w-full h-60 object-cover bg-slate-200 rounded",onError:a=>{e?.private||(0,n.A)("/api/purgeDb",{method:"post",body:{paradigm:"user_media",payload:e}},!0).then(e=>{e.success?window.location.reload():(console.log(e),console.log(t),console.log(i))})}})})}var f=t(16230);function g({mediaObject:e,staticHost:a}){return(e.media_thumbnail_path?e.media_thumbnail_path:e.media_thumbnail_url,e.media_path?e.media_path:e.media_url,e?.private)?(0,l.jsx)(s().Fragment,{}):(0,l.jsxs)("div",{className:"dropdown-wrapper w-full xl:w-auto",children:[(0,l.jsx)("button",{className:"outlined secondary small-text w-full hidden xl:flex bg-secondary/10",children:"Copy Link"}),(0,l.jsx)("div",{className:"dropdown mobile-transform gap-2 w-full",children:(0,l.jsxs)(p.A,{column:!0,className:"w-full mb-2 xl:mb-0",children:[(0,l.jsx)("button",{className:"gray outlined normal-weight more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_url||"").then(()=>{alert(`Media url ${e.media_url} Copied to clipboard`)})},children:"Copy Full Link"}),!e?.media_type?.match(/file|video/i)&&(0,l.jsx)("button",{className:"gray outlined normal-weight more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_thumbnail_url||"").then(()=>{alert(`Media url ${e.media_thumbnail_url} Copied to clipboard`)})},children:"Copy Thumbnail Link"})]})})]})}var y=t(17855);let w=(0,r.A)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);function j({mediaObject:e,setLoading:a}){let[t,i]=s().useState(!1);return e?.media_type?.match(/video/i)?null:(0,l.jsx)("button",{className:"light-gray p-2 w-8 h-8 rounded-full absolute top-4 left-4 bg-white"+(e?.private?" ":" text-slate-400 fill-slate-400"),style:{backgroundColor:"white"},onClick:t=>{let l=e.private?"This media is private: Make it public?":"Make this media Private?";window.confirm(l)&&(a(!0),(0,n.A)("/api/media/addPrivateMedia",{method:"post",body:{...e}},!0).then(e=>{e.success?window.location.reload():window.alert("Action Failed!"),setTimeout(()=>{a(!1)},1e3)}).catch(e=>{console.log(e)}))},children:e?.private?(0,l.jsx)(y.A,{size:20,color:"green"}):(0,l.jsx)(w,{color:"black",size:20})})}function b({mediaObject:e,setTargetMedia:a,folder:t,staticHost:i}){let[n,r]=s().useState(!!e?.private),[o,c]=s().useState(e);o.media_thumbnail_path?o.media_thumbnail_path:o.media_thumbnail_url;let m=o.media_path?`${i}/${o.media_path}`:o.media_url;return(0,l.jsxs)("div",{className:"media-card card col min-h-[200px]",onClick:e=>{if(!(e.target.closest("button")||e.target.closest(".button"))){if(o.media_type?.match(/file/i)&&!o.private){window.open(m,"__blank");return}o.media_type?.match(/file/i)&&o.private||(a(o),(0,u.PB)("target-media-popup"))}},onMouseEnter:e=>{e.target.closest(".media-card").style.zIndex="10"},onMouseLeave:e=>{e.target.closest(".media-card").style.zIndex="0"},style:o?.private?{outline:"5px solid var(--sec-color-light)",borderColor:"var(--sec-color-lighter)"}:{},children:[n&&(0,l.jsx)(d.A,{}),(0,l.jsx)(x,{mediaObject:o,staticHost:i}),(0,l.jsxs)("div",{className:"flex-col items-center xl:items-start flex-wrap w-full mt-auto",children:[(0,l.jsx)("span",{className:"w-full",style:{wordBreak:"break-all"},children:o.media_name}),(0,l.jsx)("div",{className:"flex-wrap w-full",children:(0,l.jsxs)(p.A,{className:"flex-wrap w-full items-stretch",children:[(0,l.jsx)("button",{className:"secondary small-text relative w-full xl:w-auto mb-2 xl:mb-0",onClick:e=>{(0,h.A)({mediaObject:o,fileName:m?.match(/[^\/]+$/)?.[0]||"",setLoading:r})},children:(0,l.jsx)("span",{children:"Download"})}),(0,l.jsx)(g,{mediaObject:o,staticHost:i}),(0,l.jsx)(f.A,{mediaObject:o,setLoading:r})]})})]}),(0,l.jsx)(j,{mediaObject:o,setLoading:r})]})}t(21756);let v=(0,r.A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);function N({media:e,setTargetMedia:a,folders:t,folder:i,staticHost:n,user:d}){return(0,l.jsx)(s().Fragment,{children:(0,l.jsxs)("section",{className:"paper overflow-visible",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:"Media List"}),(0,l.jsxs)("div",{className:"w-full gap-4 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 items-stretch",children:[t&&t[0]&&t.map(e=>(0,l.jsx)(m,{folder:i,folderName:e,user:d},e)),e&&e[0]&&e.map(e=>(0,l.jsx)(b,{mediaObject:e,setTargetMedia:a,folder:i,staticHost:n},e.id))]}),!e?.[0]&&(0,l.jsx)(A,{})]})})}function A(){return(0,l.jsxs)("div",{className:"button outlined gray dashed w-full p-10 flex-col",onClick:e=>{(0,u.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"text-slate-400",children:"No Media Added."}),(0,l.jsx)(v,{}),(0,l.jsx)("span",{className:"",children:"Add Media"})]})}},94198:(e,a,t)=>{let l;t.d(a,{A:()=>c});var i=t(8732),s=t(82015),n=t.n(s),d=t(46169),r=t(91140),o=t(16757);function c({folder:e}){let[a,t]=n().useState(!1),[s,c]=n().useState(!1);return(0,i.jsxs)(r.Ay,{title:"add-folder-popoup",children:[(0,i.jsx)("h4",{className:"m-0",children:"Add A New Folder"}),(0,i.jsxs)("div",{className:"flex-col w-full relative",children:[a&&(0,i.jsx)(o.A,{}),(0,i.jsxs)("form",{onSubmit:a=>{a.preventDefault(),window.clearTimeout(l),t(!0);let i=a.target;(0,d.A)("/api/addNewMediaFolder",{method:"post",body:{name:(e?`${e}/`:"")+i["new-folder-name"].value}},!0).then(e=>{e.success?window.location.reload():t(!1)})},className:"w-full flex flex-col items-stretch gap-2",children:[s&&(0,i.jsx)("span",{className:"text-xs text-orange-700 bg-orange-100 flex items-center justify-center rounded px-2 py-1",children:"Folder Already Exists. Please Change the name."}),(0,i.jsx)("input",{type:"text",name:"new-folder-name",id:"new-folder-name",placeholder:"New Folder Name",className:"w-full"+(s?" warning":""),onChange:a=>{a.target.value=a.target.value.toLocaleLowerCase().replace(/ /g,"-"),window.clearTimeout(l),l=setTimeout(()=>{(0,d.A)(`/api/checkExistingFolder?name=${a.target.value}${e?"&folder="+e:""}`).then(e=>{a.target.value?.match(/./)&&e?.success?(c(!0),alert("Folder Already Exists")):c(!1)})},500)}}),(0,i.jsx)("button",{children:"Add New Folder"})]})]})]})}},87081:(e,a,t)=>{t.d(a,{A:()=>f});var l=t(8732),i=t(82015),s=t.n(i),n=t(46169),d=t(72390),r=t(91140),o=t(16757),c=t(17855);let m=(0,t(82544).A)("LockKeyholeOpen",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}],["path",{d:"M7 10V7a5 5 0 0 1 9.33-2.5",key:"car5b7"}]]);function u({mediaObject:e}){let[a,t]=i.useState(!1);return i.useEffect(()=>{e.private=a},[a]),(0,l.jsx)("button",{className:"light-gray p-2 w-8 h-8 rounded-full absolute top-2 left-2 bg-white"+(a?" ":" text-slate-400 fill-slate-400"),style:{backgroundColor:"white"},onClick:e=>{t(e=>!e)},children:a?(0,l.jsx)(c.A,{}):(0,l.jsx)(m,{})})}var p=t(58150);function h({imageObject:e,newMedia:a,setNewMedia:t,video:i}){let s=e.imageBase64Full||e.fileBase64Full,n=e.imageName||e.fileName;return(0,l.jsxs)("div",{className:"border border-slate-300 rounded max-h-44 flex-col w-full overflow-hidden h-full bg-slate-200 relative p-2",children:[i?(0,l.jsx)("video",{src:s,className:"w-full h-full object-contain",muted:!0,autoPlay:!0,controls:!0}):(0,l.jsx)("img",{src:s,alt:n,className:"w-full h-full object-contain"}),(0,l.jsx)("input",{type:"text",defaultValue:n,onInput:a=>{let t=a.target.value?.replace(/ /g,"-");e.fileName&&(e.fileName=t),e.imageName&&(e.imageName=t)},className:"absolute bottom-1 text-sm left-2 px-2 py-1",style:{width:"calc(100% - 15px)"}}),(0,l.jsx)("button",{className:"outlined bg-white absolute top-2 right-2 p-1 w-8 h-8 rounded-full",style:{backgroundColor:"white",borderColor:"var(--slate-200)"},onClick:l=>{let i=a.findIndex(a=>a.imageBase64===e.imageBase64||a.fileBase64===e.fileBase64);a.splice(i,1),t([...a])},children:(0,l.jsx)(p.A,{size:16})}),!i&&(0,l.jsx)(u,{mediaObject:e})]})}function x({fileObject:e,newFile:a,setNewFile:t}){return(0,l.jsxs)("div",{className:"border border-slate-300 rounded min-h-[100px] flex-col w-full overflow-hidden h-full bg-slate-200 relative p-2",children:[(0,l.jsx)("input",{type:"text",defaultValue:e.fileName,onInput:a=>{e.fileName=a.target.value?.replace(/ /g,"-")},className:"absolute bottom-1 text-sm left-2 px-2 py-1",style:{width:"calc(100% - 15px)"}}),(0,l.jsx)("button",{className:"outlined bg-white absolute top-2 right-2 p-1 w-8 h-8 rounded-full",style:{backgroundColor:"white",borderColor:"var(--slate-200)"},onClick:l=>{let i=a.findIndex(a=>a.fileBase64===e.fileBase64);a.splice(i,1),t([...a])},children:(0,l.jsx)(p.A,{size:16})}),(0,l.jsx)(u,{mediaObject:e})]})}function f({newMedia:e,setNewMedia:a,newFile:t,setNewFile:i,newVideo:c,setNewVideo:m,folder:u}){let p=e?.[0]?"images":t?.[0]?"files":"videos",f=p?.match(/image/i)?e:p?.match(/file/i)?t:c,g=p?.match(/image/i)?a:p?.match(/file/i)?i:m,[y,w]=s().useState(!1);return(0,l.jsxs)(r.Ay,{title:"new-media-popup",closePopupDispatch:()=>{a(null),i(null),m(null)},children:[y&&(0,l.jsx)(o.A,{screen:!0}),(0,l.jsx)("h4",{className:"m-0",children:"Upload New Media"}),(0,l.jsx)("div",{className:"grid grid-cols-2 gap-4 w-full",children:f&&f[0]&&f.map((e,a)=>p?.match(/image/i)?(0,l.jsx)(h,{imageObject:e,newMedia:f,setNewMedia:g},a+1):p?.match(/video/i)?(0,l.jsx)(h,{imageObject:e,newMedia:f,setNewMedia:g,video:!0},a+1):(0,l.jsx)(x,{fileObject:e,newFile:f,setNewFile:g},a+1))}),f&&f[0]&&(0,l.jsx)("button",{className:"py-3 w-full relative z-50"+(y?" pointer-events-none opacity-40":""),onClick:e=>{w(!0);let a=p?.match(/image/i)?{type:p,folder:u,media:f.map(e=>({imageBase64:e.imageBase64,imageName:e.imageName,imageSize:e.imageSize,private:e.private}))}:{type:p,folder:u,media:f.map(e=>({fileBase64:e.fileBase64,fileName:e.fileName,fileSize:e.fileSize,fileType:e.fileType,private:e.private,video:!!p?.match(/video/i)}))};(0,n.A)("/api/addUserMedia",{method:"post",body:a},!0).then(e=>{e.success?(0,d.A)().then(()=>{window.location.reload()}):(alert("Image Upload Failed"),console.log(e),setTimeout(()=>{w(!1)},1e3))})},children:"Upload Media"})]})}},14865:(e,a,t)=>{t.d(a,{A:()=>x});var l=t(8732),i=t(82015),s=t.n(i),n=t(46169),d=t(72390),r=t(91140),o=t(16757),c=t(55904),m=t(58671);t(21756);let u=(0,t(82544).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var p=t(6070),h=t(16230);function x({targetMedia:e,staticHost:a,setTargetMedia:t,media:i}){e?.media_thumbnail_path?e?.media_thumbnail_path:e?.media_thumbnail_url;let x=e?.media_path?`${a}/${e?.media_path}`:e?.media_url,f=!!e?.media_type?.match(/video/i),g=e?i.findIndex(a=>a.id==e.id):null,y="number"==typeof g&&g>=0,w=(()=>{if(!y)return null;let e=i[g+1];return e?e?.media_type?.match(/image/i)?e:i.slice(g+1).find(e=>!!e.media_type?.match(/image/i))||null:null})(),j=(()=>{if(!y)return null;let e=i[g-1];return e?e?.media_type?.match(/image/i)?e:i.slice(0,g-1).findLast(e=>!!e.media_type?.match(/image/i))||null:null})(),[b,v]=s().useState(!!e?.private),[N,A]=s().useState(!1),[k,_]=s().useState(x),M=s().useRef();return(0,l.jsxs)(r.Ay,{title:"target-media-popup",noContainer:!0,fullPage:!0,closePopupDispatch:()=>{A(!1),t(null)},children:[b&&(0,l.jsx)(o.A,{}),!N&&(0,l.jsx)(o.A,{}),e&&(0,l.jsxs)(s().Fragment,{children:[(0,l.jsxs)("div",{className:"self-center h-screen py-4",children:[k?f?(0,l.jsx)("video",{src:k,className:"w-full h-full object-cover",controls:!0,muted:!0,autoPlay:!0,loop:!0,onCanPlay:()=>{A(!0)},style:N?void 0:{display:"none"}}):(0,l.jsx)("img",{src:k,alt:e.media_name,className:"bg-slate-200 rounded w-full h-full object-contain",ref:M,onLoad:e=>{A(!0)},style:N?void 0:{display:"none"}}):(0,l.jsx)(l.Fragment,{}),j&&(0,l.jsx)("div",{className:"absolute left-5 md:left-10 z-[100] cursor-pointer p-5 bg-slate-800/40 rounded-full",onClick:e=>{t(null),t(j)},children:(0,l.jsx)(u,{color:"white"})}),w&&(0,l.jsx)("div",{className:"absolute right-5 md:right-10 z-[100] cursor-pointer p-5 bg-slate-800/40 rounded-full",onClick:e=>{t(null),t(w)},children:(0,l.jsx)(p.A,{color:"white"})})]}),(0,l.jsx)("span",{className:"info gray absolute top-5 left-5 w-auto mr-5",style:{backgroundColor:"white"},children:e.media_path?.replace(/.*\//,"")}),(0,l.jsx)("div",{className:"absolute bottom-6 left-6 p-1 bg-white dark:bg-slate-900 rounded z-20 hidden lg:flex flex-col items-stretch min-w-[200px]",children:(0,l.jsxs)(c.A,{column:!0,children:[(0,l.jsx)(h.F,{mediaObject:e,setLoading:v}),(0,l.jsx)("button",{className:"outlined secondary more-padding",onClick:a=>{(0,m.A)({mediaObject:e,fileName:e.media_url?.match(/[^\/]+$/)?.[0]||"",setLoading:v})},children:"Download"}),(0,l.jsx)("button",{onClick:a=>{window.confirm("Delete this media?")&&(0,n.A)("/api/deleteUserMedia",{method:"post",body:e},!0).then(e=>{e.success?(0,d.A)().then(()=>{window.location.reload()}):alert("Media deletion Failed! Please try again.")})},className:"more-padding",children:"Delete"}),!e?.private&&(0,l.jsxs)(s().Fragment,{children:[(0,l.jsx)("button",{className:"outlined gray w-full bg-white more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_url||"").then(()=>{alert(`Media url ${e.media_url} Copied to clipboard`)})},children:"Copy Full Image Link"}),(0,l.jsx)("button",{className:"outlined gray w-full more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_thumbnail_url||"").then(()=>{alert(`Media url ${e.media_thumbnail_url} Copied to clipboard`)})},style:{borderTop:"1px solid #0b8862"},children:"Copy Image Thumbnail Link"})]})]})})]})]})}},16230:(e,a,t)=>{t.d(a,{A:()=>d,F:()=>r});var l=t(8732);t(82015);var i=t(46169),s=t(72390),n=t(55904);function d({mediaObject:e,setLoading:a}){return(0,l.jsxs)("div",{className:"dropdown-wrapper w-full xl:w-auto",children:[(0,l.jsx)("button",{className:"outlined gray small-text hidden xl:flex",children:"More"}),(0,l.jsx)("div",{className:"dropdown mobile-transform gap-2 w-full",children:(0,l.jsxs)(n.A,{column:!0,className:"w-full mb-2 xl:mb-0",children:[(0,l.jsx)(r,{mediaObject:e,setLoading:a}),(0,l.jsx)("button",{className:"outlined gray normal-weight more-padding w-full xl:w-auto",onClick:a=>{window.confirm("Delete this media?")&&(0,i.A)("/api/deleteUserMedia",{method:"post",body:e},!0).then(e=>{e.success?(0,s.A)().then(()=>{window.location.reload()}):alert("Media deletion Failed! Please try again.")})},children:"Delete"})]})})]})}function r({mediaObject:e,setLoading:a}){return(0,l.jsx)("button",{onClick:t=>{let l=window.prompt("Rename media",e.media_name);l&&window.confirm(`Rename "${e.media_name}" to "${l}"`)&&(a(!0),(0,i.A)("/api/renameMedia",{method:"post",body:{mediaObject:e,newName:l.replace(/ /g,"-"),newThumbnailName:l.replace(/ /g,"-")+"_thumbnail"}},!0).then(e=>{e.success?window.location.reload():(window.alert(e.msg),setTimeout(()=>{a(!1)},1e3))}))},className:"outlined gray normal-weight more-padding",children:"Rename"})}},91140:(e,a,t)=>{t.d(a,{Ay:()=>d,PB:()=>r,fs:()=>o});var l=t(8732),i=t(58150),s=t(82015),n=t.n(s);function d({children:e,title:a,data:t,fullPage:s,wrapperClasses:d,closePopupDispatch:r,wrapperStyle:c,noContainer:m}){return s?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":a||null,style:c,children:[m?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{o(),r&&r()},children:(0,l.jsx)(i.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{o(),r&&r()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[m?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{o(),r&&r()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),m&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{o(),r&&r()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{o(),r&&r()}})]})}function r(e,a){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",a?.(t))}function o(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},43430:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);t(82015);var i=t(83921);function s({setNewFile:e,setLoading:a}){return(0,l.jsx)("div",{children:(0,l.jsx)("input",{type:"file",name:"upload_file_input",id:"upload_file_input",className:"hidden",accept:".xlsx,.pdf,.csv,.json",multiple:!0,onChange:async t=>{a&&a(!0);let l=[],s=t.target.files;if(s?.length){for(let e=0;e{a&&a(!1)},200)}else window.alert("No Files selected")}})})}},81145:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);t(82015);var i=t(65842);function s({setNewMedia:e,setLoading:a}){return(0,l.jsx)("div",{children:(0,l.jsx)("input",{type:"file",name:"upload_image_input",id:"upload_image_input",className:"hidden",accept:"image/*",multiple:!0,onChange:async t=>{a&&a(!0);let l=[],s=t.target.files;if(s?.length){for(let e=0;e{a&&a(!1)},200)}else window.alert("No Files selected")}})})}},10839:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);t(82015);var i=t(83921);function s({setNewVideo:e,setLoading:a}){return(0,l.jsx)("div",{children:(0,l.jsx)("input",{type:"file",name:"upload_video_input",id:"upload_video_input",className:"hidden",accept:".mp4",multiple:!0,onChange:async t=>{a&&a(!0);let l=[],s=t.target.files;if(s?.length){for(let e=0;e{a&&a(!1)},200)}else window.alert("No Videos selected")}})})}},66485:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(8732);function i(){return(0,l.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,l.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}t(82015)},55904:(e,a,t)=>{t.d(a,{A:()=>n});var l=t(8732),i=t(82015),s=t.n(i);function n({children:e,column:a,className:t}){let i=s().useRef();return(0,l.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(t?" "+t:""),ref:i,children:e})}},58671:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(21756);async function i({mediaObject:e,fileName:a,setLoading:t}){let i;t&&t(!0);let s=!!(e?.private||e?.media_url?.match(/^\@/));i=s?await (0,l.A)({url:e.media_url||""}):await fetch("/api/fetch-media?url="+e.media_url);let n=s?i:await i.blob(),d=s?i:URL.createObjectURL(n),r=document.createElement("a");r.href=d,r.download=a,r.style.display="none",document.body.appendChild(r),r.click(),URL.revokeObjectURL(d),document.body.removeChild(r),setTimeout(()=>{t&&t(!1)},500)}},21756:(e,a,t)=>{t.d(a,{A:()=>l});async function l({url:e}){return new Promise((a,t)=>{fetch("/api/media/getPrivateMedia",{method:"POST",body:JSON.stringify({path:e}),headers:{[localStorage.getItem("csrf")||"none"]:"true"}}).then(e=>e.blob()).then(e=>{a(URL.createObjectURL(e))})})}},65842:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(76102);let i=t.n(l)().media.imageInputFileToBase64},83921:(e,a,t)=>{t.d(a,{A:()=>l});async function l({inputFile:e}){try{let a=e.name.replace(/\..*/,""),t=await new Promise((a,t)=>{var l=new FileReader;l.readAsDataURL(e),l.onload=function(){a(l.result)},l.onerror=function(e){console.log("Error: ",e.message)}});return{fileBase64:t.replace(/.*?base64,/,""),fileBase64Full:t,fileName:a,fileSize:e.size,fileType:e.type}}catch(a){return console.log("Image Processing Error! =>",a.message),{fileBase64:null,fileBase64Full:null,fileName:e.name,fileSize:null,fileType:null}}}},23293:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},6070:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},17855:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,a)=>{Object.defineProperty(a,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/5954.js b/dsql-app/.local_dist/server/chunks/5954.js new file mode 100644 index 0000000..b2e4e1f --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/5954.js @@ -0,0 +1 @@ +"use strict";exports.id=5954,exports.ids=[5954],exports.modules={55954:(e,s,t)=>{t.d(s,{A:()=>u});var l=t(8732),a=t(82015),n=t.n(a),i=t(46169),r=t(91140),d=t(16757),c=t(2913),o=t(80830);function u({targetUser:e,user:s,setTargetUser:a}){let u=t(49436);if(!e)return null;let[m,h]=n().useState(!0),[x,p]=n().useState([]),[b,f]=n().useState(!1),[g,j]=n().useState(e&&e.user_priviledge?.split("|")||[]),[v,w]=n().useState(e?.database_access?e.database_access.split("|"):[]),[_,N]=n().useState(e&&e.database_access?.split("|")[0]||null),[y,A]=n().useState([]),[k,S]=n().useState([]);return(0,l.jsxs)(r.Ay,{title:"target-user-popup",closePopupDispatch:()=>{a(void 0)},children:[m&&(0,l.jsx)(d.A,{position:"relative"}),!m&&e&&(0,l.jsx)(n().Fragment,{children:(0,l.jsxs)("div",{className:"flex-col w-full items-start p-4",children:[(0,l.jsxs)("h4",{className:"m-0",children:["Edit ",e.first_name," ",e.last_name,"'s Access"]}),(0,l.jsx)("hr",{}),(0,l.jsxs)("form",{className:"flex flex-col items-start w-full",onSubmit:s=>{s.preventDefault(),h(!0),(0,i.A)("/api/updateAdminUserAccess",{method:"post",body:{userObject:e,user_priviledge:g.join("|"),database_access:v?.join("|"),db_tables:v&&v[0]?k.join("|"):"",inv_user_id:e.invited_user_id}},!0).then(e=>{window.location.reload(),setTimeout(()=>{h(!1)},500)})},children:[(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"User Priviledges"}),(0,l.jsx)(c.A,{checkBoxValues:u.map(e=>({title:e,name:e,default:!!g.includes(e),onChangeHandler:s=>{g.includes(e)?j([...g.filter(s=>s!=e)]):j(s=>[...s,e])}})),smallText:!0,flexRow:!0}),(0,l.jsx)("hr",{className:"my-6"}),(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-2 text-slate-600",children:"Databases Access"}),(0,l.jsx)("span",{className:"button outlined gray px-4 py-1 -mt-1 mb-1.5",onClick:e=>{b?(x.forEach(e=>{setTimeout(()=>{let s=document.getElementById(e.db_slug);s?.checked&&s.click()},200)}),f(!1)):(x.forEach(e=>{setTimeout(()=>{let s=document.getElementById(e.db_slug);s.checked||s.click()},200)}),f(!0))},children:b?"Deselect All":"Select All"}),(0,l.jsx)(c.A,{checkBoxValues:x.map(e=>({title:e.db_name,name:e.db_slug,onChangeHandler:s=>{v.includes(e.db_slug)?w([...v.filter(s=>s!=e.db_slug)]):w(s=>[...s,e.db_slug]),v.length===x.length?f(!0):f(!1)},default:!!v.includes(e.db_slug)})),smallText:!0,flexRow:!0}),v&&v[0]&&(0,l.jsxs)(n().Fragment,{children:[(0,l.jsx)("hr",{className:"my-6"}),(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-2 text-slate-600",children:"Database Tables"}),(0,l.jsx)(o.A,{required:!0,selectOptions:x.filter(e=>v.includes(e.db_slug)).map(e=>({title:e.db_name,payload:e.db_slug})),name:"databases",onChangeHandler:e=>{N(e.target.value)}}),(0,l.jsx)("div",{className:"h-2"}),y&&y[0]&&(0,l.jsx)(c.A,{checkBoxValues:y.map(e=>({title:e.table_name,name:e.table_slug,onChangeHandler:s=>{k.includes(`${_}-${e.table_slug}`)?S([...k.filter(s=>s!=`${_}-${e.table_slug}`)]):S(s=>[...s,`${_}-${e.table_slug}`])},default:!!k.includes(`${_}-${e.table_slug}`)})),smallText:!0,flexRow:!0})]}),(0,l.jsx)("button",{className:"mt-4 w-full",children:"Update User Access"})]})]})})]})}},2913:(e,s,t)=>{t.d(s,{A:()=>a});var l=t(8732);function a({name:e,checkBoxValues:s,setAlert:t,labelColor:a,flexRow:n,baseText:i,smallText:r,className:d}){return(0,l.jsx)("div",{className:"flex items-start gap-x-4"+(n?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(d||""),children:s.map((s,n)=>{let{payload:d,title:c,onChangeHandler:o,fixed:u,jsx:m}=s,h=s.name?`${e}-${s.name}`:d?e+"-"+d:e;return(0,l.jsxs)("div",{className:"flex items-center"+(s.default&&u?" pointer-events-none":"")+(r?" gap-1 ":" gap-2 ")+(s?.className?s.className:""),children:[(0,l.jsx)("input",{className:"m-0"+(r?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!s.default,name:h,id:h,onChange:e=>{t&&t(null),o&&o(e,s)},value:d,style:{minWidth:"20px"},...s.props}),m||(0,l.jsx)("label",{htmlFor:h,className:"m-0 "+(a||"text-slate-800 dark:text-white/80")+(i||r?" text-base":" text-lg"),children:c})]},n+1)})})}t(82015)},80830:(e,s,t)=>{t.d(s,{A:()=>n});var l=t(8732),a=t(58526);function n({selectOptions:e,name:s,onChangeHandler:t,required:n,setAlert:i,title:r,defaultValue:d,info:c,id:o}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let s=e.target.closest(".info-wrapper"),t=s.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!t.classList.contains("hidden")){t.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&t.classList.contains("hidden"))){if(!s){t.classList.add("hidden");return}if(t.classList.contains("hidden")){t.classList.remove("hidden");return}t.classList.add("hidden")}}return(0,l.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[r&&(0,l.jsxs)("label",{htmlFor:s,children:[r,n?"":" (optional)"]}),(0,l.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,l.jsx)("select",{name:s,id:o||s,className:"w-full bg-white",required:n,onChange:e=>{i&&i(null),e.target.classList.remove("warning"),t&&t(e)},defaultValue:d||void 0,children:e.map((e,s)=>{let{payload:t,title:a}=e;return(0,l.jsx)("option",{value:t,selected:!!e.default,children:a},s+1)})}),(0,l.jsx)(a.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,l.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,l.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,l.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,l.jsx)("span",{children:c})}),(0,l.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,l.jsx)("div",{children:"Form Select Error"})}}t(82015)},49436:e=>{e.exports=JSON.parse('["Edit Tables","Update Entries","Create Table","Delete Entries","Delete Tables"]')}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/6160.js b/dsql-app/.local_dist/server/chunks/6160.js new file mode 100644 index 0000000..eeaff40 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/6160.js @@ -0,0 +1 @@ +"use strict";exports.id=6160,exports.ids=[6160],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},74153:(e,a,t)=>{t.d(a,{A:()=>p});var s=t(8732),l=t(82015),d=t.n(l),n=t(88791),i=t(91140),r=t(46169),c=t(16757),o=t(55904),h=t(6070);function p({database:e,setTargetDatabase:a,delegated:t,user:l}){let p=`/admin/${l?.id}/databases/${e.db_slug}`+(t?`?delegated=true&dbUserId=${e.user_id}`:""),{active_clone:x,active_clone_parent_db:m}=e,[u,y]=d().useState(!1);return(0,s.jsxs)("a",{href:p,className:"card",onClick:a=>{let s=a.target;(s.closest(".db-list-item-actions-block")||s.closest(".cancel-link"))&&a.preventDefault(),t&&(a.preventDefault(),y(!0),(0,r.A)("/api/getDelegatedDatabaseToken",{method:"post",body:{rootUserId:e.user_id,priviledges:e.user_priviledge,database:e.db_slug}},!0).then(e=>{e.success&&(window.location.href=p)}),setTimeout(()=>{y(!1)},1e3))},children:[u&&(0,s.jsx)(c.A,{width:"20px"}),(0,s.jsx)("img",{src:e.db_image?e.db_image:"/images/folder.svg",alt:"Folder Image",width:20,className:e.db_image?"avatar":"avatar opacity-50"}),(0,s.jsxs)("div",{className:"flex-col items-start grow",children:[(0,s.jsx)("span",{className:"title",children:e.db_name}),m&&(0,s.jsxs)("span",{className:"text-xs bg-emerald-100 dark:bg-emerald-100/10 text-emerald-700 dark:text-emerald-200 px-2 py-0.5 rounded-full mb-1",children:["This Database is an active Clone of"," ",(0,s.jsx)("b",{children:m.replace(/datasquirel_user_\d+_/,"")})]}),(0,s.jsx)("div",{className:"-mt-2",children:(0,s.jsx)(n.A,{slugText:e.db_slug,smaller:!0})}),(0,s.jsx)("div",{className:"-mt-1 gap-1",children:(0,s.jsx)(n.A,{slugText:e.db_full_name,smaller:!0,full:!0})}),!t&&(0,s.jsxs)("span",{className:"text-sm text-slate-400",children:["Created: ",e.date_created?.substring(0,21)]}),t&&(0,s.jsxs)("div",{className:"flex items-center mt-2",children:[(0,s.jsx)("img",{src:e.image_thumbnail,alt:"",className:"w-8 h-8 rounded-full object-cover"}),(0,s.jsxs)("div",{className:"flex-col items-start gap-0",children:[(0,s.jsxs)("span",{className:"text-xs text-slate-600",children:[e.first_name," ",e.last_name]}),(0,s.jsx)("span",{className:"text-xs text-slate-400",children:e.email})]})]}),(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsx)("div",{className:"db-list-item-actions-block flex-wrap",children:(0,s.jsxs)(o.A,{children:[!t&&(0,s.jsx)("button",{className:"outlined light-gray small-text",onClick:a=>{window.location.pathname=`/admin/${l?.id}/databases/${e.db_slug}/edit-database`},children:(0,s.jsx)("span",{children:"Edit"})}),!t&&!x&&(0,s.jsx)("button",{className:"outlined light-gray small-text",onClick:a=>{window.location.href=`/admin/${l?.id}/databases/add-database?duplicate=${e.db_full_name}`},children:(0,s.jsx)("span",{children:"Duplicate"})}),!t&&(0,s.jsx)("button",{className:"outlined light-gray small-text",onClick:t=>{a&&a(e),(0,i.PB)("delete-database-confirmation")},children:(0,s.jsx)("span",{children:"Delete"})})]})}),(0,s.jsx)(h.A,{className:"text-slate-600",size:20})]})]})]})}},56331:(e,a,t)=>{t.d(a,{A:()=>r});var s=t(8732),l=t(82015),d=t.n(l),n=t(74153);let i=(0,t(82544).A)("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);function r({databases:e,setTargetDatabase:a,title:t,more:l,user:r}){return(0,s.jsx)(d().Fragment,{children:(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:t||"Database List"}),r&&e&&e[0]&&a&&(0,s.jsx)("div",{className:"w-full grid grid-cols-1 sl:grid-cols-2 xl:grid-cols-3 items-stretch gap-6",children:e.map(e=>(0,s.jsx)(n.A,{database:e,setTargetDatabase:a,user:r},e.id))}),l&&e&&e[0]&&(0,s.jsx)("a",{href:`/admin/${r?.id}/databases`,className:"button w-full more-padding",children:"See All Databases"}),!e||!e[0]&&(0,s.jsxs)("a",{href:`/admin/${r?.id}/databases/add-database`,className:"button outlined gray dashed w-full p-10 flex-col",children:[(0,s.jsx)("span",{className:"text-slate-400",children:"No Databases Created."}),(0,s.jsx)(i,{}),(0,s.jsx)("span",{className:"",children:"Add Database"})]})]})})}},67274:(e,a,t)=>{t.d(a,{A:()=>r});var s=t(8732),l=t(82015),d=t.n(l),n=t(16757);t(46169);var i=t(74153);function r({user:e}){let[a,t]=d().useState(null),[l,r]=d().useState(!1);return(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Delegated Databases"}),l&&(0,s.jsx)(n.A,{}),e&&a?a[0]?(0,s.jsx)(d().Fragment,{children:(0,s.jsx)("div",{className:"w-full grid grid-cols-1 sl:grid-cols-2 xl:grid-cols-3 items-stretch gap-6",children:a.map(a=>(0,s.jsx)(i.A,{database:a,delegated:!0,user:e},a.id))})}):(0,s.jsx)(d().Fragment,{children:(0,s.jsx)("span",{className:"info gray w-full font-normal justify-center",children:"No Delegated Databases Yet"})}):(0,s.jsx)(d().Fragment,{children:(0,s.jsx)("div",{className:"w-full justify-center",children:(0,s.jsx)(n.A,{position:"relative",width:"20px"})})})]})}},70355:(e,a,t)=>{t.d(a,{A:()=>c});var s=t(8732),l=t(82015),d=t.n(l),n=t(46169),i=t(91140),r=t(16757);function c({targetDatabase:e}){let[a,t]=d().useState(!1);return(0,s.jsxs)(i.Ay,{title:"delete-database-confirmation",children:[a&&(0,s.jsx)(r.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.db_name?e.db_name:"This Database","' database?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(a?" pointer-events-none opacity-40":""),onClick:a=>{if(!e){alert("No Target Database Selected!");return}t(!0),window.confirm("Note that you will loose all data in this database. Continue?")?(0,n.A)("/api/deleteUserDatabase",{method:"post",body:e},!0).then(e=>{e.success&&window.location.reload()}):t(!1)},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},88791:(e,a,t)=>{t.d(a,{A:()=>d});var s=t(8732),l=t(96089);function d({slugText:e,smaller:a,outlined:t,full:d}){return(0,s.jsxs)("span",{className:"button break-words text-wrap cancel-link "+(t?" outlined gray":"light-gray")+(a?" small-text":""),onClick:a=>{navigator.clipboard.writeText(e).then(()=>{alert(`${d?"Database Full name":"Database Slug"} "${e}" Copied to Clipboard. Use this as the database name when querying data`)})},style:{wordWrap:"break-word",wordBreak:"break-all"},children:[(0,s.jsx)(l.A,{}),(0,s.jsx)("span",{children:e})]})}t(82015)},91140:(e,a,t)=>{t.d(a,{Ay:()=>i,PB:()=>r,fs:()=>c});var s=t(8732),l=t(58150),d=t(82015),n=t.n(d);function i({children:e,title:a,data:t,fullPage:d,wrapperClasses:i,closePopupDispatch:r,wrapperStyle:o,noContainer:h}){return d?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":a||null,style:o,children:[h?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),r&&r()},children:(0,s.jsx)(l.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),r&&r()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[h?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),r&&r()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),h&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),r&&r()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),r&&r()}})]})}function r(e,a){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",a?.(t))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},66485:(e,a,t)=>{t.d(a,{A:()=>l});var s=t(8732);function l(){return(0,s.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,s.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}t(82015)},55904:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(8732),l=t(82015),d=t.n(l);function n({children:e,column:a,className:t}){let l=d().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(t?" "+t:""),ref:l,children:e})}},23293:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},6070:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},96089:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,a)=>{Object.defineProperty(a,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/6202.js b/dsql-app/.local_dist/server/chunks/6202.js new file mode 100644 index 0000000..379f310 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/6202.js @@ -0,0 +1 @@ +"use strict";exports.id=6202,exports.ids=[6202],exports.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},91258:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8732),r=s(82015),n=s.n(r);function i({pageTitle:e,pageDescription:t,pagePathname:s,aceEditor:r}){return(0,a.jsxs)(n().Fragment,{children:[(0,a.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+s}),(0,a.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+s}),(0,a.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+s}),(0,a.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+s}),(0,a.jsx)("meta",{property:"og:title",content:e}),(0,a.jsx)("meta",{property:"og:description",content:t}),(0,a.jsx)("meta",{itemProp:"name",content:e}),(0,a.jsx)("meta",{itemProp:"description",content:t}),(0,a.jsx)("meta",{name:"twitter:title",content:e}),(0,a.jsx)("meta",{name:"twitter:description",content:t}),r&&(0,a.jsxs)(n().Fragment,{children:[(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},191:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8732);function r({image:e,title:t,description:s,color:r,imageHeight:n}){return(0,a.jsxs)("div",{className:"color-card shadow-xl"+(r?" "+("green"==r?"green":"gray"==r?"gray":""):""),children:[(0,a.jsx)("h3",{className:"title m-0 text-2xl",children:t}),s&&(0,a.jsx)("span",{className:"text-slate-600 dark:text-slate-400 text-left",children:s}),(0,a.jsx)("div",{className:"image-block",style:n?{height:`${n}px`}:void 0,children:(0,a.jsx)("img",{src:e,alt:`${t} Image`})})]})}function n({image:e,title:t,description:s,color:r,height:n,h2:i,url:o,cta:l}){return(0,a.jsxs)("div",{className:"contained-section shadow-xl"+(r?" "+("green"==r?"green":"gray"==r?"gray":"purple"==r?"purple":""):""),style:n?{height:`${n}px`}:void 0,children:[(0,a.jsxs)("div",{className:"content text-left",children:[i?(0,a.jsx)("h2",{className:"m-0 text-white",children:t}):(0,a.jsx)("h3",{className:"m-0 text-white",children:t}),s&&(0,a.jsx)("span",{className:"text-slate-400",children:s}),o&&l&&(0,a.jsx)("a",{href:o,className:"button mt-4",children:l})]}),(0,a.jsx)("div",{className:"image-block",children:(0,a.jsx)("img",{src:e,alt:`${t} Image`})}),(0,a.jsx)("img",{src:"/images/geometric-overlay.webp",className:"absolute z-0 left-0 top-0 w-full h-full opacity-80 mix-blend-overlay",alt:"Background Image"})]})}function i(){return(0,a.jsx)("section",{className:"py-20",children:(0,a.jsxs)("div",{className:"main-container flex-col items-center text-center",children:[(0,a.jsx)("h2",{className:"m-0 lg:text-left",children:"All your data storage needs in one place"}),(0,a.jsx)("p",{className:"m-0 ",children:"Datasquirel solves the hassle of storing data across different platforms using a centralized, easy-to-use, SQL-based cloud database administration system. Now you can have all your data in one place and retrieve from any location or environment using HTTP REST API calls and SQL queries."}),(0,a.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 w-full mt-10 gap-10",children:[(0,a.jsx)(r,{image:"/images/screenshots/databases-light.webp",title:"Data and Content",description:"Create databases, tables, dynamic datatypes including rich text, JSON and other editable code blocks",imageHeight:400}),(0,a.jsx)(r,{image:"/images/screenshots/media-list-white.webp",title:"Images, Videos, and other Media",description:"Static images automatically compressed with multiple format support, videos, pdf, excel documents, and more.",color:"green",imageHeight:400})]}),(0,a.jsx)("div",{className:"mt-10 w-full",children:(0,a.jsx)(n,{image:"/images/screenshots/tables-list-white.webp",title:"All the power of SQL without the hassle",description:"Indexes, Foreign keys, encryption, triggers, stored proceedures, etc. You get the best of both worlds: the full power of SQL, and the best UI yet to better manipulate your data.",cta:"Learn More",url:"/about",height:500})})]})})}s(82015)},57758:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(8732),r=s(92441);function n({user:e}){return(0,a.jsxs)("section",{className:"py-24 border-0 border-t border-b border-slate-100 dark:border-slate-100/10 border-solid",children:[(0,a.jsx)("div",{className:"w-full max-w-6xl gap-10 justify-between flex-col relative z-10",children:(0,a.jsxs)("div",{className:"flex-col items-center max-w-2xl text-center ",style:{minWidth:"45%"},children:[(0,a.jsx)("h2",{className:"m-0 leading-tight",children:"Get started For Free."}),(0,a.jsx)("span",{className:"text-lg font-normal",children:"Get Started At no cost. Learn how to create and retrieve data by viewing our documentation."}),(0,a.jsxs)("div",{className:"flex items-start justify-center w-full mt-4",children:[!e?.logged_in_status&&(0,a.jsx)("a",{href:"/create-account",className:"button",children:(0,a.jsx)("span",{className:"",children:"Sign Up For Free"})}),(0,a.jsxs)("a",{href:"/docs",className:"button outlined gray",children:[(0,a.jsx)(r.A,{}),(0,a.jsx)("span",{children:"See The Docs"})]})]})]})}),(0,a.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"})]})}s(82015)},82271:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(46169);function r({setUser:e}){let t=localStorage.getItem("user");if(t)try{e(JSON.parse(t));return}catch(t){e({});return}(0,a.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let s=t.user?t.user:{};e(s),localStorage.setItem("user",JSON.stringify(s))}).catch(e=>{console.log(e)})}},92441:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},5583:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var a=s(8732);s(82015);var r=s(20883);function n(){return(0,a.jsxs)(r.Html,{lang:"en",children:[(0,a.jsxs)(r.Head,{children:[(0,a.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,a.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,a.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,a.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,a.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,a.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,a.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,a.jsxs)("body",{children:[(0,a.jsx)(r.Main,{}),(0,a.jsx)(r.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/6521.js b/dsql-app/.local_dist/server/chunks/6521.js index ba2b266..3054a77 100644 --- a/dsql-app/.local_dist/server/chunks/6521.js +++ b/dsql-app/.local_dist/server/chunks/6521.js @@ -1 +1 @@ -"use strict";exports.id=6521,exports.ids=[6521],exports.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,y){return y in t?t[y]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,y)):"function"==typeof t&&"default"===y?t:void 0}}})},23293:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},6070:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},62338:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},96089:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},38552:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileCog",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2",key:"17k7jt"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"6",cy:"14",r:"3",key:"a1xfv6"}],["path",{d:"M6 10v1",key:"xs0f9j"}],["path",{d:"M6 17v1",key:"idyhc0"}],["path",{d:"M10 14H9",key:"m5fm2q"}],["path",{d:"M3 14H2",key:"19ot09"}],["path",{d:"m9 11-.88.88",key:"lhul2b"}],["path",{d:"M3.88 16.12 3 17",key:"169z9n"}],["path",{d:"m9 17-.88-.88",key:"5io96w"}],["path",{d:"M3.88 11.88 3 11",key:"1ynhy1"}]])},72935:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},46512:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileX2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m8 12.5-5 5",key:"b853mi"}],["path",{d:"m3 12.5 5 5",key:"1qls4r"}]])},71296:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},2833:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Grid2x2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M12 3v18",key:"108xh3"}]])},66916:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},2459:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},93213:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},10321:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},11717:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]])},98136:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{var y;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return y}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(y||(y={}))}}; \ No newline at end of file +"use strict";exports.id=6521,exports.ids=[6521],exports.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,y){return y in t?t[y]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,y)):"function"==typeof t&&"default"===y?t:void 0}}})},23293:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},6070:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},62338:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},96089:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},38552:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileCog",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2",key:"17k7jt"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"6",cy:"14",r:"3",key:"a1xfv6"}],["path",{d:"M6 10v1",key:"xs0f9j"}],["path",{d:"M6 17v1",key:"idyhc0"}],["path",{d:"M10 14H9",key:"m5fm2q"}],["path",{d:"M3 14H2",key:"19ot09"}],["path",{d:"m9 11-.88.88",key:"lhul2b"}],["path",{d:"M3.88 16.12 3 17",key:"169z9n"}],["path",{d:"m9 17-.88-.88",key:"5io96w"}],["path",{d:"M3.88 11.88 3 11",key:"1ynhy1"}]])},72935:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},46512:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FileX2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m8 12.5-5 5",key:"b853mi"}],["path",{d:"m3 12.5 5 5",key:"1qls4r"}]])},71296:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},2833:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Grid2x2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M12 3v18",key:"108xh3"}]])},66916:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},2459:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},93213:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},10321:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},11717:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]])},98136:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,y)=>{y.d(t,{A:()=>h});let h=(0,y(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return y}});var y=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/6622.js b/dsql-app/.local_dist/server/chunks/6622.js new file mode 100644 index 0000000..6877840 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/6622.js @@ -0,0 +1 @@ +"use strict";exports.id=6622,exports.ids=[6622],exports.modules={30671:(e,s)=>{Object.defineProperty(s,"M",{enumerable:!0,get:function(){return function e(s,t){return t in s?s[t]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,t)):"function"==typeof s&&"default"===t?s:void 0}}})},61197:(e,s,t)=>{t.d(s,{A:()=>l});var a=t(71205),r=t(41939);async function l(e){let{keyCookieName:s,csrfCookieName:t}=(0,r.A)(),l=`${s}_su`;if(!e.cookies?.[l])return console.log("No auth key cookie found"),null;let n=(0,a.A)({encryptedString:e.cookies[l]});if(!n)return console.log("No user payload found"),null;let i=JSON.parse(n);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},40778:(e,s,t)=>{t.d(s,{A:()=>b});var a=t(8732),r=t(82015),l=t.n(r),n=t(27912),i=t.n(n),c=t(50139),o=t(82544);let d=(0,o.A)("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);var h=t(25294);let u=(0,o.A)("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var x=t(2459);let p=(0,o.A)("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]),m=(0,o.A)("DatabaseBackup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]]),g=(0,o.A)("SquareChevronRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),j=(0,o.A)("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);function f(){let[e,s]=l().useState(!0);return(0,a.jsxs)("aside",{className:"aside"+(e?" mobile-collapsed":" mobile-expanded"),style:{maxWidth:e?"250px":"300px",zIndex:800},children:[(0,a.jsx)(c.A,{adminAside:!0,collapseAsideMobile:e,setCollapseAsideMobile:s}),(0,a.jsx)("hr",{className:"opacity-0 mt-4"}),(0,a.jsxs)("div",{className:"main-links"+(e?" hidden lg:flex":" "),children:[(0,a.jsxs)("a",{href:"/su","data-currentlink":"/su","data-strictlink":"true",children:[(0,a.jsx)(d,{size:20}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)("a",{href:"/su/users","data-currentlink":"/su/users",children:[(0,a.jsx)(h.A,{size:20}),(0,a.jsx)("span",{children:"Users"})]}),(0,a.jsxs)("a",{href:"/su/error-logs","data-currentlink":"/su/error-logs",children:[(0,a.jsx)(u,{size:20}),(0,a.jsx)("span",{children:"Error Logs"})]}),(0,a.jsxs)("a",{href:"/su/servers","data-currentlink":"/su/servers",children:[(0,a.jsx)(x.A,{size:20}),(0,a.jsx)("span",{children:"Servers"})]}),(0,a.jsxs)("a",{href:"/su/load-balancing","data-currentlink":"/su/load-balancing",children:[(0,a.jsx)(p,{size:20}),(0,a.jsx)("span",{children:"Load Balancing"})]}),!1,(0,a.jsxs)("a",{href:"/su/backups","data-currentlink":"/su/backups",children:[(0,a.jsx)(m,{size:20}),(0,a.jsx)("span",{children:"Backups"})]}),(0,a.jsxs)("a",{href:"/su/console","data-currentlink":"/su/console",children:[(0,a.jsx)(g,{size:20}),(0,a.jsx)("span",{children:"Console"})]}),(0,a.jsxs)("a",{href:"/su/envar","data-currentlink":"/su/envar",children:[(0,a.jsx)(j,{size:20}),(0,a.jsx)("span",{children:"Env"})]})]})]})}var y=t(81868),v=t(58526);function k({user:e,extraHeaderContent:s}){let[t,r]=l().useState(e||null);return(0,a.jsx)("section",{className:"overflow-visible w-full px-0 md:px-8 py-0 flex justify-center bg-white dark:bg-slate-800 shadow-lg gap-4 dark:shadow-black/10 z-50 shadow-slate-900/5",style:{zIndex:700,border:"none"},children:(0,a.jsxs)("div",{className:"w-full items-center justify-between gap-4 md:gap-8",children:[(0,a.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 px-4 xl:px-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto bg-white xl:bg-transparent pb-10 xl:pb-0",id:"main-nav-content-wrapper",children:[(0,a.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,a.jsx)("a",{href:"/",className:"hidden xl:flex",children:(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,a.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{border:"none"},children:(0,a.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,a.jsx)("div",{className:"flex items-center w-full gap-6 grow flex-col xl:flex-row justify-start xl:justify-between",children:(0,a.jsx)("div",{className:"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2",children:(0,a.jsxs)("div",{className:"ml-auto dropdown-wrapper",children:[(0,a.jsx)("div",{className:"bg-white rounded-full overflow-hidden",style:{width:"36px",height:"36px"},children:(0,a.jsx)("img",{src:"/images/user-preset-thumbnail.png",alt:"User Image",width:35,className:"w-full h-full object-cover"})}),(0,a.jsx)("span",{children:(0,a.jsx)("b",{children:"Super User"})}),(0,a.jsx)(v.A,{size:20}),(0,a.jsx)("div",{className:"dropdown",children:(0,a.jsx)("a",{href:"/su/logout",children:"Logout"})})]})})})]}),(0,a.jsx)("div",{className:"ml-2",children:(0,a.jsx)(y.A,{})}),(0,a.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})}function b({children:e,head:s,user:t}){return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)(i(),{children:[(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin.css"}),s]}),(0,a.jsxs)("div",{className:"admin w-full flex items-start gap-0",children:[(0,a.jsx)(f,{}),(0,a.jsxs)("main",{className:"relative",children:[(0,a.jsx)(k,{user:t}),(0,a.jsx)("div",{className:"flex-col items-start gap-6 px-4 sl:px-8 py-8 bg-slate-50 dark:bg-slate-900",children:e}),(0,a.jsx)("footer",{className:"flex justify-center w-full items-center p-4",children:(0,a.jsxs)("div",{className:"max-w-6xl w-full justify-center flex-wrap",children:[(0,a.jsxs)("a",{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Datasquirel Logo",width:30}),(0,a.jsx)("span",{className:"text-lg font-bold",children:"Datasquirel"})]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600 text-center",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/docs",children:"Docs"}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/terms",children:"Terms"})]})})]})]})]})}t(27550)},2459:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},25294:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},41939:(e,s,t)=>{t.d(s,{A:()=>a});function a(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",r=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=s;e?.userId&&(n+=`user_${e.userId}_`),l&&(n+=`${l}_`),n+=t;let i=s;e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),i+=a;let c=s;return e?.userId&&(c+=`user_${e.userId}_`),l&&(c+=`${l}_`),{keyCookieName:n,csrfCookieName:i,oneTimeCodeName:c+=r}}},71205:(e,s,t)=>{t.d(s,{A:()=>l});var a=t(55511),r=t(79428);function l({encryptedString:e,encryptionKey:s,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=s||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,a.scryptSync)(l,n,i),o=r.Buffer.alloc(16,0),d=(0,a.createDecipheriv)("aes-192-cbc",c,o);try{let s=d.update(e,"hex","utf8");return s+=d.final("utf8")}catch(s){return console.log("Error in decrypting =>",s.message),e}}},5583:(e,s,t)=>{t.r(s),t.d(s,{default:()=>l});var a=t(8732);t(82015);var r=t(20883);function l(){return(0,a.jsxs)(r.Html,{lang:"en",children:[(0,a.jsxs)(r.Head,{children:[(0,a.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,a.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,a.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,a.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,a.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,a.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,a.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,a.jsxs)("body",{children:[(0,a.jsx)(r.Main,{}),(0,a.jsx)(r.NextScript,{})]})]})}},9455:(e,s)=>{Object.defineProperty(s,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/6903.js b/dsql-app/.local_dist/server/chunks/6903.js new file mode 100644 index 0000000..243f43f --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/6903.js @@ -0,0 +1 @@ +"use strict";exports.id=6903,exports.ids=[6903],exports.modules={80830:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(8732),n=l(58526);function a({selectOptions:e,name:t,onChangeHandler:l,required:a,setAlert:i,title:r,defaultValue:c,info:o,id:d}){try{function h(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),l=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!l.classList.contains("hidden")){l.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&l.classList.contains("hidden"))){if(!t){l.classList.add("hidden");return}if(l.classList.contains("hidden")){l.classList.remove("hidden");return}l.classList.add("hidden")}}return(0,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[r&&(0,s.jsxs)("label",{htmlFor:t,children:[r,a?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:a,onChange:e=>{i&&i(null),e.target.classList.remove("warning"),l&&l(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:l,title:n}=e;return(0,s.jsx)("option",{value:l,selected:!!e.default,children:n},t+1)})}),(0,s.jsx)(n.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,s.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:h,onMouseLeave:h,onClick:h,children:[(0,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,s.jsx)("span",{children:o})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}l(82015)},59023:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(8732),n=l(23293);function a(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(n.A,{})})}l(82015)},53926:(e,t,l)=>{l.d(t,{A:()=>i});var s=l(8732),n=l(82015),a=l.n(n);function i({confirmedDelegetedUser:e,linksArray:t,user:l}){let[n,i]=a().useState(t||null);return n&&n[1]?(0,s.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:n.map((e,t,l)=>t===n.length-1?(0,s.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,s.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,s.jsx)(a().Fragment,{})}},55904:(e,t,l)=>{l.d(t,{A:()=>i});var s=l(8732),n=l(82015),a=l.n(n);function i({children:e,column:t,className:l}){let n=a().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(l?" "+l:""),ref:n,children:e})}},55016:(e,t,l)=>{l.d(t,{A:()=>k});var s=l(8732),n=l(82015),a=l.n(n),i=l(83155),r=l(16757),c=l(40373),o=l(55904),d=l(96725);function h({targetElement:e,setOpenStyleModal:t}){return e?(0,s.jsxs)("div",{className:"flex flex-col items-stretch p-6 max-w-lg",children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("span",{className:"text-xl",children:"Element Style"}),(0,s.jsx)("button",{className:"w-10 h-10 plain-text",onClick:()=>{t(!1)},children:(0,s.jsx)(d.A,{})})]}),(0,s.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded add-css-block",children:[(0,s.jsx)("input",{type:"text",placeholder:"CSS key"}),(0,s.jsx)("input",{type:"text",placeholder:"CSS Value",onKeyDownCapture:t=>{let l=t.target;if(t.key?.match(/enter/i)){let t=l.closest(".add-css-block")?.children[0],s=l.closest(".add-css-block")?.children[1],n=t?.value,a=s?.value;if(!n?.match(/./)||!a?.match(/./))return;e.style[n]=a}}}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".add-css-block")?.children[0],n=l.closest(".add-css-block")?.children[1],a=s?.value,i=n?.value;a?.match(/./)&&i?.match(/./)&&(e.style[a]=i)},children:"Add"})]}),(0,s.jsxs)("div",{className:"flex-wrap",children:[(0,s.jsx)("button",{onClick:t=>{e.removeAttribute("style")},className:"secondary grow",children:"Reset"}),(0,s.jsx)("button",{onClick:t=>{e.style.display="flex",e.style.alignItems="center",e.style.gap="10px"},className:"outlined black grow",children:"Flex"}),(0,s.jsx)("button",{onClick:t=>{e.style.backgroundColor="rgb(241 245 249)"},className:"outlined black grow",children:"BG-Slate-100"}),(0,s.jsx)("button",{onClick:t=>{e.style.backgroundColor="#F6F4F8"},className:"outlined black grow",children:"BG-Main-light"}),(0,s.jsx)("button",{onClick:t=>{e.style.padding="10px"},className:"outlined black grow",children:"Padding-10px"}),(0,s.jsx)("button",{onClick:t=>{e.style.padding="10px 20px"},className:"outlined black grow",children:"Padding-10px-20px"}),(0,s.jsx)("button",{onClick:t=>{e.style.borderRadius="5px"},className:"outlined black grow",children:"Border-Radius-5px"}),(0,s.jsx)("button",{onClick:t=>{e.style.border="1px solid rgb(241 245 249)"},className:"outlined black grow",children:"Border-Slate-100"}),(0,s.jsx)("button",{onClick:t=>{e.style.border="1px solid rgb(226 232 240)"},className:"outlined black grow",children:"Border-Slate-200"}),(0,s.jsx)("button",{onClick:t=>{e.style.border="1px solid rgb(203 213 225)"},className:"outlined black grow",children:"Border-Slate-300"})]}),(0,s.jsx)("span",{className:"font-semibold text-xl mt-4",children:"Add class Name"}),(0,s.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded add-class-name-block",children:[(0,s.jsx)("input",{type:"text",placeholder:"Class Name",onKeyDownCapture:t=>{let l=t.target,s=l.closest(".add-class-name-block")?.children[0];if(t.key?.match(/enter/i)){let t=s?.value;if(!t?.match(/./))return;e.classList.add(t)}}}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".add-class-name-block")?.children[0],n=s?.value;n?.match(/./)&&e.classList.add(n)},children:"Add"}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".add-class-name-block")?.children[0],n=s?.value;n?.match(/./)&&e.classList.remove(n)},className:"outlined",children:"Remove"})]}),e?.nodeName?.match(/^a$/i)?(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("span",{className:"font-semibold text-xl mt-4",children:"Add URL"}),(0,s.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded href-block",children:[(0,s.jsx)("input",{type:"text",placeholder:"Class Name",onKeyDownCapture:t=>{let l=t.target,s=l.closest(".href-block")?.children[0];if(t.key?.match(/enter/i)){let t=s?.value;if(!t?.match(/./))return;e.href=t}},defaultValue:e?.href}),(0,s.jsx)("button",{onClick:t=>{let l=t.target,s=l.closest(".href-block")?.children[0],n=s?.value;n?.match(/./)&&(e.href=n)},children:"Add"})]})]}):(0,s.jsx)(a().Fragment,{})]}):null}function u({targetElement:e,back:t}){if(!e)return;let l=e.nextElementSibling,s=e.previousElementSibling;!t&&l?l.after(e):t&&s&&s.before(e)}function x({editor:e,node:t,setTargetElement:l}){e.getDoc().querySelectorAll(".target-node").forEach(e=>{e.classList.remove("target-node")});let s=e.getWin(),n=s.getSelection()?.anchorNode?.parentElement,a=t||n||null;a&&(a?.classList?.add("target-node"),l&&l(a))}var m=l(54677);let p=(0,l(82544).A)("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);function g({editorRef:e}){let[t,l]=a().useState(null),[n,i]=a().useState(!1),[r,c]=a().useState(!1);return(0,s.jsxs)("div",{className:"absolute top-[60px] z-50 -left-[38px] w-[40px] flex flex-col items-end",style:{boxShadow:"0 0 40px rgba(15, 23, 42, 0.2)"},children:[(0,s.jsxs)(o.A,{column:!0,className:"gap-[1px]",children:[(0,s.jsx)("div",{onClick:()=>{x({editor:e.current,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button secondary",children:(0,s.jsx)("span",{children:"Click1"})}),(0,s.jsx)("div",{onClick:()=>{u({targetElement:t,back:!0})},style:{width:"40px",height:"40px"},className:"button dark",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{u({targetElement:t})},style:{width:"40px",height:"40px"},className:"button dark",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{c(!0)},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(p,{})}),(0,s.jsx)("div",{onClick:()=>{i(!0)},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(e.getWin(),!t)return;let s=t.cloneNode(!0);s.nodeName.match(/html|document|body/i)||(t.insertAdjacentElement("afterend",s),t.classList.remove("target-node"),l(s))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(e.getWin(),!t||t.nodeName.match(/html|document|body/i))return;let s=t.parentElement;s||(l(t),x({editor:e,node:t,setTargetElement:l})),s?.nodeName.match(/html|document|body/i)?(l(t),x({editor:e,node:t,setTargetElement:l})):s&&(l(s),x({editor:e,node:s,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(e.getWin(),!t)return;let s=t.children[0];s?(l(s),x({editor:e,node:s,setTargetElement:l})):(l(t),x({editor:e,node:t,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{className:"rotate-180"})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(!t)return;let s=t.previousElementSibling;s?(l(s),x({editor:e,node:s,setTargetElement:l})):(l(t),x({editor:e,node:t,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{!function({editor:e,targetElement:t,setTargetElement:l}){if(!t)return;let s=t.nextElementSibling;s?(l(s),x({editor:e,node:s,setTargetElement:l})):(l(t),x({editor:e,node:t,setTargetElement:l}))}({editor:e.current,targetElement:t,setTargetElement:l})},style:{width:"40px",height:"40px"},className:"button",children:(0,s.jsx)(m.A,{})}),(0,s.jsx)("div",{onClick:()=>{if(t){let s=t.parentNode;s.removeChild(t),x({editor:e.current,node:s,setTargetElement:l})}},style:{width:"40px",height:"40px"},className:"button bg-red-500",children:(0,s.jsx)(d.A,{})}),(0,s.jsx)("div",{onClick:()=>{e.current.getDoc().querySelectorAll(".target-node").forEach(e=>{e.classList.remove("target-node")}),l(null)},style:{width:"40px",height:"40px"},className:"button white",children:(0,s.jsx)(m.A,{})})]}),(0,s.jsx)("span",{children:(0,s.jsx)(h,{targetElement:t,setOpenStyleModal:i})})]})}function f({user:e,blockObject:t,placeholder:l,editorRef:n,height:i,extend:r}){let[o,d]=a().useState(!1);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(c.Editor,{tinymceScriptSrc:"https://datasquirel.com/tinymce-public/tinymce.min.js",onInit:(e,t)=>{if(r){let e=t.getBody();e.style.padding="40px",e.className="RTE-DOCS"}n&&(n.current=t)},initialValue:t&&t.content?t.content:"",init:{height:i||400,width:"100%",relative_urls:!1,remove_script_host:!1,menubar:!1,plugins:r?["advlist","autolink","lists","link","image","charmap","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","preview","help","wordcount","codesample"]:["link"],toolbar:r?"undo redo | blocks | bold italic forecolor | codesample link image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat":"undo redo | blocks | link",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:18px }",placeholder:l||"Type something ...",content_css:r?"/styles/tiny.css":void 0,statusbar:!!r}}),r&&n&&(0,s.jsx)(g,{editorRef:n})]})}var b=l(46169),y=l(59023),j=l(80830),v=l(53926);function k({data:e,user:t}){let l=!!e?.title,[n,c]=a().useState(!1),[o,d]=a().useState(e?.level),[h,u]=a().useState(e?.page_order),[x,m]=a().useState(null),[p,g]=a().useState(null),k=a().useRef(),N=a().useRef();return(0,s.jsx)(a().Fragment,{children:(0,s.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,s.jsxs)("div",{className:"mb-1",children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("h2",{className:"text-xl m-0",children:l?"Update page":"Create a new Docs Page"})]}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(v.A,{user:t})}),(0,s.jsxs)("div",{className:"paper flex-col items-stretch gap-10 w-full relative",children:[n&&(0,s.jsx)(r.A,{}),(0,s.jsxs)("form",{onSubmit:t=>{t.preventDefault(),c(!0);let s=t.target.title,n=N.current?.getDoc(),a=k.current?.getDoc();function i(e){let t=e.href;t?.match(/\~/)&&(e.href=t.replace(/.*?\~\//,"/")),t?.match(/\.\.\//)&&(e.href=t.replace(/.*?\.\.\//,"/"))}n?.querySelectorAll(".target-node").forEach(e=>e.classList.remove("target-node")),n?.querySelectorAll("a").forEach(e=>{i(e)}),a?.querySelectorAll("a").forEach(e=>{i(e)});let r=k.current?.getContent(),d=N.current?.getBody().innerHTML,u=N.current?.getBody().innerText,x={title:s.value,description:r,content:d,text_content:u,level:o,page_order:h};l&&(x.id=e.id),p?.id&&(x.parent_id=p.id),(0,b.A)(`/api/admin/docs/${l?"update-page":"add-page"}`,{method:"post",body:x}).then(e=>{e.success?window.location.reload():(alert("Operation Failed!"),setTimeout(()=>{c(!1)},1e3))})},className:"flex flex-col gap-4 w-full",children:[(0,s.jsx)(i.A,{placeholder:"Enter a title",fontSize:"30px",name:"title",defaultValue:l?e.title:null}),(0,s.jsxs)("div",{className:"card no-hover",children:[(0,s.jsx)(i.A,{numberText:!0,placeholder:"Level",defaultValue:l?o:"1",maxWidth:"140px",minValue:1,maxValue:4,step:1,name:"page-level",title:"Page Level",setValue:d}),(0,s.jsx)(i.A,{numberText:!0,placeholder:"Level",defaultValue:l?h:"1",maxWidth:"140px",minValue:1,step:1,name:"page-order",title:"Page Order",setValue:u}),x&&Array.isArray(x)&&(0,s.jsx)(j.A,{selectOptions:x.map(e=>({title:e.title,payload:e.id,default:p?.id==e.id})),title:"Parent Page",required:!0,onChangeHandler:e=>{let t=x.filter(t=>t.id==e.target.value);t[0]?g(t[0]):window.alert("No Matching parent page!")}})]}),(0,s.jsx)(f,{placeholder:"Describe this page briefly",editorRef:k,blockObject:l?{content:e.description}:null,height:200}),(0,s.jsx)(f,{placeholder:"Page Content",editorRef:N,blockObject:l?{content:e.content}:null,height:600,extend:!0}),(0,s.jsx)("button",{type:"submit",children:l?"Update Page":"Add Page"})]})]})]})})}},23293:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},96725:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(82544).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},54677:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(82544).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},71934:(e,t,l)=>{l.d(t,{A:()=>s});async function s(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let l=await t.query(...e);return JSON.parse(JSON.stringify(l))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/7070.js b/dsql-app/.local_dist/server/chunks/7070.js deleted file mode 100644 index ee3ffb5..0000000 --- a/dsql-app/.local_dist/server/chunks/7070.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=7070,exports.ids=[7070],exports.modules={58548:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(8732),r=t(82015),n=t.n(r);function i({confirmedDelegetedUser:e,linksArray:s,user:t}){e?.delegated,e?.priviledges?.match(/Edit Tables/i),e?.priviledges?.match(/Delete Tables/i),e?.priviledges?.match(/Create Tables/i);let[r,i]=n().useState(s||null);return r&&r[1]?(0,a.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:r.map((e,s,t)=>s===r.length-1?(0,a.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},s):(0,a.jsxs)(n().Fragment,{children:[(0,a.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,a.jsx)("span",{className:"opacity-20",children:"|"})]},s))}):(0,a.jsx)(n().Fragment,{})}},36605:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(8732),r=t(82015),n=t.n(r);t(63715);var i=t(86152),l=t(32415),c=t(66916),o=t(66918),d=t(23293);function x(e){let[s,t]=n().useState(!0),[r,x]=n().useState(0),[m,h]=n().useState(0);return s?(0,a.jsx)("div",{className:"button ghost small-text",style:{height:"30px"},children:(0,a.jsx)(l.A,{width:"15px",position:"relative"})}):(0,a.jsx)(n().Fragment,{children:r?(0,a.jsxs)("div",{className:"button ghost small-text normal-weight p-0",style:{height:"30px",padding:0},onClick:e=>{t(!0),(0,i.A)().then(()=>{h(e=>e+1),t(!1)})},children:[s&&(0,a.jsx)(l.A,{width:"15px"}),(0,a.jsx)(c.A,{size:20,className:"text-slate-400 mr-[3px]"}),(0,a.jsx)("span",{className:"font-bold text-slate-700 dark:text-white",children:r&&r.toFixed(2)}),(0,a.jsx)("span",{className:"text-slate-500",children:"mb"}),(0,a.jsx)(o.A,{size:17,className:"text-slate-400",strokeWidth:2})]}):(0,a.jsxs)("span",{className:"text-sm info gray font-normal w-auto",children:[(0,a.jsx)(d.A,{}),(0,a.jsx)("span",{children:"No Disk Usage Data Available Yet"})]})})}},20048:(e,s,t)=>{t(81630);let a=t(67216),r=t(77463),n=t(29021),i=t(6505);async function l(e,s,t,l){let{keyCookieName:c,csrfCookieName:o}=i();if(!e.cookies?.[c]?.match(/./))return null;let d=r({encryptedString:e.cookies[c]});if(!d)return null;let x=JSON.parse(d);if(!x.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${x.csrf_k}`)))return null;let m=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!m)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n.existsSync(`${m}/${x.csrf_k}`))return null;if(0==x.verification_status&&!t){let e=await a(`SELECT verification_status FROM users WHERE id='${x.id}'`);e&&e[0]&&1==e[0].verification_status&&s.setHeader("Set-Cookie",["user_refresh=1"])}return x?.date&&Date.now()-x.date>6048e5?null:x}e.exports=l},86152:(e,s,t)=>{t.d(s,{A:()=>r});var a=t(63715);async function r(){let e=await (0,a.A)("/api/getDiskUsage");localStorage.setItem("disk_usage",e.total)}},72377:e=>{e.exports=function(e,s){return s?e?.id&&String(e?.id)==(process.env.DSQL_SU_USER_ID||"1")&&"true":e?.id&&"1"==String(e?.id)&&"true"}},95222:(e,s,t)=>{t.d(s,{A:()=>N});var a=t(8732),r=t(82015),n=t.n(r),i=t(27912),l=t.n(i);t(64699);var c=t(93353),o=t(52070),d=t(34637),x=t(83158),m=t(25294),h=t(92441),u=t(29743),p=t(10643),j=t(10321),g=t(72377),f=t.n(g);function v({user:e}){let[s,t]=n().useState(!0);return(0,a.jsxs)("aside",{className:"aside"+(s?" mobile-collapsed":" mobile-expanded"),children:[(0,a.jsx)(c.A,{adminAside:!0,collapseAsideMobile:s,setCollapseAsideMobile:t}),(0,a.jsx)("hr",{className:"opacity-0 mt-4"}),(0,a.jsxs)("div",{className:"main-links"+(s?" hidden lg:flex":" "),children:[(0,a.jsxs)("a",{href:"/admin","data-currentlink":"/admin","data-strictlink":"true",children:[(0,a.jsx)(o.A,{size:20}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/databases`,"data-currentlink":`/admin/${e?.id}/databases`,children:[(0,a.jsx)(d.A,{size:20}),(0,a.jsx)("span",{children:"Databases"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/media`,"data-currentlink":`/admin/${e?.id}/media`,children:[(0,a.jsx)(x.A,{size:20}),(0,a.jsx)("span",{children:"Media"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/users`,"data-currentlink":`/admin/${e?.id}/users`,children:[(0,a.jsx)(m.A,{size:20}),(0,a.jsx)("span",{children:"Users"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/schema`,"data-currentlink":`/admin/${e?.id}/schema`,children:[(0,a.jsx)(h.A,{size:20}),(0,a.jsx)("span",{children:"Schema"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/api-keys`,"data-currentlink":`/admin/${e?.id}/api-keys`,children:[(0,a.jsx)(u.A,{size:20}),(0,a.jsx)("span",{children:"API Keys"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/connect`,"data-currentlink":`/admin/${e?.id}/connect`,children:[(0,a.jsx)(p.A,{size:20}),(0,a.jsx)("span",{children:"Connect"})]}),f()(e)&&(0,a.jsx)(n().Fragment,{children:(0,a.jsxs)("a",{href:"/su","data-currentlink":"/su",children:[(0,a.jsx)(j.A,{size:20}),(0,a.jsx)("span",{children:"Super Admin User"})]})}),(0,a.jsx)("hr",{className:"opacity-80"}),(0,a.jsxs)("div",{className:"flex-col gap-0 items-start w-full",children:[(0,a.jsx)("a",{href:`/admin/${e?.id}/settings`,"data-currentlink":`/admin/${e?.id}/settings`,children:(0,a.jsx)("span",{children:"Settings"})}),(0,a.jsx)("a",{href:"/docs","data-currentlink":"/docs",target:"_blank",children:(0,a.jsx)("span",{children:"Documentation"})}),(0,a.jsx)("a",{href:"/logout","data-currentlink":"/logout",children:(0,a.jsx)("span",{children:"Logout"})})]})]})]})}t(20681);var _=t(49538);function S({user:e,extraHeaderContent:s}){let[t,r]=n().useState(e||null);return(0,a.jsx)("section",{className:"overflow-visible w-full px-0 md:px-8 py-0 flex justify-center bg-white dark:bg-slate-800 shadow-lg gap-4 dark:shadow-black/10 shadow-slate-900/5 relative z-[100]",style:{zIndex:700,border:"none"},children:(0,a.jsxs)("div",{className:"w-full items-center justify-between gap-4 md:gap-8",children:[(0,a.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 px-4 xl:px-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto bg-white xl:bg-transparent pb-10 xl:pb-0",id:"main-nav-content-wrapper",children:[(0,a.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,a.jsx)("a",{href:"/",className:"hidden xl:flex",children:(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,a.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{border:"none"},children:(0,a.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,a.jsxs)("div",{className:"flex items-center w-full gap-6 grow flex-col xl:flex-row justify-start xl:justify-between",children:[(0,a.jsx)("div",{className:"gap-6",children:s}),(0,a.jsx)(_.A,{activeUser:t})]})]}),(0,a.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all ml-auto",onClick:e=>{let s=document.getElementById("main-nav-content-wrapper");s?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})}t(54896);var y=t(36605);function N({children:e,head:s,user:t,productionEnvironment:r,extraHeaderContent:i,aceEditor:o}){return i||(i=(0,a.jsx)(y.A,{})),(0,a.jsxs)(n().Fragment,{children:[(0,a.jsxs)(l(),{children:[s,(0,a.jsxs)(n().Fragment,{children:[(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]}),(0,a.jsxs)("div",{className:"admin w-full flex items-start gap-0",children:[(0,a.jsx)(v,{user:t}),(0,a.jsxs)("main",{className:"relative",children:[(0,a.jsx)(S,{user:t,extraHeaderContent:i}),(0,a.jsx)("div",{className:"admin-content relative z-10",children:e}),(0,a.jsx)("footer",{className:"flex justify-center w-full items-center p-4",children:(0,a.jsxs)("div",{className:"max-w-6xl w-full justify-center flex-wrap",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 scale-75",children:(0,a.jsx)(c.A,{})}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600 text-center",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/docs",children:"Docs"}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/terms",children:"Terms"})]})})]})]})]})}t(63715),t(28133)},6505:e=>{e.exports=function(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",r=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=s;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=t;let l=s;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=a;let c=s;return e?.userId&&(c+=`user_${e.userId}_`),n&&(c+=`${n}_`),{keyCookieName:i,csrfCookieName:l,oneTimeCodeName:c+=r}}},77463:(e,s,t)=>{let{scryptSync:a,createDecipheriv:r}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:s,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=s||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=r("aes-192-cbc",a(i,l,c),n.alloc(16,0));try{let s=o.update(e,"hex","utf8");return s+=o.final("utf8")}catch(s){return console.log("Error in decrypting =>",s.message),e}}},67216:(e,s,t)=>{let a=t(9973),r=t(31976),n=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()}});async function i(...e){try{let s=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},31976:(e,s,t)=>{let a=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let s=`${e}/ca-cert.pem`;if(!a.existsSync(s)){console.log(`${s} does not exist`);return}return{ca:a.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,s,t)=>{t.r(s),t.d(s,{default:()=>n});var a=t(8732);t(82015);var r=t(20883);function n(e){return(0,a.jsxs)(r.Html,{lang:"en",children:[(0,a.jsxs)(r.Head,{children:[(0,a.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,a.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,a.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,a.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,a.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,a.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,a.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,a.jsxs)("body",{children:[(0,a.jsx)(r.Main,{}),(0,a.jsx)(r.NextScript,{})]})]})}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/725.js b/dsql-app/.local_dist/server/chunks/725.js new file mode 100644 index 0000000..4fc6882 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/725.js @@ -0,0 +1 @@ +"use strict";exports.id=725,exports.ids=[725],exports.modules={6748:(e,t,a)=>{a.d(t,{A:()=>E});var r=a(8732),l=a(82015),s=a.n(l),d=a(16757),i=a(40373);function n({editor:e}){navigator.clipboard.writeText(e?.getContent()||"").then(()=>{alert("Html Copied to Clipboard!")})}var o=a(1976),c=a.n(o),u=a(58150);function m({editor:e,rootElement:t}){e.getContent();let a=s().useRef(),l=s().useRef(),[d,i]=s().useState();return(0,r.jsxs)("div",{onKeyUp:e=>{e.ctrlKey&&"Enter"==e.key&&l.current?.click()},children:[(0,r.jsx)("div",{className:"embed-popup-form-content-wrapper relative flex flex-col items-center justify-center",children:(0,r.jsxs)("div",{className:"max-w-[1200px] rounded-md overflow-hidden bg-white w-[90vw] items-start justify-start relative",children:[(0,r.jsx)("div",{ref:a,className:"w-full h-[80vh] text-[18px]"}),(0,r.jsx)("button",{className:"absolute bottom-4 right-4",onClick:a=>{if(d){let a=d.getValue();e.setContent(a),setTimeout(()=>{document.body.removeChild(t)},200)}},ref:l,children:"Save"})]})}),(0,r.jsx)("button",{className:"absolute top-4 right-8 rounded-full white",onClick:()=>{try{document.body.removeChild(t)}catch(e){}},style:{width:"40px",height:"40px",padding:"0",zIndex:"12039800000"},children:(0,r.jsx)(u.A,{})})]})}function p({editor:e}){let t=document.createElement("div");t.style.position="fixed",t.style.width="100vw",t.style.height="100vh",t.style.zIndex="123000000000000000",t.style.backgroundColor="rgba(0,0,0,0.8)",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.top="0",t.style.left="0",document.body.append(t),t.onclick=e=>{e.target.closest(".embed-popup-form-content-wrapper")||document.body.removeChild(t)},e&&c().createRoot(t).render((0,r.jsx)(m,{editor:e,rootElement:t}))}function f({editor:e,rootElement:t}){return(0,r.jsx)("div",{className:"embed-popup-form-content-wrapper text-sm mt-2 flex-wrap bg-white p-10 rounded max-w-2xl w-full",children:(0,r.jsxs)("form",{onSubmit:a=>{a.preventDefault();let r=a.target["embed-text-area"].value;if(!r?.match(/./))return alert("Please Enter HTML Text to continue.");e.insertContent(r),document.body.removeChild(t)},className:"w-full flex flex-col items-stretch gap-2",children:[(0,r.jsx)("h3",{className:"m-0 text-center text-lg",children:"Enter HTML code"}),(0,r.jsx)("textarea",{name:"embed-text-area",id:"embed-text-area",cols:30,rows:10,placeholder:"Paste Code here ..."}),(0,r.jsx)("button",{type:"submit",children:"Embed"})]})})}function x({editor:e}){let t=document.createElement("div");t.style.position="fixed",t.style.width="100vw",t.style.height="100vh",t.style.zIndex="123000000000000000",t.style.backgroundColor="rgba(0,0,0,0.8)",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.top="0",t.style.left="0",document.body.append(t),t.onclick=e=>{if(e.target.closest(".embed-popup-form-content-wrapper")){console.log("Still In Form");return}document.body.removeChild(t)},e&&c().createRoot(t).render((0,r.jsx)(f,{editor:e,rootElement:t}))}a(90317);var h=a(17855);function y({fieldObject:e,dataTypeSchema:t,richTextEditors:a,entry:l,currentRichTextEditorForms:o,entryPage:c,formButtonId:u}){let[m,f]=s().useState(!1),y=s().useRef(),g=s().useRef();return(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0 w-full rich-text-editor-wrapper",children:[(0,r.jsxs)("label",{className:"font-bold text-slate-700 dark:text-slate-300 text-base px-3 py-1 bg-slate-100 dark:bg-slate-700 rounded-t-md border border-solid border-slate-300 dark:border-slate-300/20 flex items-center gap-2",htmlFor:e.fieldName,children:[e.encrypted&&(0,r.jsx)(h.A,{}),(0,r.jsx)("span",{children:e.fieldName})]}),(0,r.jsxs)("div",{ref:y,id:e.fieldName,className:"w-full p-0 sm:p-4 flex-col items-stretch bg-slate-100 relative dark:bg-slate-700 border border-solid border-slate-300 dark:border-slate-300/20",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},children:[!m&&(0,r.jsx)(d.A,{}),m&&(0,r.jsx)(s().Fragment,{children:(0,r.jsx)(i.Editor,{tinymceScriptSrc:"https://datasquirel.com/tinymce-public/tinymce.min.js",onInit:(e,t)=>{g.current=t},initialValue:e.defaultValue||(l&&e.fieldName&&l[e.fieldName]?l[e.fieldName]:""),init:{height:c?400:300,width:"100%",convert_urls:!1,menubar:!1,plugins:["advlist","lists","link","image","charmap","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","preview","help","wordcount"],toolbar:"undo redo | blocks | bold italic forecolor | link image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat help | editCode embedCode copyCode",placeholder:"Type something ...",document_base_url:"/",content_css:e.cssFiles||void 0,setup:e=>{!function({editor:e,formButtonId:t}){e.addShortcut("meta+13","Save Entry.",()=>{window.confirm("Update this Form?")&&t&&document.getElementById(t)?.click()}),e.addShortcut("meta+shift+e","Edit Code.",()=>{p({editor:e})}),e.addShortcut("meta+shift+d","Embed Code.",()=>{x({editor:e})}),e.addShortcut("meta+shift+c","Copy Code.",()=>{n({editor:e})}),e.ui.registry.addButton("editCode",{icon:"edit-block",onAction:t=>p({editor:e}),tooltip:"Edit HTML Code"}),e.ui.registry.addButton("embedCode",{icon:"sourcecode",onAction:t=>x({editor:e}),tooltip:"Embed Code"}),e.ui.registry.addButton("copyCode",{icon:"copy",onAction:t=>n({editor:e}),tooltip:"Copy HTML"})}({editor:e,formButtonId:u})}}})})]})]})}a(46169),a(6789);var g=a(82544);let b=(0,g.A)("CircleMinus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),N=(0,g.A)("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);function v({fieldObject:e,typeFinal:t,isExpanded:a,setHeight:l,COLLAPSED_HEIGHT:s,EXPANDED_HEIGHT:d}){return(0,r.jsxs)("div",{className:"gap-2 w-full",children:[(0,r.jsxs)("label",{className:"font-bold text-slate-700 dark:text-slate-300 text-base px-3 py-1 bg-slate-100 dark:bg-slate-700 rounded-t-md border border-solid border-slate-300 dark:border-slate-300/20 flex items-center gap-2",htmlFor:e.fieldName,children:[e.encrypted&&(0,r.jsx)(h.A,{}),(0,r.jsx)("span",{children:e.fieldName})]}),(0,r.jsx)("div",{className:"px-4 py-1 bg-secondary text-white rounded-full text-sm font-bold -mt-2",children:(0,r.jsx)("span",{children:t})}),(0,r.jsxs)("div",{className:"ml-auto cursor-pointer gap-1 text-slate-400 hover:text-slate-800 -mt-2 items-center flex",onClick:e=>{a?l(s):l(d)},children:[(0,r.jsx)("span",{className:"font-semibold text-sm",children:a?"Collapse":"Expand"}),a?(0,r.jsx)(b,{size:18,className:"mt-[-1px]"}):(0,r.jsx)(N,{size:18,className:"mt-[-1px]"})]})]})}function j({fieldObject:e,dataTypeSchema:t,entry:a,entryPage:l,jsonTextEditors:d,type:i}){try{let[t,a]=s().useState(0),[l,d]=s().useState(300),n=s().useRef();return s().useRef(),(0,r.jsx)(s().Fragment,{children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0 w-full rich-text-editor-wrapper",children:[(0,r.jsx)(v,{fieldObject:e,isExpanded:300!==l,setHeight:d,typeFinal:i||"json",COLLAPSED_HEIGHT:300,EXPANDED_HEIGHT:600}),(0,r.jsx)(w,{height:l,jsonEditorRef:n})]})})}catch(e){return(0,r.jsx)(s().Fragment,{children:(0,r.jsx)("span",{children:"Editor Load Error"})})}}function w({height:e,jsonEditorRef:t}){return(0,r.jsx)("div",{className:"w-full p-0 sm:p-4 flex-col relative dark:bg-slate-700 border border-solid border-slate-300 dark:border-slate-300/20 overflow-hidden",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px",height:`${e}px`},children:(0,r.jsx)("div",{ref:t,className:"w-full text-[18px] h-full"})})}function E({fieldObject:e,dataTypeSchema:t,richTextEditors:a,jsonTextEditors:l,entry:d,currentRichTextEditorForms:i,confirmedDelegetedUser:n,query:o,entryPage:c,formButtonId:u}){n?.delegated,n?.priviledges?.match(/Edit Tables/i),n?.priviledges?.match(/Delete Tables/i),n?.priviledges?.match(/Create Tables/i),n?.priviledges?.match(/Edit Entries/i),n?.priviledges?.match(/Delete Entries/i);let m=function({fieldObject:e,dataTypeSchema:t,elementRef:a,entry:l}){let s;let d=e=>{let t=e.target.closest("form");if(!t)return;let a=t?.querySelector("#slug");a&&(a.value=e.target.value.toLowerCase().replace(/ /g,"-").replace(/[^a-z\-0-9]/g,""))};return e.defaultField?s=(0,r.jsx)("input",{ref:a,type:"text",name:"def_field_"+e.fieldName,id:"def_field_"+e.fieldName,placeholder:e.fieldName,defaultValue:l&&l[e.fieldName||""]?l[e.fieldName||""]:e.defaultValue?e.defaultValue:"",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},readOnly:!0,"data-default":"true"}):(e.dataType?.match(/varchar/i)&&(s=(0,r.jsx)("textarea",{ref:a,name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,maxLength:e.dataType?.match(/\d+/)?.[0]?parseInt(e.dataType?.match(/\d+/)?.[0]||""):void 0,defaultValue:l&&l[e.fieldName||""]?l[e.fieldName||""]:e.defaultValue?e.defaultValue:"",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},onChange:t=>{e.fieldName?.match(/^title$/)&&d(t)}})),e.dataType?.match(/int$/i)&&(s=(0,r.jsx)("input",{ref:a,type:"number",name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,max:t.maxValue,style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},defaultValue:l&&l[e.fieldName||""]?l[e.fieldName||""]:e.defaultValue?e.defaultValue:"",onChange:e=>{}})),e.dataType?.match(/text$/i)&&(s=(0,r.jsx)("textarea",{ref:a,name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,defaultValue:l&&l[e.fieldName||""]?l[e.fieldName||""]:e.defaultValue?e.defaultValue:"",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},rows:10,onChange:e=>{}})),e.fieldName?.match(/password|^pass$|^key$/i)&&(s=(0,r.jsxs)("div",{className:"w-full relative",children:[(0,r.jsx)("input",{ref:a,type:"password",name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,max:t.maxValue,style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},defaultValue:l&&l[e.fieldName]?l[e.fieldName]:e.defaultValue?e.defaultValue:"",onChange:e=>{}}),(0,r.jsx)("span",{className:"absolute right-4 cursor-pointer",onClick:e=>{let t=e.target.closest("div").querySelector("input");"password"===t.type?(t.type="text",e.target.innerText="Hide"):(t.type="password",e.target.innerText="Reveal")},children:"Reveal"})]})),s||(s=(0,r.jsx)("input",{ref:a,type:"text",name:e.fieldName,id:e.fieldName,style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},defaultValue:l&&l[e.fieldName||""]?l[e.fieldName||""]:e.defaultValue?e.defaultValue:"",onChange:e=>{}})),s)}({fieldObject:e,dataTypeSchema:t,elementRef:s().useRef(),entry:d});if(e.dataType?.match(/text$/i)&&e.richText&&!e.plainText&&!e.fieldName?.match(/^pass|^key$/i)&&!e.encrypted||e.encrypted&&e.richText)return(0,r.jsx)(s().Fragment,{children:(0,r.jsx)(y,{fieldObject:e,dataTypeSchema:t,richTextEditors:a,currentRichTextEditorForms:i,entry:d,entryPage:c,formButtonId:u})});let p=e.json||e.yaml||e.html||e.css||e.javascript||e.shell;return e.dataType?.match(/text$/i)&&p&&!e.plainText&&!e.fieldName?.match(/^pass|^key$/i)&&!e.encrypted||e.encrypted&&p?(0,r.jsx)(j,{fieldObject:e,dataTypeSchema:t,entry:d,entryPage:c,jsonTextEditors:l,type:e.json?"json":e.yaml?"yaml":e.html?"html":e.css?"css":e.javascript?"javascript":e.shell?"shell":"json"}):(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0 w-full"+(e.defaultField?" opacity-50":""),children:[(0,r.jsxs)("label",{className:"font-bold text-slate-700 dark:text-slate-300 text-base px-3 py-1 bg-slate-100 dark:bg-slate-700 rounded-t-md border border-solid border-slate-300 dark:border-slate-300/20 flex items-center gap-2",htmlFor:e.fieldName,children:[e.encrypted&&(0,r.jsx)(s().Fragment,{children:(0,r.jsx)(h.A,{})}),(0,r.jsx)("span",{children:e.fieldName}),e.defaultField&&(0,r.jsx)("span",{className:"bg-white dark:bg-slate-900 text-primary dark:text-slate-300 font-semibold text-xs px-2 py-0.5 rounded-xs",children:"Default Field"})]}),m]})}},6789:(e,t,a)=>{a.d(t,{A:()=>r});function r({editorHTMLElementRef:e,fieldObject:t,setRefresh:a,language:r="javascript",entry:l,jsonTextEditors:s,editorRef:d,readOnly:i,initialContent:n,options:o}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{a?.(e=>e+1)},1e3);return}let c=ace.edit(e.current);c.setOptions({mode:"ace/mode/"+r,value:n||(t?.defaultValue?t.defaultValue:t?.fieldName&&l?.[t.fieldName]?(()=>{if("json"!==r)return l[t.fieldName];try{return JSON.stringify(JSON.parse(l[t.fieldName]),null,4)}catch(e){return l[t.fieldName]}})():""),placeholder:"json"==r?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...o}),d&&t?.fieldName&&(s?.current.push({fieldName:t.fieldName,ref:d}),d.current=c);try{ace.require("ace/ext/beautify").beautify(c.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},22873:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(71205);async function l({request:e,databaseSlug:t,user:a,query:l}){try{let s=a.id,d=null;if(!l?.delegated)return{dbUserId:s};let i=l.dbUserId,n=`${process.env.DSQL_USER_DB_PREFIX}${i}_${t}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${n}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let a=(0,r.A)({encryptedString:e.cookies[o]});if(!a)throw Error("Invalid Token");if((d=JSON.parse(a)).databaseSlug===t)return{dbUserId:s=d.rootUserId,rootUserId:d.rootUserId,rootUserName:d.rootUserName,rootUserEmail:d.rootUserEmail,rootUserImage:d.rootUserImage,databaseFullName:d.databaseFullName,databaseSlug:d.databaseSlug,allowedTables:d.allowedTables,priviledges:d.priviledges,database:d.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:s}}catch(e){return null}}},17855:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},52854:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(71205);let l=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:t}){let a=[];try{for(let s=0;s",t.message),e}}var d=a(77047),i=a(71934),n=a(43651),o=a(16175);async function c({queryString:e,queryValuesArray:t,database:a,tableSchema:r,useLocal:l}){let c;let u=!!l||!!a?.match(/^datasquirel$/),m=l?o.A:u?i.A:n.A;try{c=e&&t&&Array.isArray(t)&&t[0]?u?await m(e,t):await m({paradigm:"Full Access",queryString:e,queryValues:t}):u?await m(e):await m({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,d.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&r)try{let e=c;return await s({unparsedResults:e,tableSchema:r})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),(0,d.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},43651:(e,t,a)=>{async function r(e,t,a){try{if("string"==typeof t){let r=await e.query(l(t),a);return JSON.parse(JSON.stringify(r))}if("object"!=typeof t)return null;{let a=[];for(let r=0;rs})},16175:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(9973),l=a.n(r),s=a(29021),d=a.n(s);async function i(...e){let t=l()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!d().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:d().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/7640.js b/dsql-app/.local_dist/server/chunks/7640.js deleted file mode 100644 index 059d3ea..0000000 --- a/dsql-app/.local_dist/server/chunks/7640.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=7640,exports.ids=[7640],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},99486:(e,a,t)=>{t.d(a,{A:()=>o});var l=t(8732);t(82015);var i=t(55158),s=t(83158),n=t(82544);let r=(0,n.A)("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]),d=(0,n.A)("FileVideo2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);function o({user:e}){return(0,l.jsx)(i.Ay,{title:"choose-media-type-popoup",noContainer:!0,wrapperClasses:"items-center",wrapperStyle:{alignItems:"center"},children:(0,l.jsxs)("div",{className:"paper items-center max-w-2xl m-auto z-50 p-4 xl:p-10",children:[(0,l.jsxs)("h4",{className:"m-0 text-center text-lg leading-tight",children:["What kind of Media do you",(0,l.jsx)("br",{}),"want to upload?"]}),(0,l.jsx)("span",{children:"Please Select the media type to upload."}),(0,l.jsxs)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:[(0,l.jsxs)("div",{className:"card cursor-pointer",onClick:a=>{if(e?.verification_status?.toString().match(/1/)){let e=document.getElementById("upload_image_input");e?.click()}else alert("Please Verify to Add Media");setTimeout(()=>{(0,i.fs)()},500)},children:[(0,l.jsx)(s.A,{size:50,className:"text-primary"}),(0,l.jsxs)("div",{className:"content",children:[(0,l.jsx)("span",{className:"title",children:"Images"}),(0,l.jsx)("span",{className:"text-sm",children:"General image formats like JPEG, PNG, SVG, WEBP, etc."})]})]}),(0,l.jsxs)("div",{className:"card cursor-pointer",onClick:a=>{e?.verification_status?.toString().match(/1/)?document.getElementById("upload_file_input")?.click():alert("Please Verify to Add Media"),(0,i.fs)()},children:[(0,l.jsx)(r,{size:50,className:"text-secondary"}),(0,l.jsxs)("div",{className:"content",children:[(0,l.jsx)("span",{className:"title",children:"Files"}),(0,l.jsx)("span",{className:"text-sm",children:"Other documents type. Like PDF, XLSX, CSV, etc."})]})]})]}),(0,l.jsx)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:(0,l.jsxs)("div",{className:"card cursor-pointer",onClick:a=>{e?.verification_status?.toString().match(/1/)?document.getElementById("upload_video_input")?.click():alert("Please Verify to Add Media"),(0,i.fs)()},children:[(0,l.jsx)(d,{size:55,className:"text-slate-600"}),(0,l.jsxs)("div",{className:"content",children:[(0,l.jsx)("span",{className:"title",children:"Videos"}),(0,l.jsxs)("span",{className:"text-sm",children:["Video Files. ",(0,l.jsx)("b",{children:"MP4"})," for now. These files can be streamed. Max 200mb"]})]})]})})]})})}},82747:(e,a,t)=>{t.d(a,{A:()=>N});var l=t(8732),i=t(82015),s=t.n(i),n=t(63715),r=t(32415),d=t(82544);let o=(0,d.A)("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var c=t(58150);function m({folderName:e,folder:a,user:t}){let i=`${a?a+"/":""}${e}`,[d,m]=s().useState(!1);return(0,l.jsxs)("a",{href:`/admin/${t?.id}/media/${i}`,className:"card col items-center justify-center",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[d&&(0,l.jsx)(r.A,{}),(0,l.jsx)(o,{opacity:.5}),(0,l.jsx)("span",{className:"absolute top-4 left-4 text-xs bg-slate-200 dark:bg-slate-700 px-2 py-0.5 rounded-full",children:"Folder"}),(0,l.jsx)("span",{className:"",children:e}),(0,l.jsx)("button",{className:"plain-text absolute top-2 right-2",onClick:e=>{window.confirm("Delete this Folder and all its contents?")&&(m(!0),window.confirm("NOTE: this folder and all its contents will be permanently lost. Continue?")?(0,n.A)("/api/deleteMediaFolder",{method:"post",body:{folder:i}},!0).then(e=>{e.success&&window.location.reload()}):m(!1))},children:(0,l.jsx)(c.A,{})})]},e)}var u=t(55158),p=t(62506),h=t(1133);function f({mediaObject:e,staticHost:a}){let t=e.media_thumbnail_path?e?.private?e.media_thumbnail_url:`${a}${e.media_thumbnail_path}`:e.media_thumbnail_url,i=e.media_path?e?.private?e.media_url:`${a}${e.media_path}`:e.media_url;return(0,l.jsx)(s().Fragment,{children:e.media_type?.match(/file/i)?(0,l.jsx)("div",{className:"cursor-pointer hover:opacity-80",children:(0,l.jsx)("span",{className:"info w-auto small gray absolute top-4 right-4",children:e.media_type.replace(/.*\//,"").toUpperCase()})}):e.media_type?.match(/video/i)?(0,l.jsx)("video",{src:i,className:"w-full h-60 object-cover",controls:!0,muted:!0,autoPlay:!0,loop:!0}):(0,l.jsx)("img",{src:t,alt:e.media_name,className:"w-full h-60 object-cover bg-slate-200 rounded",onError:a=>{e?.private||(0,n.A)("/api/purgeDb",{method:"post",body:{paradigm:"user_media",payload:e}},!0).then(e=>{e.success?window.location.reload():(console.log(e),console.log(t),console.log(i))})}})})}var x=t(49140);function g({mediaObject:e,staticHost:a}){return(e.media_thumbnail_path?e.media_thumbnail_path:e.media_thumbnail_url,e.media_path?e.media_path:e.media_url,e?.private)?(0,l.jsx)(s().Fragment,{}):(0,l.jsxs)("div",{className:"dropdown-wrapper w-full xl:w-auto",children:[(0,l.jsx)("button",{className:"outlined secondary small-text w-full hidden xl:flex bg-secondary/10",children:"Copy Link"}),(0,l.jsx)("div",{className:"dropdown mobile-transform gap-2 w-full",children:(0,l.jsxs)(p.A,{column:!0,className:"w-full mb-2 xl:mb-0",children:[(0,l.jsx)("button",{className:"gray outlined normal-weight more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_url||"").then(()=>{alert(`Media url ${e.media_url} Copied to clipboard`)})},children:"Copy Full Link"}),!e?.media_type?.match(/file|video/i)&&(0,l.jsx)("button",{className:"gray outlined normal-weight more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_thumbnail_url||"").then(()=>{alert(`Media url ${e.media_thumbnail_url} Copied to clipboard`)})},children:"Copy Thumbnail Link"})]})})]})}var y=t(17855);let w=(0,d.A)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);function j({mediaObject:e,setLoading:a}){let[t,i]=s().useState(!1);return e?.media_type?.match(/video/i)?null:(0,l.jsx)("button",{className:"light-gray p-2 w-8 h-8 rounded-full absolute top-4 left-4 bg-white"+(e?.private?" ":" text-slate-400 fill-slate-400"),style:{backgroundColor:"white"},onClick:t=>{let l=e.private?"This media is private: Make it public?":"Make this media Private?";window.confirm(l)&&(a(!0),(0,n.A)("/api/media/addPrivateMedia",{method:"post",body:{...e}},!0).then(e=>{e.success?window.location.reload():window.alert("Action Failed!"),setTimeout(()=>{a(!1)},1e3)}).catch(e=>{console.log(e)}))},children:e?.private?(0,l.jsx)(y.A,{size:20,color:"green"}):(0,l.jsx)(w,{color:"black",size:20})})}function b({mediaObject:e,setTargetMedia:a,folder:t,staticHost:i}){let[n,d]=s().useState(!!e?.private),[o,c]=s().useState(e);o.media_thumbnail_path?o.media_thumbnail_path:o.media_thumbnail_url;let m=o.media_path?`${i}/${o.media_path}`:o.media_url;return(0,l.jsxs)("div",{className:"media-card card col min-h-[200px]",onClick:e=>{if(!(e.target.closest("button")||e.target.closest(".button"))){if(o.media_type?.match(/file/i)&&!o.private){window.open(m,"__blank");return}o.media_type?.match(/file/i)&&o.private||(a(o),(0,u.PB)("target-media-popup"))}},onMouseEnter:e=>{e.target.closest(".media-card").style.zIndex="10"},onMouseLeave:e=>{e.target.closest(".media-card").style.zIndex="0"},style:o?.private?{outline:"5px solid var(--sec-color-light)",borderColor:"var(--sec-color-lighter)"}:{},children:[n&&(0,l.jsx)(r.A,{}),(0,l.jsx)(f,{mediaObject:o,staticHost:i}),(0,l.jsxs)("div",{className:"flex-col items-center xl:items-start flex-wrap w-full mt-auto",children:[(0,l.jsx)("span",{className:"w-full",style:{wordBreak:"break-all"},children:o.media_name}),(0,l.jsx)("div",{className:"flex-wrap w-full",children:(0,l.jsxs)(p.A,{className:"flex-wrap w-full items-stretch",children:[(0,l.jsx)("button",{className:"secondary small-text relative w-full xl:w-auto mb-2 xl:mb-0",onClick:e=>{(0,h.A)({mediaObject:o,fileName:m?.match(/[^\/]+$/)?.[0]||"",setLoading:d})},children:(0,l.jsx)("span",{children:"Download"})}),(0,l.jsx)(g,{mediaObject:o,staticHost:i}),(0,l.jsx)(x.A,{mediaObject:o,setLoading:d})]})})]}),(0,l.jsx)(j,{mediaObject:o,setLoading:d})]})}t(99730);let v=(0,d.A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);function N({media:e,setTargetMedia:a,folders:t,folder:i,staticHost:n,user:r}){return(0,l.jsx)(s().Fragment,{children:(0,l.jsxs)("section",{className:"paper overflow-visible",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:"Media List"}),(0,l.jsxs)("div",{className:"w-full gap-4 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 items-stretch",children:[t&&t[0]&&t.map(e=>(0,l.jsx)(m,{folder:i,folderName:e,user:r},e)),e&&e[0]&&e.map(e=>(0,l.jsx)(b,{mediaObject:e,setTargetMedia:a,folder:i,staticHost:n},e.id))]}),!e?.[0]&&(0,l.jsx)(A,{})]})})}function A(){return(0,l.jsxs)("div",{className:"button outlined gray dashed w-full p-10 flex-col",onClick:e=>{(0,u.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"text-slate-400",children:"No Media Added."}),(0,l.jsx)(v,{}),(0,l.jsx)("span",{className:"",children:"Add Media"})]})}},30180:(e,a,t)=>{let l;t.d(a,{A:()=>c});var i=t(8732),s=t(82015),n=t.n(s),r=t(63715),d=t(55158),o=t(32415);function c({folder:e}){let[a,t]=n().useState(!1),[s,c]=n().useState(!1);return(0,i.jsxs)(d.Ay,{title:"add-folder-popoup",children:[(0,i.jsx)("h4",{className:"m-0",children:"Add A New Folder"}),(0,i.jsxs)("div",{className:"flex-col w-full relative",children:[a&&(0,i.jsx)(o.A,{}),(0,i.jsxs)("form",{onSubmit:a=>{a.preventDefault(),window.clearTimeout(l),t(!0);let i=a.target;(0,r.A)("/api/addNewMediaFolder",{method:"post",body:{name:(e?`${e}/`:"")+i["new-folder-name"].value}},!0).then(e=>{e.success?window.location.reload():t(!1)})},className:"w-full flex flex-col items-stretch gap-2",children:[s&&(0,i.jsx)("span",{className:"text-xs text-orange-700 bg-orange-100 flex items-center justify-center rounded px-2 py-1",children:"Folder Already Exists. Please Change the name."}),(0,i.jsx)("input",{type:"text",name:"new-folder-name",id:"new-folder-name",placeholder:"New Folder Name",className:"w-full"+(s?" warning":""),onChange:a=>{a.target.value=a.target.value.toLocaleLowerCase().replace(/ /g,"-"),window.clearTimeout(l),l=setTimeout(()=>{(0,r.A)(`/api/checkExistingFolder?name=${a.target.value}${e?"&folder="+e:""}`).then(e=>{a.target.value?.match(/./)&&e?.success?(c(!0),alert("Folder Already Exists")):c(!1)})},500)}}),(0,i.jsx)("button",{children:"Add New Folder"})]})]})]})}},81156:(e,a,t)=>{t.d(a,{A:()=>x});var l=t(8732),i=t(82015),s=t.n(i),n=t(63715),r=t(86152),d=t(55158),o=t(32415),c=t(17855);let m=(0,t(82544).A)("LockKeyholeOpen",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}],["path",{d:"M7 10V7a5 5 0 0 1 9.33-2.5",key:"car5b7"}]]);function u({mediaObject:e}){let[a,t]=i.useState(!1);return i.useEffect(()=>{e.private=a},[a]),(0,l.jsx)("button",{className:"light-gray p-2 w-8 h-8 rounded-full absolute top-2 left-2 bg-white"+(a?" ":" text-slate-400 fill-slate-400"),style:{backgroundColor:"white"},onClick:e=>{t(e=>!e)},children:a?(0,l.jsx)(c.A,{}):(0,l.jsx)(m,{})})}var p=t(58150);function h({imageObject:e,newMedia:a,setNewMedia:t,video:i}){let s=e.imageBase64Full||e.fileBase64Full,n=e.imageName||e.fileName;return(0,l.jsxs)("div",{className:"border border-slate-300 rounded max-h-44 flex-col w-full overflow-hidden h-full bg-slate-200 relative p-2",children:[i?(0,l.jsx)("video",{src:s,className:"w-full h-full object-contain",muted:!0,autoPlay:!0,controls:!0}):(0,l.jsx)("img",{src:s,alt:n,className:"w-full h-full object-contain"}),(0,l.jsx)("input",{type:"text",defaultValue:n,onInput:a=>{let t=a.target.value?.replace(/ /g,"-");e.fileName&&(e.fileName=t),e.imageName&&(e.imageName=t)},className:"absolute bottom-1 text-sm left-2 px-2 py-1",style:{width:"calc(100% - 15px)"}}),(0,l.jsx)("button",{className:"outlined bg-white absolute top-2 right-2 p-1 w-8 h-8 rounded-full",style:{backgroundColor:"white",borderColor:"var(--slate-200)"},onClick:l=>{let i=a.findIndex(a=>a.imageBase64===e.imageBase64||a.fileBase64===e.fileBase64);a.splice(i,1),t([...a])},children:(0,l.jsx)(p.A,{size:16})}),!i&&(0,l.jsx)(u,{mediaObject:e})]})}function f({fileObject:e,newFile:a,setNewFile:t}){return(0,l.jsxs)("div",{className:"border border-slate-300 rounded min-h-[100px] flex-col w-full overflow-hidden h-full bg-slate-200 relative p-2",children:[(0,l.jsx)("input",{type:"text",defaultValue:e.fileName,onInput:a=>{e.fileName=a.target.value?.replace(/ /g,"-")},className:"absolute bottom-1 text-sm left-2 px-2 py-1",style:{width:"calc(100% - 15px)"}}),(0,l.jsx)("button",{className:"outlined bg-white absolute top-2 right-2 p-1 w-8 h-8 rounded-full",style:{backgroundColor:"white",borderColor:"var(--slate-200)"},onClick:l=>{let i=a.findIndex(a=>a.fileBase64===e.fileBase64);a.splice(i,1),t([...a])},children:(0,l.jsx)(p.A,{size:16})}),(0,l.jsx)(u,{mediaObject:e})]})}function x({newMedia:e,setNewMedia:a,newFile:t,setNewFile:i,newVideo:c,setNewVideo:m,folder:u}){let p=e?.[0]?"images":t?.[0]?"files":"videos",x=p?.match(/image/i)?e:p?.match(/file/i)?t:c,g=p?.match(/image/i)?a:p?.match(/file/i)?i:m,[y,w]=s().useState(!1);return(0,l.jsxs)(d.Ay,{title:"new-media-popup",closePopupDispatch:()=>{a(null),i(null),m(null)},children:[y&&(0,l.jsx)(o.A,{screen:!0}),(0,l.jsx)("h4",{className:"m-0",children:"Upload New Media"}),(0,l.jsx)("div",{className:"grid grid-cols-2 gap-4 w-full",children:x&&x[0]&&x.map((e,a)=>p?.match(/image/i)?(0,l.jsx)(h,{imageObject:e,newMedia:x,setNewMedia:g},a+1):p?.match(/video/i)?(0,l.jsx)(h,{imageObject:e,newMedia:x,setNewMedia:g,video:!0},a+1):(0,l.jsx)(f,{fileObject:e,newFile:x,setNewFile:g},a+1))}),x&&x[0]&&(0,l.jsx)("button",{className:"py-3 w-full relative z-50"+(y?" pointer-events-none opacity-40":""),onClick:e=>{w(!0);let a=p?.match(/image/i)?{type:p,folder:u,media:x.map(e=>({imageBase64:e.imageBase64,imageName:e.imageName,imageSize:e.imageSize,private:e.private}))}:{type:p,folder:u,media:x.map(e=>({fileBase64:e.fileBase64,fileName:e.fileName,fileSize:e.fileSize,fileType:e.fileType,private:e.private,video:!!p?.match(/video/i)}))};(0,n.A)("/api/addUserMedia",{method:"post",body:a},!0).then(e=>{e.success?(0,r.A)().then(()=>{window.location.reload()}):(alert("Image Upload Failed"),console.log(e),setTimeout(()=>{w(!1)},1e3))})},children:"Upload Media"})]})}},98009:(e,a,t)=>{t.d(a,{A:()=>f});var l=t(8732),i=t(82015),s=t.n(i),n=t(63715),r=t(86152),d=t(55158),o=t(32415),c=t(62506),m=t(1133);t(99730);let u=(0,t(82544).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var p=t(6070),h=t(49140);function f({targetMedia:e,staticHost:a,setTargetMedia:t,media:i}){e?.media_thumbnail_path?e?.media_thumbnail_path:e?.media_thumbnail_url;let f=e?.media_path?`${a}/${e?.media_path}`:e?.media_url,x=!!e?.media_type?.match(/video/i),g=e?i.findIndex(a=>a.id==e.id):null,y="number"==typeof g&&g>=0,w=(()=>{if(!y)return null;let e=i[g+1];return e?e?.media_type?.match(/image/i)?e:i.slice(g+1).find(e=>!!e.media_type?.match(/image/i))||null:null})(),j=(()=>{if(!y)return null;let e=i[g-1];return e?e?.media_type?.match(/image/i)?e:i.slice(0,g-1).findLast(e=>!!e.media_type?.match(/image/i))||null:null})(),[b,v]=s().useState(!!e?.private),[N,A]=s().useState(!1),[k,_]=s().useState(f),M=s().useRef();return(0,l.jsxs)(d.Ay,{title:"target-media-popup",noContainer:!0,fullPage:!0,closePopupDispatch:()=>{A(!1),t(null)},children:[b&&(0,l.jsx)(o.A,{}),!N&&(0,l.jsx)(o.A,{}),e&&(0,l.jsxs)(s().Fragment,{children:[(0,l.jsxs)("div",{className:"self-center h-screen py-4",children:[k?x?(0,l.jsx)("video",{src:k,className:"w-full h-full object-cover",controls:!0,muted:!0,autoPlay:!0,loop:!0,onCanPlay:()=>{A(!0)},style:N?void 0:{display:"none"}}):(0,l.jsx)("img",{src:k,alt:e.media_name,className:"bg-slate-200 rounded w-full h-full object-contain",ref:M,onLoad:e=>{A(!0)},style:N?void 0:{display:"none"}}):(0,l.jsx)(l.Fragment,{}),j&&(0,l.jsx)("div",{className:"absolute left-5 md:left-10 z-[100] cursor-pointer p-5 bg-slate-800/40 rounded-full",onClick:e=>{t(null),t(j)},children:(0,l.jsx)(u,{color:"white"})}),w&&(0,l.jsx)("div",{className:"absolute right-5 md:right-10 z-[100] cursor-pointer p-5 bg-slate-800/40 rounded-full",onClick:e=>{t(null),t(w)},children:(0,l.jsx)(p.A,{color:"white"})})]}),(0,l.jsx)("span",{className:"info gray absolute top-5 left-5 w-auto mr-5",style:{backgroundColor:"white"},children:e.media_path?.replace(/.*\//,"")}),(0,l.jsx)("div",{className:"absolute bottom-6 left-6 p-1 bg-white dark:bg-slate-900 rounded z-20 hidden lg:flex flex-col items-stretch min-w-[200px]",children:(0,l.jsxs)(c.A,{column:!0,children:[(0,l.jsx)(h.F,{mediaObject:e,setLoading:v}),(0,l.jsx)("button",{className:"outlined secondary more-padding",onClick:a=>{(0,m.A)({mediaObject:e,fileName:e.media_url?.match(/[^\/]+$/)?.[0]||"",setLoading:v})},children:"Download"}),(0,l.jsx)("button",{onClick:a=>{window.confirm("Delete this media?")&&(0,n.A)("/api/deleteUserMedia",{method:"post",body:e},!0).then(e=>{e.success?(0,r.A)().then(()=>{window.location.reload()}):alert("Media deletion Failed! Please try again.")})},className:"more-padding",children:"Delete"}),!e?.private&&(0,l.jsxs)(s().Fragment,{children:[(0,l.jsx)("button",{className:"outlined gray w-full bg-white more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_url||"").then(()=>{alert(`Media url ${e.media_url} Copied to clipboard`)})},children:"Copy Full Image Link"}),(0,l.jsx)("button",{className:"outlined gray w-full more-padding",onClick:a=>{navigator.clipboard.writeText(e.media_thumbnail_url||"").then(()=>{alert(`Media url ${e.media_thumbnail_url} Copied to clipboard`)})},style:{borderTop:"1px solid #0b8862"},children:"Copy Image Thumbnail Link"})]})]})})]})]})}},49140:(e,a,t)=>{t.d(a,{A:()=>r,F:()=>d});var l=t(8732);t(82015);var i=t(63715),s=t(86152),n=t(62506);function r({mediaObject:e,setLoading:a}){return(0,l.jsxs)("div",{className:"dropdown-wrapper w-full xl:w-auto",children:[(0,l.jsx)("button",{className:"outlined gray small-text hidden xl:flex",children:"More"}),(0,l.jsx)("div",{className:"dropdown mobile-transform gap-2 w-full",children:(0,l.jsxs)(n.A,{column:!0,className:"w-full mb-2 xl:mb-0",children:[(0,l.jsx)(d,{mediaObject:e,setLoading:a}),(0,l.jsx)("button",{className:"outlined gray normal-weight more-padding w-full xl:w-auto",onClick:a=>{window.confirm("Delete this media?")&&(0,i.A)("/api/deleteUserMedia",{method:"post",body:e},!0).then(e=>{e.success?(0,s.A)().then(()=>{window.location.reload()}):alert("Media deletion Failed! Please try again.")})},children:"Delete"})]})})]})}function d({mediaObject:e,setLoading:a}){return(0,l.jsx)("button",{onClick:t=>{let l=window.prompt("Rename media",e.media_name);l&&window.confirm(`Rename "${e.media_name}" to "${l}"`)&&(a(!0),(0,i.A)("/api/renameMedia",{method:"post",body:{mediaObject:e,newName:l.replace(/ /g,"-"),newThumbnailName:l.replace(/ /g,"-")+"_thumbnail"}},!0).then(e=>{e.success?window.location.reload():(window.alert(e.msg),setTimeout(()=>{a(!1)},1e3))}))},className:"outlined gray normal-weight more-padding",children:"Rename"})}},55158:(e,a,t)=>{t.d(a,{Ay:()=>r,PB:()=>d,fs:()=>o});var l=t(8732),i=t(58150),s=t(82015),n=t.n(s);function r({children:e,title:a,data:t,fullPage:s,wrapperClasses:r,closePopupDispatch:d,wrapperStyle:c,noContainer:m}){return s?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(r||""),"data-popupid":a||null,style:c,children:[m?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{o(),d&&d()},children:(0,l.jsx)(i.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{o(),d&&d()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[m?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{o(),d&&d()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),m&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{o(),d&&d()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{o(),d&&d()}})]})}function d(e,a){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",a&&a(t))}function o(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},31700:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);t(82015);var i=t(83147);function s({setNewFile:e,setLoading:a}){return(0,l.jsx)("div",{children:(0,l.jsx)("input",{type:"file",name:"upload_file_input",id:"upload_file_input",className:"hidden",accept:".xlsx,.pdf,.csv,.json",multiple:!0,onChange:async t=>{a&&a(!0);let l=[],s=t.target.files;if(s?.length){for(let e=0;e{a&&a(!1)},200)}else window.alert("No Files selected")}})})}},83531:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);t(82015);var i=t(79100);function s({setNewMedia:e,setLoading:a}){return(0,l.jsx)("div",{children:(0,l.jsx)("input",{type:"file",name:"upload_image_input",id:"upload_image_input",className:"hidden",accept:"image/*",multiple:!0,onChange:async t=>{a&&a(!0);let l=[],s=t.target.files;if(s?.length){for(let e=0;e{a&&a(!1)},200)}else window.alert("No Files selected")}})})}},65693:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);t(82015);var i=t(83147);function s({setNewVideo:e,setLoading:a}){return(0,l.jsx)("div",{children:(0,l.jsx)("input",{type:"file",name:"upload_video_input",id:"upload_video_input",className:"hidden",accept:".mp4",multiple:!0,onChange:async t=>{a&&a(!0);let l=[],s=t.target.files;if(s?.length){for(let e=0;e{a&&a(!1)},200)}else window.alert("No Videos selected")}})})}},24671:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(8732);function i(e){return(0,l.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,l.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}t(82015)},62506:(e,a,t)=>{t.d(a,{A:()=>n});var l=t(8732),i=t(82015),s=t.n(i);function n({children:e,column:a,className:t}){let i=s().useRef();return(0,l.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(t?" "+t:""),ref:i,children:e})}},1133:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(99730);async function i({mediaObject:e,fileName:a,setLoading:t}){let i;t&&t(!0);let s=!!(e?.private||e?.media_url?.match(/^\@/));i=s?await (0,l.A)({url:e.media_url||""}):await fetch("/api/fetch-media?url="+e.media_url);let n=s?i:await i.blob(),r=s?i:URL.createObjectURL(n),d=document.createElement("a");d.href=r,d.download=a,d.style.display="none",document.body.appendChild(d),d.click(),URL.revokeObjectURL(r),document.body.removeChild(d),setTimeout(()=>{t&&t(!1)},500)}},99730:(e,a,t)=>{t.d(a,{A:()=>l});async function l({url:e}){return new Promise((a,t)=>{fetch("/api/media/getPrivateMedia",{method:"POST",body:JSON.stringify({path:e}),headers:{"x-csrf-auth":localStorage.getItem("csrf")}}).then(e=>e.blob()).then(e=>{a(URL.createObjectURL(e))})})}},79100:(e,a,t)=>{t.d(a,{A:()=>l});async function l({imageInputFile:e,maxWidth:a}){let t,l,i=document.querySelector("[data-imagepreview='image']"),s=e.name.replace(/\..*/,""),n=document.createElement("canvas"),r=e.type,d=a||null,o=URL.createObjectURL(e),c=new Image;return c.src=o,t=await new Promise((e,a)=>{c.onerror=function(){URL.revokeObjectURL(this.src),console.log("Cannot load image")},c.onload=function(){if(URL.revokeObjectURL(this.src),d){let e=d/c.naturalWidth;n.width=c.naturalWidth{e.src=t}),e(t)}}),l=await new Promise((e,a)=>{n.toBlob(a=>{e(a?.size)},r,.95)}),{imageBase64:t.replace(/.*?base64,/,""),imageBase64Full:t,imageName:s,imageSize:l}}},83147:(e,a,t)=>{t.d(a,{A:()=>l});async function l({inputFile:e}){try{let a=e.name.replace(/\..*/,""),t=await new Promise((a,t)=>{var l=new FileReader;l.readAsDataURL(e),l.onload=function(){a(l.result)},l.onerror=function(e){console.log("Error: ",e.message)}});return{fileBase64:t.replace(/.*?base64,/,""),fileBase64Full:t,fileName:a,fileSize:e.size,fileType:e.type}}catch(a){return console.log("Image Processing Error! =>",a.message),{fileBase64:null,fileBase64Full:null,fileName:e.name,fileSize:null,fileType:null}}}},23293:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},6070:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},17855:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,a)=>{var t;Object.defineProperty(a,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/7713.js b/dsql-app/.local_dist/server/chunks/7713.js new file mode 100644 index 0000000..fa023ab --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/7713.js @@ -0,0 +1,16 @@ +"use strict";exports.id=7713,exports.ids=[7713],exports.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},91258:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(8732),n=r(82015),a=r.n(n);function l({pageTitle:e,pageDescription:t,pagePathname:r,aceEditor:n}){return(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:title",content:e}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{itemProp:"name",content:e}),(0,s.jsx)("meta",{itemProp:"description",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:e}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),n&&(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},24093:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(8732);function n({pages:e}){if(!e||!e[0])return null;let t=e?.filter(e=>1==e.level);return(0,s.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,s.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,s.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function t(r,n){return r.map((r,a)=>{let l=`${n}/${r.slug}`,o=e.filter(e=>2==e.level&&e.parent_id==r.id);return(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:l,className:r?.level==1?"font-semibold":"text-slate-600",children:r.title}),o&&o[0]&&(0,s.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:t(o,l)})]},a)})}(t,"/docs")})]})}r(82015)},69237:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(8732);function n({title:e,description:t}){return(0,s.jsxs)("section",{className:"py-14",children:[(0,s.jsx)("div",{className:"w-full gap-10 justify-between items-start flex-col lg:flex-row relative z-10",children:(0,s.jsxs)("div",{className:"flex-col items-start max-w-[740px] text-left",style:{minWidth:"45%"},children:[(0,s.jsx)("h1",{className:"m-0 leading-tight",children:e}),(0,s.jsx)("span",{className:"font-normal text-xl -my-4",dangerouslySetInnerHTML:{__html:t}})]})}),(0,s.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}r(82015)},82271:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(46169);function n({setUser:e}){let t=localStorage.getItem("user");if(t)try{e(JSON.parse(t));return}catch(t){e({});return}(0,s.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let r=t.user?t.user:{};e(r),localStorage.setItem("user",JSON.stringify(r))}).catch(e=>{console.log(e)})}},47410:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(29021),n=r.n(s),a=r(77047);async function l(...e){let t;"production".match(/dev/)&&n().appendFileSync("./.tmp/sqlQuery.sql",e[0]+"\n"+Date()+"\n\n\n","utf8");try{let r=global.DSQL_DB_CONN;t=await new Promise((t,s)=>{r.query(...e,(e,r,s)=>{e?t({error:e.message}):t(r)})}),await r.end()}catch(e){n().appendFileSync("./.tmp/dbErrorLogs.txt",JSON.stringify(e,null,4)+"\n"+Date()+"\n\n\n","utf8"),t=null,(0,a.A)({component:"dbHandler",message:e.message})}return t?JSON.parse(JSON.stringify(t)):null}},77047:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(29021),n=r.n(s);async function a({user:e,message:t,component:r,noMail:s,req:a}){let l=new Date,o=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],t=a.headers["x-real-ip"],r=a.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=r||s||t||a.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +Error Message: ${t} +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(s+=` +IP: ${o}`),s+=` +Date: ${l.toDateString()} +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let i=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` + + + + +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},5583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(8732);r(82015);var n=r(20883);function a(){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/8540.js b/dsql-app/.local_dist/server/chunks/8540.js deleted file mode 100644 index c02cc49..0000000 --- a/dsql-app/.local_dist/server/chunks/8540.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict";exports.id=8540,exports.ids=[8540],exports.modules={77619:(e,t,r)=>{let a=r(29021),l=r(72835);e.exports=({key:e,database:t,table:r,user_id:s,media:n})=>{if(!e||!s)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let o=l({encryptedString:e}),c=JSON.parse(o||""),u=a.existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(s)||!u)return null;if(!c.target_database||n)return c;if(!t&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(t));if(d&&!c.target_table)return c;if(d&&!r&&c.target_table)return null;if(c.target_table?.split(",").includes(String(r)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},64122:(e,t,r)=>{let a=r(51348),l=r(21339),s=r(44900);async function n({dbContext:e,paradigm:t,dbFullName:r,tableName:n,identifierColumnName:i,identifierValue:o,useLocal:c}){try{let u=!!c||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),d=c?s:u?a:l,p=`DELETE FROM ${n} WHERE \`${i}\`=?`;return u?await d(p,[o]):await d({paradigm:t,queryString:p,database:r,queryValues:[o]})}catch(e){return null}}e.exports=n},8238:(e,t,r)=>{r(29021),r(44900);let a=r(94709),l=r(96064),s=r(48225),n=r(47670),i=r(33364),o=r(64122);r(6061);let c=r(33872);async function u({dbFullName:e,query:t,readOnly:r,dbSchema:u,queryValuesArray:d,tableName:p,local:m}){let g,f,y;if(u)try{let e=p||("string"==typeof t?null:t?t?.table:null);if(!e)throw Error("No table name provided");y=u.tables.filter(t=>t?.tableName===e)[0]}catch(e){}try{if("string"==typeof t){let s=c(t);if(r&&s.match(/^alter|^delete|information_schema|^create/i))throw Error("Wrong Input!");g=r?await l({queryString:s,queryValuesArray:d?.map(e=>String(e)),database:e,tableSchema:y,useLocal:m}):await a({queryString:s,queryValuesArray:d?.map(e=>String(e)),database:e,tableSchema:y,local:m})}else if("object"==typeof t){let{data:r,action:a,table:l,identifierColumnName:s,identifierValue:c,update:u,duplicateColumnName:d,duplicateColumnValue:p}=t;switch(a.toLowerCase()){case"insert":g=await n({dbContext:m?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:l,data:r,update:u,duplicateColumnName:d,duplicateColumnValue:p,tableSchema:y,useLocal:m}),g?.insertId||(f=Error("Couldn't insert data"));break;case"update":g=await i({dbContext:m?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:l,data:r,identifierColumnName:s,identifierValue:c,tableSchema:y,useLocal:m});break;case"delete":g=await o({dbContext:m?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:l,identifierColumnName:s,identifierValue:c,tableSchema:y,useLocal:m});break;default:g=null}}}catch(e){s({component:"functions/backend/runQuery",message:e.message}),g=null,e=e.message}return{result:g,error:f}}e.exports=u},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},94709:(e,t,r)=>{let a=r(21339),l=r(44900),s=r(6061),n=r(48225);e.exports=async function({queryString:e,database:t,tableSchema:r,queryValuesArray:i,local:o}){let c;try{c=o?await l(e,i):await a({paradigm:"Full Access",database:t,queryString:e,queryValues:i})}catch(e){return n({component:"fullAccessDbHandler",message:e.message}),e.message}if(c&&r){let e=c;return await s({unparsedResults:e,tableSchema:r})}return c||null}},6061:(e,t,r)=>{let a=r(72835),l=r(30003);e.exports=async function({unparsedResults:e,tableSchema:t}){let r=[];try{for(let s=0;s",t.message),e}}},48225:(e,t,r)=>{let a=r(29021),{IncomingMessage:l}=r(81630);e.exports=async function({user:e,message:t,component:r,noMail:l,req:s}){let n=new Date,i=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],t=s.headers["x-real-ip"],r=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],l=r||a||t||s.socket.remoteAddress;if(!l)return null;return String(l)}catch(e){return null}})();try{let l=`🚀 SERVER ERROR =========================== -Error Message: ${t} -Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(l+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),s?.url&&(l+=` -URL: ${s.url}`),s?.body&&(l+=` -Request Body: ${JSON.stringify(s.body,null,4)}`),i&&(l+=` -IP: ${i}`),l+=` -Date: ${n.toDateString()} -========================================`,a.existsSync("./.tmp/error.log")||a.writeFileSync("./.tmp/error.log","","utf-8");let o=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",l),a.appendFileSync("./.tmp/error.log",` - - - - -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},96064:(e,t,r)=>{r(29021);let a=r(48225),l=r(6061),s=r(21339),n=r(44900);e.exports=async function({queryString:e,database:t,queryValuesArray:r,tableSchema:i,useLocal:o}){let c;try{c=o?await n(e,r):await s({paradigm:"Read Only",database:t,queryString:e,queryValues:r})}catch(e){return a({component:"varReadOnlyDatabaseDbHandler",message:e.message,noMail:!0}),e.message}if(!c)return null;{let e=c;return await l({unparsedResults:e,tableSchema:i})}}},72835:(e,t,r)=>{let{scryptSync:a,createDecipheriv:l}=r(55511),{Buffer:s}=r(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=r||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=l("aes-192-cbc",a(n,i,o),s.alloc(16,0));try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},33872:(e,t,r)=>{r(55591),r(81630),e.exports=function(e){return e.replace(/\n|\r|\n\r|\r\n/gm," ").replace(/ {2,}/g," ").trim()}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/8613.js b/dsql-app/.local_dist/server/chunks/8613.js deleted file mode 100644 index e7a4930..0000000 --- a/dsql-app/.local_dist/server/chunks/8613.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict";exports.id=8613,exports.ids=[8613],exports.modules={64417:(e,t,a)=>{a.d(t,{A:()=>u});var l=a(8732),s=a(82015),n=a.n(s),i=a(65388),r=a(84896),d=a(27825),o=a.n(d);function u({targetField:e,fieldIndex:t,tableFields:s,setTableFields:d,refreshFieldsListRef:u,setActiveEdit:c,database:m,currentTable:x,user:p}){let h=e?.dataType?e.dataType.replace(/\d|\(|\)/g,""):null,f=e?.dataType?e.dataType.replace(/[^\d]/g,""):"200",g=a(94327),v=n().useRef(o().cloneDeep(e)),y=n().useRef(),[N,j]=n().useState(e),[b,w]=n().useState(e?.fieldName),[T,_]=n().useState(h),[V,S]=n().useState(f),[F,I]=n().useState("Varchar is simply letters and numbers within the range 0 - 255"),[C,A]=n().useState(e?.richText&&!e?.encrypted?"Yes":"No"),k=!!T?.match(/uuid/i);return(0,l.jsx)("div",{className:"w-full -mt-3 bg-white dark:bg-slate-800 flex-wrap",ref:y,children:(0,l.jsxs)("form",{className:"flex flex-col xl:flex-row items-start gap-4 w-full justify-between border border-solid p-4 border-slate-200 dark:border-slate-600 rounded rounded-t-none focus:shadow-lg shadow-slate-700 dark:shadow-black relative flex-wrap",onSubmit:e=>{e.preventDefault(),d(e=>(e[t]=N,e)),u.current(e=>e+1);let a=e.target;a.closest(".table-field-wrapper")?.querySelector(".edit-table-field-section")?.classList.toggle("hidden")},children:[(0,l.jsxs)("div",{className:"gap-4 flex-wrap w-full md:w-auto flex-col xl:flex-row items-stretch",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_name",children:"Field Name"}),(0,l.jsx)("input",{type:"text",name:"new_field_name",id:"new_field_name",placeholder:"Eg. post_title",onInput:async e=>{let t=e.target;t.value=t.value.toLowerCase().replace(/ /g,"_"),j(e=>(e.fieldName=t.value,e.updatedField=!0,e.originName||(e.originName=b),e))},required:!0,defaultValue:b})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"flex-wrap xl:flex-nowrap w-full md:w-auto",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Data Type"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:F})})]})]}),(0,l.jsxs)("div",{className:"w-auto",children:[(0,l.jsx)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl-w-auto",onChange:t=>{let a=t.target;_(a.value),a.childNodes.forEach(e=>{e.value===a.value&&e.dataset.desc&&I(e.dataset.desc),e.value===a.value&&e.dataset.literal?(N.defaultValueLiteral=e.dataset.literal,N.nullValue=!1):delete N.defaultValueLiteral}),e.dataType=a.value+(a.value.match(/VARCHAR/)?`(${V||200})`:"")},defaultValue:T||void 0,children:g.map((e,t)=>e.name.match(/VARCHAR/)?(0,l.jsx)("option",{value:e.name,"data-desc":e.description,children:e.title+"("+(V||200)+")"},t+1):(0,l.jsx)("option",{value:e.name,"data-desc":e.description,"data-literal":e.valueLiteral||void 0,children:e.title},t+1))}),T?.match(/VARCHAR/)&&(0,l.jsx)("input",{type:"number",defaultValue:V||200,className:"px-2",style:{maxWidth:"60px"},max:255,min:5,onChange:t=>{S(t.target.value),e.dataType=T+`(${t.target.value})`}})]})]}),T?.match(/text/i)&&(0,l.jsx)(n().Fragment,{children:(0,l.jsx)(r.A,{targetField:e})}),!e.dataType?.match(/text/i)&&!k&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Required?"}),(0,l.jsxs)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",defaultValue:e?.notNullValue?"Yes":"No",onChange:t=>{console.log(e),"Yes"===t.target.value?e.notNullValue=!0:(e.notNullValue=!1,delete e.notNullValue)},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]}),!k&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_default_value",children:N?.dataType?.match(/text$/i)?"Can't Set Default for text values":"Default Value (optional)"}),(0,l.jsx)("input",{type:"text",name:"new_field_default_value",id:"new_field_default_value",className:N?.dataType?.match(/text$/i)?"pointer-events-none opacity-50":"",placeholder:"Default Value",defaultValue:N?.defaultValue?N.defaultValue:N?.nullValue?"NULL":"",onInput:e=>{let t=e.target;N.dataType?.match(/text$/i)||j(e=>(t.value.match(/./)?delete e.notNullValue:(delete e.defaultValue,delete e.nullValue),t.value.match(/^null$/i)?(delete e.defaultValue,e.nullValue=!0):t.value.match(/./)&&(delete e.nullValue,e.defaultValue=t.value),e))}})]}),!k&&(0,l.jsx)(i.A,{database:m,setFieldData:j,setTableFields:d,tableFields:s,targetField:e,user:p,currentTable:x,fieldIndex:t})]}),(0,l.jsxs)("div",{className:"secondary mt-auto flex-wrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full md:w-auto grow",children:"Save Updates"}),(0,l.jsx)("div",{className:"button outlined gray mt-auto py-2.5 w-full md:w-auto justify-center grow",onClick:a=>{v.current&&(e=o().cloneDeep(v.current)),d(e=>{let a=o().cloneDeep(e);return t&&v.current&&(a[t]=o().cloneDeep(v.current)),a}),c&&c(!1)},children:"Cancel"})]})]})})}},65388:(e,t,a)=>{a.d(t,{A:()=>g});var l=a(8732),s=a(82015),n=a.n(s),i=a(13737),r=a(58150);function d({targetField:e}){if(!e?.richText)return null;let[t,a]=n().useState(e.cssFiles||[]),s=n().useRef(null);return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full my-4",style:{minWidth:"70px"},children:[(0,l.jsx)("span",{className:"label text-xs text-slate-500",children:"Add CSS"}),t.map((e,t)=>(0,l.jsxs)("div",{className:"relative border border-solid border-slate-300 text-xs px-2 py-1 rounded-full",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(r.A,{size:20,onClick:()=>{a(t=>t.filter(t=>t!==e))},className:"cursor-pointer hover:opacity-60 "})]},t+1)),(0,l.jsxs)("div",{className:"row w-full",children:[(0,l.jsx)(i.A,{name:"css-file",placeholder:"CSS file URL",elementRef:s}),(0,l.jsx)("button",{className:"secondary outlined",onClick:()=>{let e=s.current?.value;e?.match(/./)&&a(t=>[...new Set([...t,e])])},children:"Add"})]}),(0,l.jsx)("span",{className:"text-sm text-slate-600",children:"Add CSS files to your Rich Text field"})]})}function o({targetField:e,setFieldData:t}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"encryption_field",children:"Encrypt?"}),(0,l.jsxs)("select",{name:"encryption_field",id:"encryption_field",className:"px-2",defaultValue:e?.encrypted?"Yes":"No",onChange:e=>{t&&t(t=>(e.target.value.match(/yes/i)?t.encrypted=!0:(t.encrypted=!1,delete t.encrypted),t))},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]})}var u=a(12097);function c({targetField:e,setFieldData:t}){return null}function m({targetField:e}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"encryption_field",children:"Pattern"}),(0,l.jsx)("span",{className:"text-sm text-slate-500",children:'This describes a pattern that must be matched for this field to be valid. If you add a pattern and make a db entry that doesn\'t match, the entry will be "NULL" or an empty string or the default value.'}),(0,l.jsx)("input",{type:"text",placeholder:"Regex Pattern. Eg: '\\\\.[a-z]+'",onInput:t=>{let a=t.target;a?.value?.length>0?e.pattern=a.value:delete e.pattern},defaultValue:e?.pattern}),(0,l.jsx)("input",{type:"text",placeholder:"Regex Pattern Flags. Eg: igm",onInput:t=>{let a=t.target;a?.value?.length>0?e.patternFlags=a.value:delete e.patternFlags},defaultValue:e?.patternFlags})]})}var x=a(27825),p=a.n(x),h=a(2817);function f({targetField:e,setFieldData:t}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"unique_field",children:"Unique Field?"}),(0,l.jsxs)("select",{name:"unique_field",id:"unique_field",className:"px-2",defaultValue:e?.unique?"Yes":"No",onChange:e=>{t&&t(t=>(e.target.value.match(/yes/i)?t.unique=!0:(t.unique=!1,delete t.unique),t))},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]})}function g({targetField:e,currentTable:t,database:a,tableFields:s,setTableFields:i,setFieldData:r,user:x,fieldIndex:g}){let[v,y]=n().useState(!1),N=n().useRef(p().cloneDeep(e));return(0,l.jsxs)(n().Fragment,{children:[(0,l.jsx)("span",{className:"button outlined gray mt-5 w-full xl:w-auto",onClick:()=>{y(!0)},children:"More"}),(0,l.jsx)(h.A,{open:v,onClose:()=>{N.current&&(e=p().cloneDeep(N.current)),y(!1)},maxWidth:"600px",children:(0,l.jsxs)("div",{className:"m-auto flex flex-col max-w-xl w-full max-h-[90vh] overflow-y-auto",children:[(0,l.jsx)("div",{className:"w-full justify-between",children:(0,l.jsx)("span",{className:"text-xl",children:"More Options"})}),(0,l.jsx)(d,{targetField:e}),(0,l.jsx)(f,{targetField:e,setFieldData:r}),(0,l.jsx)(o,{targetField:e,setFieldData:r}),t&&(0,l.jsx)(u.A,{targetField:e,setFieldData:r,database:a,tableFields:s,setTableFields:i,currentTable:t,user:x}),(0,l.jsx)(c,{targetField:e,setFieldData:r}),(0,l.jsx)(m,{targetField:e}),(0,l.jsx)("button",{className:"w-full outlined more-padding",onClick:()=>{y(!1)},children:"Done"})]})})]})}},12097:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(8732),s=a(82015),n=a.n(s),i=a(63715),r=a(32415),d=a(58403);function o({targetField:e,setFieldData:t,tableFields:a,setTableFields:s,database:o,currentTable:u,user:c,setActiveEdit:m,activeClonedTable:x}){let[p,h]=n().useState(!!e?.foreignKey),[f,g]=n().useState(null),[v,y]=n().useState(null),[N,j]=n().useState(null),[b,w]=n().useState(null),[T,_]=n().useState(!1),[V,S]=n().useState("boolean"!=typeof e.foreignKey?.cascadeDelete||e.foreignKey.cascadeDelete),[F,I]=n().useState("boolean"==typeof e.foreignKey?.cascadeUpdate&&e.foreignKey.cascadeUpdate);return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full mt-2 relative",style:{minWidth:"70px"},children:[T&&(0,l.jsx)(r.A,{}),(0,l.jsxs)("label",{htmlFor:"foreign_key_field",className:"flex flex-wrap items-center gap-2 mt-2",children:[(0,l.jsx)("span",{children:"Foreign Key?"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 rounded-full hover:bg-slate-100 hidden xl:flex text-slate-600",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:"Foriegn key links the current table to another table"})})]})]}),(0,l.jsxs)("select",{name:"foreign_key_field",id:"foreign_key_field",className:"px-2",defaultValue:e?.foreignKey?"Yes":"No",onChange:e=>{e.target.value.match(/yes/i)?(h(!0),t&&t(e=>(e.foreignKey={foreignKeyName:void 0,destinationTableName:void 0,destinationTableColumnName:void 0,cascadeDelete:!0},e))):(h(!1),t&&t(e=>(delete e.foreignKey,e)))},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]}),p&&f&&(0,l.jsx)(n().Fragment,{children:(0,l.jsxs)("select",{name:"foreign_key_destination_table_name",id:"foreign_key_destination_table_name",className:"px-2",defaultValue:e?.foreignKey?.destinationTableName?e.foreignKey.destinationTableName:void 0,onChange:e=>{let a=e.target;if(e.target.value?.match(/--/)){t?t(e=>{let t=e.foreignKey;return t&&(t.destinationTableName=void 0),e}):a.dataset.destinationTableName=void 0;return}let l=f.filter(t=>t.tableName===e.target.value)[0];y(l),l?.fields&&j(l.fields),t?t(t=>{let a=t.foreignKey;return a&&(a.destinationTableName=e.target.value),t}):e.target.dataset.destinationTableName=e.target.value},children:[(0,l.jsx)("option",{value:"--",children:"--Select Table--"}),f.map((e,t)=>(0,l.jsx)("option",{value:e.tableName,children:e.tableFullName},t+1))]})}),v&&N&&(0,l.jsxs)(n().Fragment,{children:[(0,l.jsxs)("select",{name:"foreign_key_destination_table_column_name",id:"foreign_key_destination_table_column_name",className:"px-2",defaultValue:e?.foreignKey?.destinationTableColumnName?e.foreignKey.destinationTableColumnName:void 0,onChange:e=>{try{let a=N.filter(t=>t.fieldName===e.target.value)[0];if(w(a),e.target.value?.match(/--/)){t&&t(e=>{let t=e.foreignKey;return t&&(t.destinationTableColumnName=void 0),e});return}let l=`dsql_${o.user_id}_${o.db_slug}_${Date.now()}`;t?t(e=>{e.dataType=a.dataType;let t=e.foreignKey;return t&&(t.destinationTableColumnName=a.fieldName,t.destinationTableColumnType=a.dataType,t.foreignKeyName=l),e}):(e.target.dataset.dataType=a.dataType,e.target.dataset.destinationTableColumnName=a.fieldName,e.target.dataset.foreignKeyName=l)}catch(e){(0,i.A)("/api/admin/clientError",{method:"post",body:{component:"ForeignKey/lines-232-264",message:e.message,user:c}})}},children:[(0,l.jsx)("option",{value:"--",children:"--Select Column--"}),N.map((e,t)=>(0,l.jsx)("option",{value:e.fieldName,children:e.fieldName},t+1))]}),x&&b&&(0,l.jsx)("button",{className:"secondary w-full",onClick:e=>{_(!0),(0,i.A)("/api/updateClonedTableForeignKeys",{method:"post",body:{tableData:u,database:o.db_full_name,dbSlug:o.db_slug,delegated:!!window.location?.search?.match(/delegated=true/i)}},!0).then(e=>{e.success?window.alert("Foreign Key Added Successfully!"):window.alert("Update Failed, Please Try again."),setTimeout(()=>{m&&m(!1)},1e3)})},children:"Add Foreign Key"}),(0,l.jsx)(d.A,{checkBoxValues:[{title:"Cascade Delete",default:V,name:"cascade-delete",onChangeHandler:e=>{S(e.target.checked)}},{title:"Cascade Update",name:"cascade-update",default:F,onChangeHandler:e=>{I(e.target.checked)}}],smallText:!0})]}),x&&(0,l.jsx)("button",{className:"light-gray w-full",onClick:t=>{delete e.foreignKey,m&&m(!1)},children:"Cancel"})]})}},84896:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(8732);function s({targetField:e}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"rich_text_option",children:"Text Type"}),(0,l.jsxs)("select",{name:"rich_text_option",id:"rich_text_option",className:"px-2",onChange:t=>{switch(delete e.json,delete e.richText,delete e.yaml,delete e.html,delete e.javascript,delete e.shell,t.target.value){case"plain":break;case"rte":e.richText=!0;break;case"json":e.json=!0;break;case"yaml":e.yaml=!0;break;case"html":e.html=!0;break;case"css":e.css=!0;break;case"javascript":e.javascript=!0;break;case"shell":e.shell=!0}},defaultValue:e.richText?"rte":e.json?"json":e.yaml?"yaml":e.html?"html":e.javascript?"javascript":e.shell?"shell":e.css?"css":"plain",children:[(0,l.jsx)("option",{value:"plain",children:"Plain Text"}),(0,l.jsx)("option",{value:"rte",children:"Rich Text"}),(0,l.jsx)("option",{value:"json",children:"JSON"}),(0,l.jsx)("option",{value:"yaml",children:"YAML"}),(0,l.jsx)("option",{value:"html",children:"HTML"}),(0,l.jsx)("option",{value:"css",children:"CSS"}),(0,l.jsx)("option",{value:"javascript",children:"Javascript"}),(0,l.jsx)("option",{value:"shell",children:"Shell"})]})]})}a(82015)},58403:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(8732);function s({name:e,checkBoxValues:t,setAlert:a,labelColor:s,flexRow:n,baseText:i,smallText:r,className:d}){return(0,l.jsx)("div",{className:"flex items-start gap-x-4"+(n?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(d||""),children:t.map((t,n)=>{let{payload:d,title:o,onChangeHandler:u,fixed:c,jsx:m}=t,x=t.name?`${e}-${t.name}`:d?e+"-"+d:e;return(0,l.jsxs)("div",{className:"flex items-center"+(t.default&&c?" pointer-events-none":"")+(r?" gap-1 ":" gap-2 ")+(t?.className?t.className:""),children:[(0,l.jsx)("input",{className:"m-0"+(r?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!t.default,name:x,id:x,onChange:e=>{a&&a(null),u&&u(e,t)},value:d,style:{minWidth:"20px"},...t.props}),m||(0,l.jsx)("label",{htmlFor:x,className:"m-0 "+(s||"text-slate-800 dark:text-white/80")+(i||r?" text-base":" text-lg"),children:o})]},n+1)})})}a(82015)},2817:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(8732);function s({children:e,open:t,setOpen:a,onClose:s,maxWidth:n}){return(0,l.jsx)(l.Fragment,{})}a(82015),a(1976),a(58150)},22373:(e,t,a)=>{let l=a(29021),{IncomingMessage:s}=a(81630);e.exports=async function({user:e,message:t,component:a,noMail:s,req:n}){let i=new Date,r=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],a=n.headers["cf-connecting-ip"],l=Array.isArray(e)?e[0]:e?.split(",")[0],s=a||l||t||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== -Error Message: ${t} -Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(s+=` -URL: ${n.url}`),n?.body&&(s+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),r&&(s+=` -IP: ${r}`),s+=` -Date: ${i.toDateString()} -========================================`,l.existsSync("./.tmp/error.log")||l.writeFileSync("./.tmp/error.log","","utf-8");let d=l.readFileSync("./.tmp/error.log","utf-8");l.writeFileSync("./.tmp/error.log",s),l.appendFileSync("./.tmp/error.log",` - - - - -${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/8704.js b/dsql-app/.local_dist/server/chunks/8704.js new file mode 100644 index 0000000..104cff7 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/8704.js @@ -0,0 +1 @@ +"use strict";exports.id=8704,exports.ids=[8704],exports.modules={39506:(e,t,a)=>{a.d(t,{A:()=>o});var s=a(8732),l=a(82015),n=a.n(l),r=a(16757),i=a(83921),d=a(46169);function c({paradigm:e,payload:t,setLoading:a,table:s,database:l}){a(!0),(0,d.A)("/api/exportTableData",{method:"POST",body:{paradigm:e,dbName:l.db_slug,tableName:s.tableName,payload:t}},!0).then(t=>{if(t.success){if("export"==e){let e=new Blob([JSON.stringify(t.data||[],null,4)],{type:"application/json"}),a=URL.createObjectURL(e),n=document.createElement("a");n.href=a,n.style.display="none",n.download=`${l.db_slug}-${s.tableName}-${Date.now()}.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n)}else"import"==e&&(window.alert("Data Imported Successfully"),window.location.reload())}else t.msg&&window.alert(t.msg)}).catch(e=>{console.log(e)}).finally(()=>{a(!1)})}function o({database:e,table:t}){let[a,l]=n().useState(!1),[d,o]=n().useState(!0),u=n().useRef(null);return n().useRef(null),(0,s.jsxs)("div",{className:"relative",children:[a&&(0,s.jsx)(r.A,{width:"15px"}),(0,s.jsx)("div",{className:"button outlined gray",onClick:a=>{c({paradigm:"export",database:e,setLoading:l,table:t})},children:"Export"}),(0,s.jsx)("div",{className:"button outlined gray",onClick:a=>{u.current?.addEventListener("change",a=>{l(!0);let s=a.target;if(!s.files?.[0]){window.alert("No FIles selected"),l(!1);return}i.A({inputFile:s.files[0]}).then(a=>{window.confirm(`Use this file '${a.fileName}' as your import file?`)?c({paradigm:"import",payload:a.fileBase64,database:e,setLoading:l,table:t}):l(!1),o(!1),setTimeout(()=>{o(!0)},200)})}),u.current?.click()},children:"Import"}),d&&(0,s.jsx)("input",{type:"file",name:"json_file_input",id:"json_file_input",accept:".json",className:"hidden",ref:u})]})}},42427:(e,t,a)=>{a.d(t,{A:()=>x});var s=a(8732),l=a(82015),n=a.n(l),r=a(41836),i=a(95939),d=a(1346),c=a(80830),o=a(16757),u=a(84483),m=a(46169);function h({database:e,table:t,setOpenPopover:a,dbSchemaData:l,query:r}){let[i,d]=n().useState(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{className:"ghost p-3 justify-start",onClick:()=>{d(!0),setTimeout(()=>{a&&a(!1)},200)},children:"Sync Data"}),(0,s.jsx)(u.A,{open:i,setOpen:d,children:(0,s.jsx)(b,{database:e,table:t,dbSchemaData:l,query:r})})]})}function b({database:e,table:t,query:a,dbSchemaData:l}){let[r,i]=n().useState(l),[u,h]=n().useState("Push"),[b,x]=n().useState(r?.[0]),[p,f]=n().useState(b?.tables),[g,j]=n().useState(p?.[0]),[N,y]=n().useState(!1),[w,v]=n().useState(!1);return(0,s.jsxs)("div",{className:"stack gap-2 relative w-full",children:[N||!r&&(0,s.jsx)(o.A,{width:"20px"}),(0,s.jsx)("h3",{className:"m-0 text-lg",children:"Sync Data with another table"}),w?(0,s.jsxs)("span",{className:"info green inline",children:["The selected table matches ",(0,s.jsx)("b",{children:t.tableFullName})," ","schema"]}):(0,s.jsxs)("span",{className:"info warning inline",children:["The selected table is not compatible with"," ",(0,s.jsx)("b",{children:t.tableFullName})]}),r&&(0,s.jsxs)("form",{onSubmit:s=>{!function({e,setLoading:t,database:a,table:s,query:l}){e.preventDefault(),t(!0);let n=e.target,r=n.paradigm?.value,i=n.database?.value,d=n.table?.value,c={paradigm:r,src:{db:a.db_slug,table:s.tableName},dst:{db:i,table:d},delegated:l.delegated};if(!window.confirm("Pull"==r?"NOTE: This operation will override the current database entries. Continue?":"NOTE: This operation will override the selected database entries. Continue?")){setTimeout(()=>{t(!1)},1e3);return}(0,m.A)("/api/sync-table-data",{method:"POST",body:{...c}},!0).then(e=>{e.success?(window.alert("Data Sync Successful"),window.location.reload()):e.msg&&window.alert("ERROR: "+e.msg)}).finally(()=>{setTimeout(()=>{t(!1)},1e3)})}({e:s,database:e,setLoading:y,table:t,query:a})},className:"w-full stack gap-2 items-stretch",children:[(0,s.jsxs)("div",{className:"stack gap-2 my-2",children:[(0,s.jsx)(d.A,{radioValues:[{title:"Push",payload:"Push",default:!0},{title:"Pull",payload:"Pull"}],name:"paradigm",smallText:!0,flexRow:!0,onChangeHandler:e=>{h(e.target.value)}}),(0,s.jsx)("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Push"==u?(0,s.jsxs)(s.Fragment,{children:["Sync data from the current table(",(0,s.jsx)("b",{children:t.tableFullName}),") to the selected table below"]}):(0,s.jsxs)(s.Fragment,{children:["Sync data from the selected table below to the current table(",(0,s.jsx)("b",{children:t.tableFullName}),")"]})})]}),(0,s.jsx)(c.A,{selectOptions:r.filter(t=>t.dbFullName!==e.db_full_name).map(e=>({title:e.dbName,payload:e.dbSlug})),name:"database",onChangeHandler:e=>{let t=r.find(t=>t.dbSlug==e.target.value);t&&(x(t),f(t.tables),j(t.tables?.[0]))}}),(0,s.jsx)(c.A,{selectOptions:p.map(e=>({title:e.tableFullName,payload:e.tableName})),name:"table",onChangeHandler:e=>{let t=p.find(t=>t.tableName===e.target.value);t&&j(t)}}),(0,s.jsx)("button",{className:w?"":"disabled",children:"Sync"})]})]})}function x({database:e,table:t,dbSchemaData:a,query:l}){let[d,c]=n().useState(!1);return(0,s.jsx)(r.Popover,{isOpen:d,onClickOutside:()=>c(!1),positions:["bottom"],align:"end",content:(0,s.jsxs)("div",{className:"stack items-stretch bg-white rounded shadow-md gap-0 min-w-[200px]",children:[(0,s.jsx)(h,{database:e,table:t,setOpenPopover:c,dbSchemaData:a,query:l}),(0,s.jsx)("hr",{className:"m-0"})]}),containerClassName:"z-[1000]",children:(0,s.jsx)("button",{onClick:()=>{c(!d)},className:"outlined gray px-2 py-1.5",children:(0,s.jsx)(i.A,{})})})}a(27825)},7141:(e,t,a)=>{a.a(e,async(e,s)=>{try{let b;a.d(t,{A:()=>h});var l=a(8732),n=a(82015),r=a.n(n),i=a(78704),d=a(80830),c=a(83155),o=a(46169),u=a(16757),m=e([i]);function h({data:e}){let{table:t,entries:s,activeEntries:n,setActiveEntries:m,confirmedDelegetedUser:h,database:x,targetField:p,searchTerm:f}=r().useContext(i.TableEntriesContext);a(94327),h?.delegated,h?.priviledges?.match(/Edit Tables/i),h?.priviledges?.match(/Delete Tables/i),h?.priviledges?.match(/Create Tables/i);let[g,j]=r().useState(!1),N=r().useRef(),[y,w]=r().useState(null);function v(e){if(j(!0),n&&m(null),!e?.toString().match(/./)){setTimeout(()=>{m&&m(s||[]),j(!1)},500);return}window.clearTimeout(b);let a=t?.fields.filter(e=>e.fieldName===p?.current),l=a&&a[0]&&a[0].dataType?.match(/int/i)||p?.current?.match(/^id$/)?"equal":"like";b=setTimeout(()=>{j(!1),(0,o.A)(`/api/queryEntriesSearchTerm?db=${x?.db_full_name}&table=${t?.tableName}&field=${p?.current}&term=${e}&operator=${l}`).then(e=>{"number"==typeof e.count&&w(e.count),e.success&&m&&m(e.result),j(!1)})},500)}return(0,l.jsxs)("div",{className:"w-full flex-col items-stretch",children:[(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),f?.current&&v(f.current)},className:"flex flex-row items-stretch gap-4 w-full",children:[(0,l.jsx)("div",{className:"max-w-xs",children:(0,l.jsx)(d.A,{required:!0,selectOptions:t?t.fields.map(e=>({title:e.fieldName||"",payload:e.fieldName||""})):[],name:"database_tables",onChangeHandler:e=>{p&&(p.current=e.target.value)},title:"Select Field",defaultValue:p?.current,id:"entries-search-field-select"})}),(0,l.jsx)("div",{className:"grow",children:(0,l.jsx)(c.A,{title:"Search Term",placeholder:"Enter search term that corresponds with the selected field type ...",onInputHandler:e=>{let t=e.target;t.value?.match(/./)&&f?f.current=t.value:f&&(f.current=null),v(t.value)},elementRef:N,id:"entries-search-input"})}),g&&(0,l.jsx)("div",{className:"relative items-center justify-center",children:(0,l.jsx)("div",{className:"relative mt-5 w-6",children:(0,l.jsx)(u.A,{width:"20px"})})})]}),f?.current?.match(/./)&&(0,l.jsx)("div",{className:"py-4",children:(0,l.jsxs)("span",{className:"text-lg",children:["number"==typeof y?y>0?(0,l.jsxs)("b",{children:[y," "]}):(0,l.jsx)(l.Fragment,{children:"No "}):"... ","Search result",y&&1!==y?"s":""," for"," ",(0,l.jsxs)("b",{children:['"',f.current,'"']})]})})]})}i=(m.then?(await m)():m)[0],s()}catch(e){s(e)}})},61925:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>j});var l=a(8732),n=a(82015),r=a.n(n),i=a(78704),d=a(59023),c=a(53926),o=a(73872),u=a(70468),m=a(537),h=a(51275),b=a(23791),x=a(16757);a(46169);var p=a(39506),f=a(42427),g=e([i,o,u,b]);function j(){let{user:e,database:t,table:s,dbSchemaData:n,setTargetEntry:x,richTextEditors:g,jsonTextEditors:j,query:y,confirmedDelegetedUser:w,activeEntries:v,entriesCount:S,setActiveEntries:A}=r().useContext(i.TableEntriesContext),T=a(94327);return w?.delegated,w?.priviledges?.match(/Edit Tables/i),w?.priviledges?.match(/Delete Tables/i),w?.priviledges?.match(/Create Tables/i),(0,l.jsxs)(r().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{className:"flex-wrap",children:[(0,l.jsx)(d.A,{}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:(0,l.jsxs)("span",{className:"flex items-center flex-wrap gap-2",children:["All Entries In"," ",(0,l.jsxs)("span",{className:"bg-slate-100 dark:bg-slate-800 px-2 py-1 border border-solid border-slate-400 dark:border-slate-600 rounded relative",children:[s.tableFullName,(0,l.jsx)("div",{className:"absolute -top-5 -right-4",children:(0,l.jsx)(o.A,{slugText:s.tableName,justIcon:!0})})]})," ","Table"]})})]}),(0,l.jsxs)("div",{className:"w-full sm:w-auto",children:[(0,l.jsxs)("a",{href:`/admin/${e?.id}/databases/${t.db_slug}/tables/${s.tableName}/entries/add-entry`,className:"button flex items-center gap-2 w-full sm:w-auto justify-center",children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Entry"})]}),(0,l.jsx)(p.A,{database:t,table:s}),(0,l.jsx)(f.A,{database:t,table:s,dbSchemaData:n,query:y})]})]}),(0,l.jsx)(c.A,{confirmedDelegetedUser:y?.delegated,user:e})]}),t.active_clone?(0,l.jsx)(m.A,{database:t,user:e}):(0,l.jsx)(l.Fragment,{}),t.remote_connected?(0,l.jsx)(b.p,{database:t}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(h.A,{table:s,database:t,user:e}),(0,l.jsx)(u.A,{user:e,entries:v,database:t,table:s,setTargetEntry:x,dbSchemaData:n,richTextEditors:g,dataTypes:T,query:y,confirmedDelegetedUser:w,jsonTextEditors:j,search:!0}),S>20&&(0,l.jsx)(N,{activeEntries:v,setActiveEntries:A,database:t,table:s,entriesCount:S})]})}function N({activeEntries:e,setActiveEntries:t,database:a,table:s,entriesCount:n}){r().useContext(i.TableEntriesContext);let d=r().useRef(),c=r().useRef(1);return 20*Number(c.current)>=n?(0,l.jsx)(r().Fragment,{}):(0,l.jsx)("div",{className:"w-full flex items-center justify-center",ref:d,children:(0,l.jsx)(x.A,{position:"relative",style:{backgroundColor:"transparent"},width:"20px"})})}[i,o,u,b]=g.then?(await g)():g,s()}catch(e){s(e)}})},70468:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>b});var l=a(8732),n=a(82015),r=a.n(n),i=a(23180),d=a(7141),c=a(16757),o=a(39506),u=a(42427),m=a(2833),h=e([d]);function b({user:e,entries:t,database:a,table:s,setTargetEntry:n,dbSchemaData:h,richTextEditors:b,jsonTextEditors:x,dataTypes:p,title:f,confirmedDelegetedUser:g,query:j,search:N,entriesCount:y}){g?.delegated,g?.priviledges?.match(/Edit Tables/i),g?.priviledges?.match(/Delete Tables/i),g?.priviledges?.match(/Create Tables/i),g?.priviledges?.match(/Edit Entries/i),g?.priviledges?.match(/Delete Entries/i);let{active_clone:w,active_clone_parent_db:v,remote_connected:S}=a;return(0,l.jsx)(r().Fragment,{children:(0,l.jsxs)("section",{className:"paper gray gray-bg",children:[f&&(0,l.jsxs)("div",{className:"justify-between w-full flex-wrap px-4 sm:px-0 pt-4 sm:pt-0",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:f}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("a",{className:"button flex gap-2 items-center",href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries/add-entry`,children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Entry"})]}),(0,l.jsx)(o.A,{database:a,table:s}),(0,l.jsx)(u.A,{database:a,table:s,dbSchemaData:h,query:j})]})]}),N&&(0,l.jsx)(d.A,{}),(0,l.jsxs)("div",{className:"w-full flex-col gap-6",children:[t?.[0]&&t.map(t=>(0,l.jsx)(r().Fragment,{children:(0,l.jsx)(i.A,{user:e,database:a,table:s,dbSchemaData:h,richTextEditors:b,dataTypes:p,entry:t,query:j,confirmedDelegetedUser:g,jsonTextEditors:x})},t.id)),!t&&(0,l.jsx)("div",{className:"w-full h-[300px]",children:(0,l.jsx)(c.A,{position:"relative"})}),t&&!t?.[0]&&(0,l.jsxs)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries/add-entry`,className:"border-dotted border-slate-200 border-2 p-4 w-full flex-col rounded flex items-center hover:border-primary/50 gap-2",children:[(0,l.jsx)("span",{className:"text-slate-400 text-center",children:"No Entries Added Yet."}),(0,l.jsx)(m.A,{}),(0,l.jsx)("span",{className:"text-center",children:"Add an Entry to this Table"})]}),y&&y>10?(0,l.jsx)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries`,className:"button outlined gray w-full -mb-4",children:(0,l.jsx)("span",{children:"See All Entries"})}):null,t?.[0]&&f&&(0,l.jsxs)("a",{className:"button flex gap-2 items-center w-full justify-center mt-2 more-padding",href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries/add-entry`,style:{borderStyle:"dotted",borderWidth:"2px"},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Entry"})]})]})]})})}d=(h.then?(await h)():h)[0],s()}catch(e){s(e)}})},1346:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732);function l({radioValues:e,name:t,onChangeHandler:a,setAlert:l,flexRow:n,labelColor:r,baseText:i,smallText:d,className:c}){try{return(0,s.jsx)("div",{className:"flex items-start gap-4 flex-wrap "+(n?"":" flex-col ")+(c||""),children:e.map((e,n)=>{let{payload:c,title:o,jsx:u}=e,m=!1===c?c:c||o||null;return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{className:"m-0"+(i?" w-5 h-5":d?" w-4 h-4":" w-6 h-6"),type:"radio",defaultChecked:!!e.default,name:t,id:t+"_"+m,onChange:t=>{l&&l(null),e.onChangeHandler?e.onChangeHandler(t):a&&a(t)},value:"string"==typeof m?m:void 0}),u||(0,s.jsx)("label",{htmlFor:t+"_"+m,className:"text-lg m-0 "+(r||"text-slate-800")+(i?" text-base":d?" text-sm":" text-lg"),children:o})]},n+1)})})}catch(e){return console.log("ERROR in FormRadio =>",e),(0,s.jsx)("div",{children:"Form Radio Error"})}}a(82015)},51275:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732),l=a(82015),n=a.n(l);function r({table:e,database:t,user:a,activeDbClone:l}){let r=e?.childTableDbFullName?e.childTableDbFullName.replace(new RegExp(/datasquirel_user_\d+_/),""):null,i=e.childTableDbFullName===t.db_full_name;return r?(0,s.jsxs)("span",{className:"info small green gap-1"+(t?.active_clone?" -mt-6":""),style:{fontWeight:"500"},children:["This Table is an active clone of"," ",(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${r}/tables/${e.childTableName}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,s.jsx)("b",{children:e.childTableName})})," ","in"," ",i?(0,s.jsxs)("span",{children:["this current database(",(0,s.jsx)("b",{children:t.db_name}),")."]}):(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${r}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,s.jsx)("b",{children:r})}),(0,s.jsx)("span",{children:"database."})]})," ",t?.active_clone?"":"Only Foreign keys and Entries can be updated."]}):(0,s.jsx)(n().Fragment,{})}},78704:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{TableEntriesContext:()=>y,default:()=>j,getServerSideProps:()=>N});var l=a(8732),n=a(82015),r=a.n(n),i=a(29021),d=a.n(i),c=a(92702),o=a(25562),u=a(61925),m=a(55880),h=a(52854),b=a(22873),x=a(77047),p=a(71934),f=a(43363),g=e([u,m]);[u,m]=g.then?(await g)():g;let y=r().createContext({});function j({user:e,database:t,table:a,dbSchemaData:s,entries:n,query:i,confirmedDelegetedUser:d,entriesCount:c}){let h=`${a.tableFullName} Table Entries | Datasquirel`,b=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:h}),(0,l.jsx)("meta",{name:"description",content:"All Entries in table"})]}),[x,p]=r().useState(null),[g,j]=r().useState(n),N=r().useRef("title"),w=r().useRef(null),v=r().useRef([]),S=r().useRef([]);return(0,l.jsx)(o.A,{head:b,user:e,extraHeaderContent:(0,l.jsx)(m.A,{database:t,query:i,confirmedDelegetedUser:d,user:e}),children:(0,l.jsxs)(y.Provider,{value:{user:e,database:t,table:a,dbSchemaData:s,entries:n,targetEntry:x,setTargetEntry:p,richTextEditors:v,jsonTextEditors:S,query:i,confirmedDelegetedUser:d,activeEntries:g,setActiveEntries:j,targetField:N,searchTerm:w,entriesCount:c},children:[(0,l.jsx)(u.A,{}),(0,l.jsx)(f.A,{snug:!0})]})})}async function N({req:e,res:t,query:a}){let s=await (0,c.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t=a.single,l=await (0,b.A)({request:e,user:s,databaseSlug:t,query:a});if(!l)throw Error("No Db Object Found!");let{dbUserId:n}=l,r=await (0,p.A)(`SELECT * FROM user_databases WHERE user_id='${n}' AND db_slug='${a.single}'`),i=r[0].db_full_name;if(!r||!r[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let c=JSON.parse(d().readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${n}/main.json`,"utf-8")),o=(c.filter(e=>e.dbFullName===r[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0],u=await (0,h.A)({queryString:`SELECT * FROM \`${r[0].db_full_name}\`.\`${o.tableName}\` ORDER BY id DESC LIMIT 20`,tableSchema:o,database:i});console.log("tableEntries",u);let m=await (0,h.A)({queryString:`SELECT COUNT(id) AS count FROM \`${r[0].db_full_name}\`.\`${o.tableName}\``,tableSchema:o,database:i});return{props:{user:s,database:r[0],table:o,dbSchemaData:c,entries:u,query:a,confirmedDelegetedUser:l,entriesCount:m?.[0]?.count||0}}}catch(e){return(0,x.A)({component:"[single_table]/entries-page-component/getServerSideProps/catch-error",message:e.message,user:s}),{props:{user:s,database:null,table:null,entries:[]}}}}s()}catch(e){s(e)}})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/8760.js b/dsql-app/.local_dist/server/chunks/8760.js new file mode 100644 index 0000000..481afa7 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/8760.js @@ -0,0 +1,16 @@ +"use strict";exports.id=8760,exports.ids=[8760],exports.modules={57660:(e,a,s)=>{let l;s.d(a,{A:()=>u});var t=s(8732),r=s(82015),n=s.n(r),i=s(46169);async function o({e,setLoading:a,user:s,image:l,query:t}){a(!0);let r={first_name:e.target.first_name.value,last_name:e.target.last_name.value,email:s?null:e.target.email_address.value,username:s?null:e.target.username.value,password:s?null:e.target.password.value,image:l||null};t?.invite&&(r.inviteObject=t),(0,i.A)(s?"/api/updateUser":"/api/registerUser",{method:"post",body:r},!!s).then(e=>{console.log(e),!s&&e?.insertId?(localStorage.setItem("id",e.insertId),(0,i.A)("/api/loginUser",{method:"post",body:{email:r.email,password:r.password}}).then(e=>{console.log(e),localStorage.setItem("csrf",e.user.csrf_k),localStorage.setItem("stripe_id",e.user.stripe_id),localStorage.setItem("user",JSON.stringify(e.userPayload)),window.location.href="/admin"})):s&&e?.user?window.location.reload():e?.msg&&alert(e.msg)}).catch(e=>{console.log(e)}).finally(()=>{setTimeout(()=>{a(!1)},2e3)})}var m=s(10621),d=s(16757),c=s(5406);function u({user:e,query:a,image:s}){let r=a?.email?a.email:e?.email?e.email:"",[u,p]=n().useState(null),[g,f]=n().useState(!1);return(0,t.jsxs)("div",{className:"relative w-full max-w-2xl flex-col items-start",children:[g&&(0,t.jsx)(d.A,{}),!e&&(0,t.jsxs)(n().Fragment,{children:[(0,t.jsx)("hr",{className:"opacity-0"}),(0,t.jsx)(c.A,{user:null,userType:"admin",setLoading:f}),(0,t.jsxs)("div",{className:"w-full justify-center relative",children:[(0,t.jsx)("span",{className:"bg-white dark:bg-slate-800 px-3 relative z-10",children:"OR"}),(0,t.jsx)("hr",{className:"absolute"})]})]}),(0,t.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:l=>{l.preventDefault(),window.confirm("Update Account Information?")&&o({e:l,setLoading:f,user:e,image:s,query:a})},children:[u&&(0,t.jsx)(m.A,{message:u}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"first_name",children:"First Name"}),(0,t.jsx)("input",{type:"text",name:"first_name",id:"first_name",placeholder:"First Name",autoComplete:"given-name",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),p(null)):a.classList.add("warning")},defaultValue:e?e.first_name:"",required:!0})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"last_name",children:"Last Name"}),(0,t.jsx)("input",{type:"text",name:"last_name",id:"last_name",placeholder:"Last Name",autoComplete:"family-name",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),p(null)):a.classList.add("warning")},defaultValue:e?e.last_name:"",required:!0})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"username",children:"Username"}),(0,t.jsx)("input",{type:"text",name:"username",id:"username",placeholder:"Username",autoComplete:"username",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),p(null)):a.classList.add("warning"),window.clearTimeout(l),l=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=username&value=${a.value}&tableName=users`).then(e=>{console.log(e),e?.result?(p("Username Already Exists"),a.classList.add("warning")):(p(null),a.classList.remove("warning"))})},300)},defaultValue:e?e.username:"",required:!e,readOnly:!!e})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"email_address",children:"Email Address"}),(0,t.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",onInput:e=>{let a=e.target;window.clearTimeout(l),l=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=email&value=${a.value}&tableName=users`).then(e=>{console.log(e),e?.result?(p("Email Already Exists"),a.classList.add("warning")):(p(null),a.classList.remove("warning"))})},300)},defaultValue:r,required:!0,readOnly:!!e})]}),!e&&(0,t.jsxs)(n().Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"password",children:"Password"}),(0,t.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password",required:!0})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,t.jsx)("label",{htmlFor:"confirm_password",children:"Confirm Password"}),(0,t.jsx)("input",{type:"password",name:"confirm_password",id:"confirm_password",placeholder:"Confirm Password",onInput:e=>{let a=e.target;a.closest("form")?.password.value===a.value?a.classList.remove("warning"):a.classList.add("warning")},required:!0})]}),(0,t.jsxs)("span",{className:"text-sm",children:['By clicking "Create Account" you agree to our'," ",(0,t.jsx)("a",{href:"/terms",target:"_blank",className:"font-bold",children:"Terms and Conditions"})]})]}),(0,t.jsx)("button",{type:"submit",className:"w-full",children:e?(0,t.jsx)("span",{children:"Update Account Info"}):(0,t.jsx)("span",{children:"Create Account"})}),!e&&(0,t.jsx)(n().Fragment,{children:(0,t.jsxs)("span",{className:"text-sm",children:["Already Have an Account?"," ",(0,t.jsx)("a",{href:"/login",className:"font-bold",children:"Login"})]})})]})]})}},5406:(e,a,s)=>{function l({user:e,userType:a,setLoading:s}){return null}s.d(a,{A:()=>l}),s(8732),s(82015),s(46169),s(45731)},45731:(e,a,s)=>{s.d(a,{A:()=>l});async function l(){try{let e=await caches.keys();e[0]&&await Promise.all(e.map(e=>caches.delete(e)))}catch(e){console.log("Error in clearing cache =>",e.message)}}},77047:(e,a,s)=>{s.d(a,{A:()=>r});var l=s(29021),t=s.n(l);async function r({user:e,message:a,component:s,noMail:l,req:r}){let n=new Date,i=(()=>{if(!r)return null;try{let e=r.headers["x-forwarded-for"],a=r.headers["x-real-ip"],s=r.headers["cf-connecting-ip"],l=Array.isArray(e)?e[0]:e?.split(",")[0],t=s||l||a||r.socket.remoteAddress;if(!t)return null;return String(t)}catch(e){return null}})();try{let l=`🚀 SERVER ERROR =========================== +Error Message: ${a} +Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(l+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),r?.url&&(l+=` +URL: ${r.url}`),r?.body&&(l+=` +Request Body: ${JSON.stringify(r.body,null,4)}`),i&&(l+=` +IP: ${i}`),l+=` +Date: ${n.toDateString()} +========================================`,t().existsSync("./.tmp/error.log")||t().writeFileSync("./.tmp/error.log","","utf-8");let o=t().readFileSync("./.tmp/error.log","utf-8");t().writeFileSync("./.tmp/error.log",l),t().appendFileSync("./.tmp/error.log",` + + + + +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/883.js b/dsql-app/.local_dist/server/chunks/883.js index 9751d82..a06ac3e 100644 --- a/dsql-app/.local_dist/server/chunks/883.js +++ b/dsql-app/.local_dist/server/chunks/883.js @@ -2,5 +2,5 @@ exports.id=883,exports.ids=[883],exports.modules={70781:(e,t,r)=>{"use strict";O partytown = { lib: "${r}/_next/static/~partytown/" }; - `}}),(0,n.jsx)("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:e()}}),(i.worker||[]).map((e,r)=>{let{strategy:n,src:i,children:s,dangerouslySetInnerHTML:l,...u}=e,c={};if(i)c.src=i;else if(l&&l.__html)c.dangerouslySetInnerHTML={__html:l.__html};else if(s)c.dangerouslySetInnerHTML={__html:"string"==typeof s?s:Array.isArray(s)?s.join(""):""};else throw Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script");return(0,o.createElement)("script",{...c,...u,type:"text/partytown",key:i||r,nonce:t.nonce,"data-nscript":"worker",crossOrigin:t.crossOrigin||a})})]})}catch(e){return(0,l.default)(e)&&"MODULE_NOT_FOUND"!==e.code&&console.warn(`Warning: ${e.message}`),null}}(e,t),u=(r.beforeInteractive||[]).filter(e=>e.src).map((e,r)=>{let{strategy:n,...s}=e;return(0,o.createElement)("script",{...s,key:s.src||r,defer:s.defer??!i,nonce:t.nonce,"data-nscript":"beforeInteractive",crossOrigin:t.crossOrigin||a})});return(0,n.jsxs)(n.Fragment,{children:[s,u]})}class b extends o.default.Component{static #e=this.contextType=u.HtmlContext;getCssLinks(e){let{assetPrefix:t,assetQueryString:r,dynamicImports:o,crossOrigin:i,optimizeCss:a}=this.context,s=e.allFiles.filter(e=>e.endsWith(".css")),l=new Set(e.sharedFiles),u=new Set([]),d=Array.from(new Set(o.filter(e=>e.endsWith(".css"))));if(d.length){let e=new Set(s);u=new Set(d=d.filter(t=>!(e.has(t)||l.has(t)))),s.push(...d)}let p=[];return s.forEach(e=>{let o=l.has(e);a||p.push((0,n.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,as:"style",crossOrigin:this.props.crossOrigin||i},`${e}-preload`));let s=u.has(e);p.push((0,n.jsx)("link",{nonce:this.props.nonce,rel:"stylesheet",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,crossOrigin:this.props.crossOrigin||i,"data-n-g":s?void 0:o?"":void 0,"data-n-p":s?void 0:o?void 0:""},e))}),0===p.length?null:p}getPreloadDynamicChunks(){let{dynamicImports:e,assetPrefix:t,assetQueryString:r,crossOrigin:o}=this.context;return e.map(e=>e.endsWith(".js")?(0,n.jsx)("link",{rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||o},e):null).filter(Boolean)}getPreloadMainLinks(e){let{assetPrefix:t,assetQueryString:r,scriptLoader:o,crossOrigin:i}=this.context,a=e.allFiles.filter(e=>e.endsWith(".js"));return[...(o.beforeInteractive||[]).map(e=>(0,n.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:e.src,as:"script",crossOrigin:this.props.crossOrigin||i},e.src)),...a.map(e=>(0,n.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,as:"script",crossOrigin:this.props.crossOrigin||i},e))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:e}=this.context,{nonce:t,crossOrigin:r}=this.props;return(e.beforeInteractive||[]).filter(e=>!e.src&&(e.dangerouslySetInnerHTML||e.children)).map((e,n)=>{let{strategy:i,children:a,dangerouslySetInnerHTML:s,src:l,...u}=e,c="";return s&&s.__html?c=s.__html:a&&(c="string"==typeof a?a:Array.isArray(a)?a.join(""):""),(0,o.createElement)("script",{...u,dangerouslySetInnerHTML:{__html:c},key:u.id||n,nonce:t,"data-nscript":"beforeInteractive",crossOrigin:r||void 0})})}getDynamicChunks(e){return S(this.context,this.props,e)}getPreNextScripts(){return E(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}render(){let{styles:e,ampPath:t,inAmpMode:i,hybridAmp:a,canonicalBase:s,__NEXT_DATA__:l,dangerousAsPath:u,headTags:g,unstable_runtimeJS:f,unstable_JsPreload:h,disableOptimizedLoading:S,optimizeCss:v,assetPrefix:E,nextFontManifest:b}=this.context,O=!1===f,y=!1===h||!S;this.context.docComponentsRendered.Head=!0;let{head:N}=this.context,P=[],T=[];N&&(N.forEach(e=>{e&&"link"===e.type&&"preload"===e.props.rel&&"style"===e.props.as?this.context.strictNextHead?P.push(o.default.cloneElement(e,{"data-next-head":""})):P.push(e):e&&(this.context.strictNextHead?T.push(o.default.cloneElement(e,{"data-next-head":""})):T.push(e))}),N=P.concat(T));let R=o.default.Children.toArray(this.props.children).filter(Boolean),I=!1,x=!1;N=o.default.Children.map(N||[],e=>{if(!e)return e;let{type:t,props:r}=e;if(i){let n="";if("meta"===t&&"viewport"===r.name?n='name="viewport"':"link"===t&&"canonical"===r.rel?x=!0:"script"===t&&(r.src&&-1>r.src.indexOf("ampproject")||r.dangerouslySetInnerHTML&&(!r.type||"text/javascript"===r.type))&&(n="{n+=` ${e}="${r[e]}"`}),n+="/>"),n)return console.warn(`Found conflicting amp tag "${e.type}" with conflicting prop ${n} in ${l.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`),null}else"link"===t&&"amphtml"===r.rel&&(I=!0);return e});let M=_(this.context.buildManifest,this.context.__NEXT_DATA__.page,i),C=function(e,t,r=""){if(!e)return{preconnect:null,preload:null};let o=e.pages["/_app"],i=e.pages[t],a=Array.from(new Set([...o??[],...i??[]]));return{preconnect:0===a.length&&(o||i)?(0,n.jsx)("link",{"data-next-font":e.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:a?a.map(e=>{let t=/\.(woff|woff2|eot|ttf|otf)$/.exec(e)[1];return(0,n.jsx)("link",{rel:"preload",href:`${r}/_next/${(0,c.encodeURIPath)(e)}`,as:"font",type:`font/${t}`,crossOrigin:"anonymous","data-next-font":e.includes("-s")?"size-adjust":""},e)}):null}}(b,u,E),A=((0,p.getTracedMetadata)((0,d.getTracer)().getTracePropagationData(),this.context.experimentalClientTraceMetadata)||[]).map(({key:e,value:t},r)=>(0,n.jsx)("meta",{name:e,content:t},`next-trace-data-${r}`));return(0,n.jsxs)("head",{...function(e){let{crossOrigin:t,nonce:r,...n}=e;return n}(this.props),children:[this.context.isDevelopment&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{"data-next-hide-fouc":!0,"data-ampdevmode":i?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),(0,n.jsx)("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":i?"true":void 0,children:(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}})})]}),N,this.context.strictNextHead?null:(0,n.jsx)("meta",{name:"next-head-count",content:o.default.Children.count(N||[]).toString()}),R,C.preconnect,C.preload,i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!x&&(0,n.jsx)("link",{rel:"canonical",href:s+r(15656).cleanAmpPath(u)}),(0,n.jsx)("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),(0,n.jsx)(m,{styles:e}),(0,n.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),(0,n.jsx)("noscript",{children:(0,n.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})}),(0,n.jsx)("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})]}),!i&&(0,n.jsxs)(n.Fragment,{children:[!I&&a&&(0,n.jsx)("link",{rel:"amphtml",href:s+(t||`${u}${u.includes("?")?"&":"?"}amp=1`)}),this.getBeforeInteractiveInlineScripts(),!v&&this.getCssLinks(M),!v&&(0,n.jsx)("noscript",{"data-n-css":this.props.nonce??""}),!O&&!y&&this.getPreloadDynamicChunks(),!O&&!y&&this.getPreloadMainLinks(M),!S&&!O&&this.getPolyfillScripts(),!S&&!O&&this.getPreNextScripts(),!S&&!O&&this.getDynamicChunks(M),!S&&!O&&this.getScripts(M),v&&this.getCssLinks(M),v&&(0,n.jsx)("noscript",{"data-n-css":this.props.nonce??""}),this.context.isDevelopment&&(0,n.jsx)("noscript",{id:"__next_css__DO_NOT_USE__"}),A,e||null]}),o.default.createElement(o.default.Fragment,{},...g||[])]})}}class O extends o.default.Component{static #e=this.contextType=u.HtmlContext;getDynamicChunks(e){return S(this.context,this.props,e)}getPreNextScripts(){return E(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}static getInlineScriptSource(e){let{__NEXT_DATA__:t,largePageDataBytes:n}=e;try{let o=JSON.stringify(t);if(f.has(t.page))return(0,s.htmlEscapeJsonString)(o);let i=Buffer.from(o).byteLength,a=r(40911).A;return n&&i>n&&(f.add(t.page),console.warn(`Warning: data for page "${t.page}"${t.page===e.dangerousAsPath?"":` (path "${e.dangerousAsPath}")`} is ${a(i)} which exceeds the threshold of ${a(n)}, this amount of data can reduce performance. -See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,s.htmlEscapeJsonString)(o)}catch(e){if((0,l.default)(e)&&-1!==e.message.indexOf("circular structure"))throw Error(`Circular structure in "getInitialProps" result of page "${t.page}". https://nextjs.org/docs/messages/circular-structure`);throw e}}render(){let{assetPrefix:e,inAmpMode:t,buildManifest:r,unstable_runtimeJS:o,docComponentsRendered:i,assetQueryString:a,disableOptimizedLoading:s,crossOrigin:l}=this.context,u=!1===o;if(i.NextScript=!0,t)return null;let d=_(this.context.buildManifest,this.context.__NEXT_DATA__.page,t);return(0,n.jsxs)(n.Fragment,{children:[!u&&r.devFiles?r.devFiles.map(t=>(0,n.jsx)("script",{src:`${e}/_next/${(0,c.encodeURIPath)(t)}${a}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l},t)):null,u?null:(0,n.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l,dangerouslySetInnerHTML:{__html:O.getInlineScriptSource(this.context)}}),s&&!u&&this.getPolyfillScripts(),s&&!u&&this.getPreNextScripts(),s&&!u&&this.getDynamicChunks(d),s&&!u&&this.getScripts(d)]})}}function y(e){let{inAmpMode:t,docComponentsRendered:r,locale:i,scriptLoader:a,__NEXT_DATA__:s}=(0,u.useHtmlContext)();return r.Html=!0,function(e,t,r){var n,i,a,s;if(!r.children)return;let l=[],u=Array.isArray(r.children)?r.children:[r.children],c=null==(i=u.find(e=>e.type===b))?void 0:null==(n=i.props)?void 0:n.children,d=null==(s=u.find(e=>"body"===e.type))?void 0:null==(a=s.props)?void 0:a.children,p=[...Array.isArray(c)?c:[c],...Array.isArray(d)?d:[d]];o.default.Children.forEach(p,t=>{var r;if(t&&(null==(r=t.type)?void 0:r.__nextScript)){if("beforeInteractive"===t.props.strategy){e.beforeInteractive=(e.beforeInteractive||[]).concat([{...t.props}]);return}if(["lazyOnload","afterInteractive","worker"].includes(t.props.strategy)){l.push(t.props);return}if(void 0===t.props.strategy){l.push({...t.props,strategy:"afterInteractive"});return}}}),t.scriptLoader=l}(a,s,e),(0,n.jsx)("html",{...e,lang:e.lang||i||void 0,amp:t?"":void 0,"data-ampdevmode":void 0})}function N(){let{docComponentsRendered:e}=(0,u.useHtmlContext)();return e.Main=!0,(0,n.jsx)("next-js-internal-body-render-target",{})}class P extends o.default.Component{static getInitialProps(e){return e.defaultGetInitialProps(e)}render(){return(0,n.jsxs)(y,{children:[(0,n.jsx)(b,{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(N,{}),(0,n.jsx)(O,{})]})]})}}P[i.NEXT_BUILTIN_DOCUMENT]=function(){return(0,n.jsxs)(y,{children:[(0,n.jsx)(b,{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(N,{}),(0,n.jsx)(O,{})]})]})}},8939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{APP_BUILD_MANIFEST:function(){return v},APP_CLIENT_INTERNALS:function(){return q},APP_PATHS_MANIFEST:function(){return h},APP_PATH_ROUTES_MANIFEST:function(){return m},BARREL_OPTIMIZATION_PREFIX:function(){return $},BLOCKED_PAGES:function(){return B},BUILD_ID_FILE:function(){return w},BUILD_MANIFEST:function(){return S},CLIENT_PUBLIC_FILES_PATH:function(){return F},CLIENT_REFERENCE_MANIFEST:function(){return G},CLIENT_STATIC_FILES_PATH:function(){return U},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return X},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return Y},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return et},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return J},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return Q},COMPILER_INDEXES:function(){return i},COMPILER_NAMES:function(){return o},CONFIG_FILES:function(){return D},DEFAULT_RUNTIME_WEBPACK:function(){return er},DEFAULT_SANS_SERIF_FONT:function(){return es},DEFAULT_SERIF_FONT:function(){return ea},DEV_CLIENT_MIDDLEWARE_MANIFEST:function(){return A},DEV_CLIENT_PAGES_MANIFEST:function(){return x},EDGE_RUNTIME_WEBPACK:function(){return en},EDGE_UNSUPPORTED_NODE_APIS:function(){return ep},EXPORT_DETAIL:function(){return N},EXPORT_MARKER:function(){return y},FUNCTIONS_CONFIG_MANIFEST:function(){return E},IMAGES_MANIFEST:function(){return R},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return K},MIDDLEWARE_BUILD_MANIFEST:function(){return W},MIDDLEWARE_MANIFEST:function(){return M},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return n.default},NEXT_BUILTIN_DOCUMENT:function(){return k},NEXT_FONT_MANIFEST:function(){return O},PAGES_MANIFEST:function(){return f},PHASE_DEVELOPMENT_SERVER:function(){return d},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return g},PHASE_PRODUCTION_BUILD:function(){return u},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return p},PRERENDER_MANIFEST:function(){return P},REACT_LOADABLE_MANIFEST:function(){return j},ROUTES_MANIFEST:function(){return T},RSC_MODULE_TYPES:function(){return ed},SERVER_DIRECTORY:function(){return L},SERVER_FILES_MANIFEST:function(){return I},SERVER_PROPS_ID:function(){return ei},SERVER_REFERENCE_MANIFEST:function(){return H},STATIC_PROPS_ID:function(){return eo},STATIC_STATUS_PAGES:function(){return el},STRING_LITERAL_DROP_BUNDLE:function(){return V},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return b},SYSTEM_ENTRYPOINTS:function(){return eg},TRACE_OUTPUT_VERSION:function(){return eu},TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST:function(){return C},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ec},UNDERSCORE_NOT_FOUND_ROUTE:function(){return a},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return s},WEBPACK_STATS:function(){return _}});let n=r(99929)._(r(1999)),o={client:"client",server:"server",edgeServer:"edge-server"},i={[o.client]:0,[o.server]:1,[o.edgeServer]:2},a="/_not-found",s=""+a+"/page",l="phase-export",u="phase-production-build",c="phase-production-server",d="phase-development-server",p="phase-test",g="phase-info",f="pages-manifest.json",_="webpack-stats.json",h="app-paths-manifest.json",m="app-path-routes-manifest.json",S="build-manifest.json",v="app-build-manifest.json",E="functions-config-manifest.json",b="subresource-integrity-manifest",O="next-font-manifest",y="export-marker.json",N="export-detail.json",P="prerender-manifest.json",T="routes-manifest.json",R="images-manifest.json",I="required-server-files.json",x="_devPagesManifest.json",M="middleware-manifest.json",C="_clientMiddlewareManifest.json",A="_devMiddlewareManifest.json",j="react-loadable-manifest.json",L="server",D=["next.config.js","next.config.mjs","next.config.ts"],w="BUILD_ID",B=["/_document","/_app","/_error"],F="public",U="static",V="__NEXT_DROP_CLIENT_FILE__",k="__NEXT_BUILTIN_DOCUMENT__",$="__barrel_optimize__",G="client-reference-manifest",H="server-reference-manifest",W="middleware-build-manifest",z="middleware-react-loadable-manifest",K="interception-route-rewrite-manifest",X="main",Y=""+X+"-app",q="app-pages-internals",J="react-refresh",Z="amp",Q="webpack",ee="polyfills",et=Symbol(ee),er="webpack-runtime",en="edge-runtime-webpack",eo="__N_SSG",ei="__N_SSP",ea={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},es={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},el=["/500"],eu=1,ec=6e3,ed={client:"client",server:"server"},ep=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eg=new Set([X,J,Z,Y]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81149:(e,t)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return r}})},82101:(e,t)=>{"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},93322:(e,t)=>{"use strict";function r(e){return null!==e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isThenable",{enumerable:!0,get:function(){return r}})},1999:e=>{"use strict";e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},4590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return i}});let n=r(50732),o=r(83102);function i(e){let t=(0,o.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},65075:(e,t)=>{"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},66623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePagePath",{enumerable:!0,get:function(){return a}});let n=r(65075),o=r(50732),i=r(72811);function a(e){let t=/^\/index(\/|$)/.test(e)&&!(0,o.isDynamicRoute)(e)?"/index"+e:"/"===e?"/index":(0,n.ensureLeadingSlash)(e);{let{posix:e}=r(33873),n=e.normalize(t);if(n!==t)throw new i.NormalizeError("Requested and resolved page mismatch: "+t+" "+n)}return t}},83102:(e,t)=>{"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},81394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return i},normalizeRscURL:function(){return a}});let n=r(65075),o=r(18355);function i(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function a(e){return e.replace(/\.rsc($|\?)/,"$1")}},50732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return n.getSortedRouteObjects},getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(80610),o=r(50270)},50270:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let n=r(91900),o=/\/\[[^/]+?\](?=\/|$)/;function i(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},80610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return o},getSortedRoutes:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),a=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),a=!0),r.startsWith("…"))throw Error("Detected a three-dot character ('…') at ('"+r+"'). Did you mean ('...')?");if(r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function i(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(a){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');i(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');i(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(a)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');i(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}function o(e,t){let r={},o=[];for(let n=0;ne[r[t]])}},18355:(e,t)=>{"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}function n(e,t){if(e.includes(o)){let e=JSON.stringify(t);return"{}"!==e?o+"?"+e:o}return e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return i},PAGE_SEGMENT_KEY:function(){return o},addSearchParamsIfPageSegment:function(){return n},isGroupSegment:function(){return r}});let o="__PAGE__",i="__DEFAULT__"},72811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return f},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return m},NormalizeError:function(){return _},PageNotFoundError:function(){return h},SP:function(){return p},ST:function(){return g},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return a},getURL:function(){return s},isAbsoluteUrl:function(){return i},isResSent:function(){return u},loadGetInitialProps:function(){return d},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return v}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),i=0;io.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function s(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function u(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function d(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await d(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&u(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let p="undefined"!=typeof performance,g=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class f extends Error{}class _ extends Error{}class h extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},20306:e=>{(()=>{"use strict";var t={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContextAPI=void 0;let n=r(223),o=r(172),i=r(930),a="context",s=new n.NoopContextManager;class l{constructor(){}static getInstance(){return this._instance||(this._instance=new l),this._instance}setGlobalContextManager(e){return(0,o.registerGlobal)(a,e,i.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,o.getGlobal)(a)||s}disable(){this._getContextManager().disable(),(0,o.unregisterGlobal)(a,i.DiagAPI.instance())}}t.ContextAPI=l},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagAPI=void 0;let n=r(56),o=r(912),i=r(957),a=r(172);class s{constructor(){function e(e){return function(...t){let r=(0,a.getGlobal)("diag");if(r)return r[e](...t)}}let t=this;t.setLogger=(e,r={logLevel:i.DiagLogLevel.INFO})=>{var n,s,l;if(e===t){let e=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(n=e.stack)&&void 0!==n?n:e.message),!1}"number"==typeof r&&(r={logLevel:r});let u=(0,a.getGlobal)("diag"),c=(0,o.createLogLevelDiagLogger)(null!==(s=r.logLevel)&&void 0!==s?s:i.DiagLogLevel.INFO,e);if(u&&!r.suppressOverrideMessage){let e=null!==(l=Error().stack)&&void 0!==l?l:"";u.warn(`Current logger will be overwritten from ${e}`),c.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,a.registerGlobal)("diag",c,t,!0)},t.disable=()=>{(0,a.unregisterGlobal)("diag",t)},t.createComponentLogger=e=>new n.DiagComponentLogger(e),t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}static instance(){return this._instance||(this._instance=new s),this._instance}}t.DiagAPI=s},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsAPI=void 0;let n=r(660),o=r(172),i=r(930),a="metrics";class s{constructor(){}static getInstance(){return this._instance||(this._instance=new s),this._instance}setGlobalMeterProvider(e){return(0,o.registerGlobal)(a,e,i.DiagAPI.instance())}getMeterProvider(){return(0,o.getGlobal)(a)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,o.unregisterGlobal)(a,i.DiagAPI.instance())}}t.MetricsAPI=s},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropagationAPI=void 0;let n=r(172),o=r(874),i=r(194),a=r(277),s=r(369),l=r(930),u="propagation",c=new o.NoopTextMapPropagator;class d{constructor(){this.createBaggage=s.createBaggage,this.getBaggage=a.getBaggage,this.getActiveBaggage=a.getActiveBaggage,this.setBaggage=a.setBaggage,this.deleteBaggage=a.deleteBaggage}static getInstance(){return this._instance||(this._instance=new d),this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,l.DiagAPI.instance())}inject(e,t,r=i.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=i.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,l.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||c}}t.PropagationAPI=d},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceAPI=void 0;let n=r(172),o=r(846),i=r(139),a=r(607),s=r(930),l="trace";class u{constructor(){this._proxyTracerProvider=new o.ProxyTracerProvider,this.wrapSpanContext=i.wrapSpanContext,this.isSpanContextValid=i.isSpanContextValid,this.deleteSpan=a.deleteSpan,this.getSpan=a.getSpan,this.getActiveSpan=a.getActiveSpan,this.getSpanContext=a.getSpanContext,this.setSpan=a.setSpan,this.setSpanContext=a.setSpanContext}static getInstance(){return this._instance||(this._instance=new u),this._instance}setGlobalTracerProvider(e){let t=(0,n.registerGlobal)(l,this._proxyTracerProvider,s.DiagAPI.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return(0,n.getGlobal)(l)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(l,s.DiagAPI.instance()),this._proxyTracerProvider=new o.ProxyTracerProvider}}t.TraceAPI=u},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;let n=r(491),o=(0,r(780).createContextKey)("OpenTelemetry Baggage Key");function i(e){return e.getValue(o)||void 0}t.getBaggage=i,t.getActiveBaggage=function(){return i(n.ContextAPI.getInstance().active())},t.setBaggage=function(e,t){return e.setValue(o,t)},t.deleteBaggage=function(e){return e.deleteValue(o)}},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaggageImpl=void 0;class r{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map(([e,t])=>[e,t])}setEntry(e,t){let n=new r(this._entries);return n._entries.set(e,t),n}removeEntry(e){let t=new r(this._entries);return t._entries.delete(e),t}removeEntries(...e){let t=new r(this._entries);for(let r of e)t._entries.delete(r);return t}clear(){return new r}}t.BaggageImpl=r},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.baggageEntryMetadataSymbol=void 0,t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.baggageEntryMetadataFromString=t.createBaggage=void 0;let n=r(930),o=r(993),i=r(830),a=n.DiagAPI.instance();t.createBaggage=function(e={}){return new o.BaggageImpl(new Map(Object.entries(e)))},t.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(a.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:i.baggageEntryMetadataSymbol,toString:()=>e}}},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.context=void 0;let n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopContextManager=void 0;let n=r(780);class o{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=o},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ROOT_CONTEXT=t.createContextKey=void 0,t.createContextKey=function(e){return Symbol.for(e)};class r{constructor(e){let t=this;t._currentContext=e?new Map(e):new Map,t.getValue=e=>t._currentContext.get(e),t.setValue=(e,n)=>{let o=new r(t._currentContext);return o._currentContext.set(e,n),o},t.deleteValue=e=>{let n=new r(t._currentContext);return n._currentContext.delete(e),n}}}t.ROOT_CONTEXT=new r},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.diag=void 0;let n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagComponentLogger=void 0;let n=r(172);class o{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return i("debug",this._namespace,e)}error(...e){return i("error",this._namespace,e)}info(...e){return i("info",this._namespace,e)}warn(...e){return i("warn",this._namespace,e)}verbose(...e){return i("verbose",this._namespace,e)}}function i(e,t,r){let o=(0,n.getGlobal)("diag");if(o)return r.unshift(t),o[e](...r)}t.DiagComponentLogger=o},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagConsoleLogger=void 0;let r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class n{constructor(){for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0}),t.createLogLevelDiagLogger=void 0;let n=r(957);t.createLogLevelDiagLogger=function(e,t){function r(r,n){let o=t[r];return"function"==typeof o&&e>=n?o.bind(t):function(){}}return en.DiagLogLevel.ALL&&(e=n.DiagLogLevel.ALL),t=t||{},{error:r("error",n.DiagLogLevel.ERROR),warn:r("warn",n.DiagLogLevel.WARN),info:r("info",n.DiagLogLevel.INFO),debug:r("debug",n.DiagLogLevel.DEBUG),verbose:r("verbose",n.DiagLogLevel.VERBOSE)}}},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagLogLevel=void 0,function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;let n=r(200),o=r(521),i=r(130),a=o.VERSION.split(".")[0],s=Symbol.for(`opentelemetry.js.api.${a}`),l=n._globalThis;t.registerGlobal=function(e,t,r,n=!1){var i;let a=l[s]=null!==(i=l[s])&&void 0!==i?i:{version:o.VERSION};if(!n&&a[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return r.error(t.stack||t.message),!1}if(a.version!==o.VERSION){let t=Error(`@opentelemetry/api: Registration of version v${a.version} for ${e} does not match previously registered API v${o.VERSION}`);return r.error(t.stack||t.message),!1}return a[e]=t,r.debug(`@opentelemetry/api: Registered a global for ${e} v${o.VERSION}.`),!0},t.getGlobal=function(e){var t,r;let n=null===(t=l[s])||void 0===t?void 0:t.version;if(n&&(0,i.isCompatible)(n))return null===(r=l[s])||void 0===r?void 0:r[e]},t.unregisterGlobal=function(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${o.VERSION}.`);let r=l[s];r&&delete r[e]}},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCompatible=t._makeCompatibilityCheck=void 0;let n=r(521),o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function i(e){let t=new Set([e]),r=new Set,n=e.match(o);if(!n)return()=>!1;let i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=i.prerelease)return function(t){return t===e};function a(e){return r.add(e),!1}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;let n=e.match(o);if(!n)return a(e);let s={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};return null!=s.prerelease||i.major!==s.major?a(e):0===i.major?i.minor===s.minor&&i.patch<=s.patch?(t.add(e),!0):a(e):i.minor<=s.minor?(t.add(e),!0):a(e)}}t._makeCompatibilityCheck=i,t.isCompatible=i(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.metrics=void 0;let n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueType=void 0,function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class r{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=r;class n{}t.NoopMetric=n;class o extends n{add(e,t){}}t.NoopCounterMetric=o;class i extends n{add(e,t){}}t.NoopUpDownCounterMetric=i;class a extends n{record(e,t){}}t.NoopHistogramMetric=a;class s{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=s;class l extends s{}t.NoopObservableCounterMetric=l;class u extends s{}t.NoopObservableGaugeMetric=u;class c extends s{}t.NoopObservableUpDownCounterMetric=c,t.NOOP_METER=new r,t.NOOP_COUNTER_METRIC=new o,t.NOOP_HISTOGRAM_METRIC=new a,t.NOOP_UP_DOWN_COUNTER_METRIC=new i,t.NOOP_OBSERVABLE_COUNTER_METRIC=new l,t.NOOP_OBSERVABLE_GAUGE_METRIC=new u,t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new c,t.createNoopMeter=function(){return t.NOOP_METER}},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;let n=r(102);class o{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=o,t.NOOP_METER_PROVIDER=new o},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._globalThis=void 0,t._globalThis="object"==typeof globalThis?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propagation=void 0;let n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTextMapPropagator=void 0;class r{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=r},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTextMapSetter=t.defaultTextMapGetter=void 0,t.defaultTextMapGetter={get(e,t){if(null!=e)return e[t]},keys:e=>null==e?[]:Object.keys(e)},t.defaultTextMapSetter={set(e,t,r){null!=e&&(e[t]=r)}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trace=void 0;let n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NonRecordingSpan=void 0;let n=r(476);class o{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}t.NonRecordingSpan=o},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTracer=void 0;let n=r(491),o=r(607),i=r(403),a=r(139),s=n.ContextAPI.getInstance();class l{startSpan(e,t,r=s.active()){if(null==t?void 0:t.root)return new i.NonRecordingSpan;let n=r&&(0,o.getSpanContext)(r);return"object"==typeof n&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&(0,a.isSpanContextValid)(n)?new i.NonRecordingSpan(n):new i.NonRecordingSpan}startActiveSpan(e,t,r,n){let i,a,l;if(arguments.length<2)return;2==arguments.length?l=t:3==arguments.length?(i=t,l=r):(i=t,a=r,l=n);let u=null!=a?a:s.active(),c=this.startSpan(e,i,u),d=(0,o.setSpan)(u,c);return s.with(d,l,void 0,c)}}t.NoopTracer=l},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTracerProvider=void 0;let n=r(614);class o{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=o},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyTracer=void 0;let n=new(r(614)).NoopTracer;class o{constructor(e,t,r,n){this._provider=e,this.name=t,this.version=r,this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){let o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):n}}t.ProxyTracer=o},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyTracerProvider=void 0;let n=r(125),o=new(r(124)).NoopTracerProvider;class i{getTracer(e,t,r){var o;return null!==(o=this.getDelegateTracer(e,t,r))&&void 0!==o?o:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return null!==(e=this._delegate)&&void 0!==e?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=i},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SamplingDecision=void 0,function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;let n=r(780),o=r(403),i=r(491),a=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function s(e){return e.getValue(a)||void 0}function l(e,t){return e.setValue(a,t)}t.getSpan=s,t.getActiveSpan=function(){return s(i.ContextAPI.getInstance().active())},t.setSpan=l,t.deleteSpan=function(e){return e.deleteValue(a)},t.setSpanContext=function(e,t){return l(e,new o.NonRecordingSpan(t))},t.getSpanContext=function(e){var t;return null===(t=s(e))||void 0===t?void 0:t.spanContext()}},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceStateImpl=void 0;let n=r(564);class o{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,t),r}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+"="+this.get(t)),e),[]).join(",")}_parse(e){!(e.length>512)&&(this._internalState=e.split(",").reverse().reduce((e,t)=>{let r=t.trim(),o=r.indexOf("=");if(-1!==o){let i=r.slice(0,o),a=r.slice(o+1,t.length);(0,n.validateKey)(i)&&(0,n.validateValue)(a)&&e.set(i,a)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new o;return e._internalState=new Map(this._internalState),e}}t.TraceStateImpl=o},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateValue=t.validateKey=void 0;let r="[_0-9a-z-*/]",n=`[a-z]${r}{0,255}`,o=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`,i=RegExp(`^(?:${n}|${o})$`),a=/^[ -~]{0,255}[!-~]$/,s=/,|=/;t.validateKey=function(e){return i.test(e)},t.validateValue=function(e){return a.test(e)&&!s.test(e)}},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createTraceState=void 0;let n=r(325);t.createTraceState=function(e){return new n.TraceStateImpl(e)}},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;let n=r(475);t.INVALID_SPANID="0000000000000000",t.INVALID_TRACEID="00000000000000000000000000000000",t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpanKind=void 0,function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;let n=r(476),o=r(403),i=/^([0-9a-f]{32})$/i,a=/^[0-9a-f]{16}$/i;function s(e){return i.test(e)&&e!==n.INVALID_TRACEID}function l(e){return a.test(e)&&e!==n.INVALID_SPANID}t.isValidTraceId=s,t.isValidSpanId=l,t.isSpanContextValid=function(e){return s(e.traceId)&&l(e.spanId)},t.wrapSpanContext=function(e){return new o.NonRecordingSpan(e)}},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpanStatusCode=void 0,function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFlags=void 0,function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="1.6.0"}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e].call(i.exports,i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o={};(()=>{Object.defineProperty(o,"__esModule",{value:!0}),o.trace=o.propagation=o.metrics=o.diag=o.context=o.INVALID_SPAN_CONTEXT=o.INVALID_TRACEID=o.INVALID_SPANID=o.isValidSpanId=o.isValidTraceId=o.isSpanContextValid=o.createTraceState=o.TraceFlags=o.SpanStatusCode=o.SpanKind=o.SamplingDecision=o.ProxyTracerProvider=o.ProxyTracer=o.defaultTextMapSetter=o.defaultTextMapGetter=o.ValueType=o.createNoopMeter=o.DiagLogLevel=o.DiagConsoleLogger=o.ROOT_CONTEXT=o.createContextKey=o.baggageEntryMetadataFromString=void 0;var e=n(369);Object.defineProperty(o,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return e.baggageEntryMetadataFromString}});var t=n(780);Object.defineProperty(o,"createContextKey",{enumerable:!0,get:function(){return t.createContextKey}}),Object.defineProperty(o,"ROOT_CONTEXT",{enumerable:!0,get:function(){return t.ROOT_CONTEXT}});var r=n(972);Object.defineProperty(o,"DiagConsoleLogger",{enumerable:!0,get:function(){return r.DiagConsoleLogger}});var i=n(957);Object.defineProperty(o,"DiagLogLevel",{enumerable:!0,get:function(){return i.DiagLogLevel}});var a=n(102);Object.defineProperty(o,"createNoopMeter",{enumerable:!0,get:function(){return a.createNoopMeter}});var s=n(901);Object.defineProperty(o,"ValueType",{enumerable:!0,get:function(){return s.ValueType}});var l=n(194);Object.defineProperty(o,"defaultTextMapGetter",{enumerable:!0,get:function(){return l.defaultTextMapGetter}}),Object.defineProperty(o,"defaultTextMapSetter",{enumerable:!0,get:function(){return l.defaultTextMapSetter}});var u=n(125);Object.defineProperty(o,"ProxyTracer",{enumerable:!0,get:function(){return u.ProxyTracer}});var c=n(846);Object.defineProperty(o,"ProxyTracerProvider",{enumerable:!0,get:function(){return c.ProxyTracerProvider}});var d=n(996);Object.defineProperty(o,"SamplingDecision",{enumerable:!0,get:function(){return d.SamplingDecision}});var p=n(357);Object.defineProperty(o,"SpanKind",{enumerable:!0,get:function(){return p.SpanKind}});var g=n(847);Object.defineProperty(o,"SpanStatusCode",{enumerable:!0,get:function(){return g.SpanStatusCode}});var f=n(475);Object.defineProperty(o,"TraceFlags",{enumerable:!0,get:function(){return f.TraceFlags}});var _=n(98);Object.defineProperty(o,"createTraceState",{enumerable:!0,get:function(){return _.createTraceState}});var h=n(139);Object.defineProperty(o,"isSpanContextValid",{enumerable:!0,get:function(){return h.isSpanContextValid}}),Object.defineProperty(o,"isValidTraceId",{enumerable:!0,get:function(){return h.isValidTraceId}}),Object.defineProperty(o,"isValidSpanId",{enumerable:!0,get:function(){return h.isValidSpanId}});var m=n(476);Object.defineProperty(o,"INVALID_SPANID",{enumerable:!0,get:function(){return m.INVALID_SPANID}}),Object.defineProperty(o,"INVALID_TRACEID",{enumerable:!0,get:function(){return m.INVALID_TRACEID}}),Object.defineProperty(o,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return m.INVALID_SPAN_CONTEXT}});let S=n(67);Object.defineProperty(o,"context",{enumerable:!0,get:function(){return S.context}});let v=n(506);Object.defineProperty(o,"diag",{enumerable:!0,get:function(){return v.diag}});let E=n(886);Object.defineProperty(o,"metrics",{enumerable:!0,get:function(){return E.metrics}});let b=n(939);Object.defineProperty(o,"propagation",{enumerable:!0,get:function(){return b.propagation}});let O=n(845);Object.defineProperty(o,"trace",{enumerable:!0,get:function(){return O.trace}}),o.default={context:S.context,diag:v.diag,metrics:E.metrics,propagation:b.propagation,trace:O.trace}})(),e.exports=o})()},83382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return i}});let n=r(82101);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function i(e){return o(e)?e:Error((0,n.isPlainObject)(e)?function(e){let t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r})}(e):e+"")}},40911:(e,t)=>{"use strict";Object.defineProperty(t,"A",{enumerable:!0,get:function(){return o}});let r=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],n=(e,t)=>{let r=e;return"string"==typeof t?r=e.toLocaleString(t):!0===t&&(r=e.toLocaleString()),r};function o(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);if((t=Object.assign({},t)).signed&&0===e)return" 0 B";let o=e<0,i=o?"-":t.signed?"+":"";if(o&&(e=-e),e<1)return i+n(e,t.locale)+" B";let a=Math.min(Math.floor(Math.log10(e)/3),r.length-1);return i+n(e=Number((e/Math.pow(1e3,a)).toPrecision(3)),t.locale)+" "+r[a]}},34251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPageFiles",{enumerable:!0,get:function(){return i}});let n=r(4590),o=r(66623);function i(e,t){let r=(0,n.denormalizePagePath)((0,o.normalizePagePath)(t));return e.pages[r]||(console.warn(`Could not find files for ${r} in .next/build-manifest.json`),[])}},61611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ESCAPE_REGEX:function(){return n},htmlEscapeJsonString:function(){return o}});let r={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},n=/[&><\u2028\u2029]/g;function o(e){return e.replace(n,e=>r[e])}},91900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return i}});let n=r(81394),o=["(..)(..)","(.)","(..)","(...)"];function i(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function a(e){let t,r,i;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,i]=e.split(r,2);break}if(!t||!r||!i)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":i="/"===t?`/${i}`:t+"/"+i;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);i=t.split("/").slice(0,-1).concat(i).join("/");break;case"(...)":i="/"+i;break;case"(..)(..)":let a=t.split("/");if(a.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);i=a.slice(0,-2).concat(i).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:i}}},2186:(e,t)=>{"use strict";var r,n,o,i,a,s,l,u,c,d,p,g;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRenderSpan:function(){return l},AppRouteRouteHandlersSpan:function(){return d},BaseServerSpan:function(){return r},LoadComponentsSpan:function(){return n},LogSpanAllowList:function(){return _},MiddlewareSpan:function(){return g},NextNodeServerSpan:function(){return i},NextServerSpan:function(){return o},NextVanillaSpanAllowlist:function(){return f},NodeSpan:function(){return c},RenderSpan:function(){return s},ResolveMetadataSpan:function(){return p},RouterSpan:function(){return u},StartServerSpan:function(){return a}}),function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"}(r||(r={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(n||(n={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(o||(o={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(i||(i={})),(a||(a={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(s||(s={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(l||(l={})),(u||(u={})).executeRoute="Router.executeRoute",(c||(c={})).runHandler="Node.runHandler",(d||(d={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(p||(p={})),(g||(g={})).execute="Middleware.execute";let f=["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"],_=["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"]},96510:(e,t,r)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BubbledError:function(){return p},SpanKind:function(){return c},SpanStatusCode:function(){return u},getTracer:function(){return b},isBubbledError:function(){return g}});let o=r(2186),i=r(93322);try{n=r(20306)}catch(e){n=r(20306)}let{context:a,propagation:s,trace:l,SpanStatusCode:u,SpanKind:c,ROOT_CONTEXT:d}=n;class p extends Error{constructor(e,t){super(),this.bubble=e,this.result=t}}function g(e){return"object"==typeof e&&null!==e&&e instanceof p}let f=(e,t)=>{g(t)&&t.bubble?e.setAttribute("next.bubble",!0):(t&&e.recordException(t),e.setStatus({code:u.ERROR,message:null==t?void 0:t.message})),e.end()},_=new Map,h=n.createContextKey("next.rootSpanId"),m=0,S=()=>m++,v={set(e,t,r){e.push({key:t,value:r})}};class E{getTracerInstance(){return l.getTracer("next.js","0.0.1")}getContext(){return a}getTracePropagationData(){let e=a.active(),t=[];return s.inject(e,t,v),t}getActiveScopeSpan(){return l.getSpan(null==a?void 0:a.active())}withPropagatedContext(e,t,r){let n=a.active();if(l.getSpanContext(n))return t();let o=s.extract(n,e,r);return a.with(o,t)}trace(...e){var t;let[r,n,s]=e,{fn:u,options:c}="function"==typeof n?{fn:n,options:{}}:{fn:s,options:{...n}},p=c.spanName??r;if(!o.NextVanillaSpanAllowlist.includes(r)&&"1"!==process.env.NEXT_OTEL_VERBOSE||c.hideSpan)return u();let g=this.getSpanContext((null==c?void 0:c.parentSpan)??this.getActiveScopeSpan()),m=!1;g?(null==(t=l.getSpanContext(g))?void 0:t.isRemote)&&(m=!0):(g=(null==a?void 0:a.active())??d,m=!0);let v=S();return c.attributes={"next.span_name":p,"next.span_type":r,...c.attributes},a.with(g.setValue(h,v),()=>this.getTracerInstance().startActiveSpan(p,c,e=>{let t="performance"in globalThis&&"measure"in performance?globalThis.performance.now():void 0,n=()=>{_.delete(v),t&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX&&o.LogSpanAllowList.includes(r||"")&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(r.split(".").pop()||"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}`,{start:t,end:performance.now()})};m&&_.set(v,new Map(Object.entries(c.attributes??{})));try{if(u.length>1)return u(e,t=>f(e,t));let t=u(e);if((0,i.isThenable)(t))return t.then(t=>(e.end(),t)).catch(t=>{throw f(e,t),t}).finally(n);return e.end(),n(),t}catch(t){throw f(e,t),n(),t}}))}wrap(...e){let t=this,[r,n,i]=3===e.length?e:[e[0],{},e[1]];return o.NextVanillaSpanAllowlist.includes(r)||"1"===process.env.NEXT_OTEL_VERBOSE?function(){let e=n;"function"==typeof e&&"function"==typeof i&&(e=e.apply(this,arguments));let o=arguments.length-1,s=arguments[o];if("function"!=typeof s)return t.trace(r,e,()=>i.apply(this,arguments));{let n=t.getContext().bind(a.active(),s);return t.trace(r,e,(e,t)=>(arguments[o]=function(e){return null==t||t(e),n.apply(this,arguments)},i.apply(this,arguments)))}}:i}startSpan(...e){let[t,r]=e,n=this.getSpanContext((null==r?void 0:r.parentSpan)??this.getActiveScopeSpan());return this.getTracerInstance().startSpan(t,r,n)}getSpanContext(e){return e?l.setSpan(a.active(),e):void 0}getRootSpanAttributes(){let e=a.active().getValue(h);return _.get(e)}setRootSpanAttribute(e,t){let r=a.active().getValue(h),n=_.get(r);n&&n.set(e,t)}}let b=(()=>{let e=new E;return()=>e})()},73010:(e,t)=>{"use strict";function r(e,t){if(t)return e.filter(({key:e})=>t.includes(e))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getTracedMetadata",{enumerable:!0,get:function(){return r}})},63865:(e,t,r)=>{"use strict";e.exports=r(40361)},84244:(e,t,r)=>{"use strict";e.exports=r(63865).vendored.contexts.HtmlContext},15656:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cleanAmpPath:function(){return i},debounce:function(){return a},isBlockedPage:function(){return o}});let n=r(8939);function o(e){return n.BLOCKED_PAGES.includes(e)}function i(e){return e.match(/\?amp=(y|yes|true|1)/)&&(e=e.replace(/\?amp=(y|yes|true|1)&?/,"?")),e.match(/&=(y|yes|true|1)/)&&(e=e.replace(/&=(y|yes|true|1)/,"")),e=e.replace(/\?$/,"")}function a(e,t,r=1/0){let n,o,i;let s=0,l=0;function u(){let a=Date.now(),c=l+t-a;c<=0||s+r>=a?(n=void 0,e.apply(i,o)):n=setTimeout(u,c)}return function(...e){o=e,i=this,l=Date.now(),void 0===n&&(s=l,n=setTimeout(u,t))}}},20883:(e,t,r)=>{e.exports=r(70781)},99929:(e,t)=>{"use strict";t._=function(e){return e&&e.__esModule?e:{default:e}}}}; \ No newline at end of file + `}}),(0,n.jsx)("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:e()}}),(i.worker||[]).map((e,r)=>{let{strategy:n,src:i,children:s,dangerouslySetInnerHTML:l,...u}=e,c={};if(i)c.src=i;else if(l&&l.__html)c.dangerouslySetInnerHTML={__html:l.__html};else if(s)c.dangerouslySetInnerHTML={__html:"string"==typeof s?s:Array.isArray(s)?s.join(""):""};else throw Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script");return(0,o.createElement)("script",{...c,...u,type:"text/partytown",key:i||r,nonce:t.nonce,"data-nscript":"worker",crossOrigin:t.crossOrigin||a})})]})}catch(e){return(0,l.default)(e)&&"MODULE_NOT_FOUND"!==e.code&&console.warn(`Warning: ${e.message}`),null}}(e,t),u=(r.beforeInteractive||[]).filter(e=>e.src).map((e,r)=>{let{strategy:n,...s}=e;return(0,o.createElement)("script",{...s,key:s.src||r,defer:s.defer??!i,nonce:t.nonce,"data-nscript":"beforeInteractive",crossOrigin:t.crossOrigin||a})});return(0,n.jsxs)(n.Fragment,{children:[s,u]})}class b extends o.default.Component{static #e=this.contextType=u.HtmlContext;getCssLinks(e){let{assetPrefix:t,assetQueryString:r,dynamicImports:o,dynamicCssManifest:i,crossOrigin:a,optimizeCss:s}=this.context,l=e.allFiles.filter(e=>e.endsWith(".css")),u=new Set(e.sharedFiles),d=new Set([]),p=Array.from(new Set(o.filter(e=>e.endsWith(".css"))));if(p.length){let e=new Set(l);d=new Set(p=p.filter(t=>!(e.has(t)||u.has(t)))),l.push(...p)}let g=[];return l.forEach(e=>{let o=u.has(e),l=d.has(e),p=i.has(e);s||g.push((0,n.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,as:"style",crossOrigin:this.props.crossOrigin||a},`${e}-preload`)),g.push((0,n.jsx)("link",{nonce:this.props.nonce,rel:"stylesheet",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,crossOrigin:this.props.crossOrigin||a,"data-n-g":l?void 0:o?"":void 0,"data-n-p":o||l||p?void 0:""},e))}),0===g.length?null:g}getPreloadDynamicChunks(){let{dynamicImports:e,assetPrefix:t,assetQueryString:r,crossOrigin:o}=this.context;return e.map(e=>e.endsWith(".js")?(0,n.jsx)("link",{rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||o},e):null).filter(Boolean)}getPreloadMainLinks(e){let{assetPrefix:t,assetQueryString:r,scriptLoader:o,crossOrigin:i}=this.context,a=e.allFiles.filter(e=>e.endsWith(".js"));return[...(o.beforeInteractive||[]).map(e=>(0,n.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:e.src,as:"script",crossOrigin:this.props.crossOrigin||i},e.src)),...a.map(e=>(0,n.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${r}`,as:"script",crossOrigin:this.props.crossOrigin||i},e))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:e}=this.context,{nonce:t,crossOrigin:r}=this.props;return(e.beforeInteractive||[]).filter(e=>!e.src&&(e.dangerouslySetInnerHTML||e.children)).map((e,n)=>{let{strategy:i,children:a,dangerouslySetInnerHTML:s,src:l,...u}=e,c="";return s&&s.__html?c=s.__html:a&&(c="string"==typeof a?a:Array.isArray(a)?a.join(""):""),(0,o.createElement)("script",{...u,dangerouslySetInnerHTML:{__html:c},key:u.id||n,nonce:t,"data-nscript":"beforeInteractive",crossOrigin:r||void 0})})}getDynamicChunks(e){return S(this.context,this.props,e)}getPreNextScripts(){return E(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}render(){let{styles:e,ampPath:t,inAmpMode:i,hybridAmp:a,canonicalBase:s,__NEXT_DATA__:l,dangerousAsPath:u,headTags:g,unstable_runtimeJS:f,unstable_JsPreload:h,disableOptimizedLoading:S,optimizeCss:v,assetPrefix:E,nextFontManifest:b}=this.context,O=!1===f,y=!1===h||!S;this.context.docComponentsRendered.Head=!0;let{head:N}=this.context,P=[],T=[];N&&(N.forEach(e=>{e&&"link"===e.type&&"preload"===e.props.rel&&"style"===e.props.as?this.context.strictNextHead?P.push(o.default.cloneElement(e,{"data-next-head":""})):P.push(e):e&&(this.context.strictNextHead?T.push(o.default.cloneElement(e,{"data-next-head":""})):T.push(e))}),N=P.concat(T));let R=o.default.Children.toArray(this.props.children).filter(Boolean),I=!1,x=!1;N=o.default.Children.map(N||[],e=>{if(!e)return e;let{type:t,props:r}=e;if(i){let n="";if("meta"===t&&"viewport"===r.name?n='name="viewport"':"link"===t&&"canonical"===r.rel?x=!0:"script"===t&&(r.src&&-1>r.src.indexOf("ampproject")||r.dangerouslySetInnerHTML&&(!r.type||"text/javascript"===r.type))&&(n="{n+=` ${e}="${r[e]}"`}),n+="/>"),n)return console.warn(`Found conflicting amp tag "${e.type}" with conflicting prop ${n} in ${l.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`),null}else"link"===t&&"amphtml"===r.rel&&(I=!0);return e});let M=_(this.context.buildManifest,this.context.__NEXT_DATA__.page,i),C=function(e,t,r=""){if(!e)return{preconnect:null,preload:null};let o=e.pages["/_app"],i=e.pages[t],a=Array.from(new Set([...o??[],...i??[]]));return{preconnect:0===a.length&&(o||i)?(0,n.jsx)("link",{"data-next-font":e.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:a?a.map(e=>{let t=/\.(woff|woff2|eot|ttf|otf)$/.exec(e)[1];return(0,n.jsx)("link",{rel:"preload",href:`${r}/_next/${(0,c.encodeURIPath)(e)}`,as:"font",type:`font/${t}`,crossOrigin:"anonymous","data-next-font":e.includes("-s")?"size-adjust":""},e)}):null}}(b,u,E),A=((0,p.getTracedMetadata)((0,d.getTracer)().getTracePropagationData(),this.context.experimentalClientTraceMetadata)||[]).map(({key:e,value:t},r)=>(0,n.jsx)("meta",{name:e,content:t},`next-trace-data-${r}`));return(0,n.jsxs)("head",{...function(e){let{crossOrigin:t,nonce:r,...n}=e;return n}(this.props),children:[this.context.isDevelopment&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{"data-next-hide-fouc":!0,"data-ampdevmode":i?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),(0,n.jsx)("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":i?"true":void 0,children:(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}})})]}),N,this.context.strictNextHead?null:(0,n.jsx)("meta",{name:"next-head-count",content:o.default.Children.count(N||[]).toString()}),R,C.preconnect,C.preload,i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!x&&(0,n.jsx)("link",{rel:"canonical",href:s+r(15656).cleanAmpPath(u)}),(0,n.jsx)("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),(0,n.jsx)(m,{styles:e}),(0,n.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),(0,n.jsx)("noscript",{children:(0,n.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})}),(0,n.jsx)("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})]}),!i&&(0,n.jsxs)(n.Fragment,{children:[!I&&a&&(0,n.jsx)("link",{rel:"amphtml",href:s+(t||`${u}${u.includes("?")?"&":"?"}amp=1`)}),this.getBeforeInteractiveInlineScripts(),!v&&this.getCssLinks(M),!v&&(0,n.jsx)("noscript",{"data-n-css":this.props.nonce??""}),!O&&!y&&this.getPreloadDynamicChunks(),!O&&!y&&this.getPreloadMainLinks(M),!S&&!O&&this.getPolyfillScripts(),!S&&!O&&this.getPreNextScripts(),!S&&!O&&this.getDynamicChunks(M),!S&&!O&&this.getScripts(M),v&&this.getCssLinks(M),v&&(0,n.jsx)("noscript",{"data-n-css":this.props.nonce??""}),this.context.isDevelopment&&(0,n.jsx)("noscript",{id:"__next_css__DO_NOT_USE__"}),A,e||null]}),o.default.createElement(o.default.Fragment,{},...g||[])]})}}class O extends o.default.Component{static #e=this.contextType=u.HtmlContext;getDynamicChunks(e){return S(this.context,this.props,e)}getPreNextScripts(){return E(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}static getInlineScriptSource(e){let{__NEXT_DATA__:t,largePageDataBytes:n}=e;try{let o=JSON.stringify(t);if(f.has(t.page))return(0,s.htmlEscapeJsonString)(o);let i=Buffer.from(o).byteLength,a=r(40911).A;return n&&i>n&&(f.add(t.page),console.warn(`Warning: data for page "${t.page}"${t.page===e.dangerousAsPath?"":` (path "${e.dangerousAsPath}")`} is ${a(i)} which exceeds the threshold of ${a(n)}, this amount of data can reduce performance. +See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,s.htmlEscapeJsonString)(o)}catch(e){if((0,l.default)(e)&&-1!==e.message.indexOf("circular structure"))throw Error(`Circular structure in "getInitialProps" result of page "${t.page}". https://nextjs.org/docs/messages/circular-structure`);throw e}}render(){let{assetPrefix:e,inAmpMode:t,buildManifest:r,unstable_runtimeJS:o,docComponentsRendered:i,assetQueryString:a,disableOptimizedLoading:s,crossOrigin:l}=this.context,u=!1===o;if(i.NextScript=!0,t)return null;let d=_(this.context.buildManifest,this.context.__NEXT_DATA__.page,t);return(0,n.jsxs)(n.Fragment,{children:[!u&&r.devFiles?r.devFiles.map(t=>(0,n.jsx)("script",{src:`${e}/_next/${(0,c.encodeURIPath)(t)}${a}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l},t)):null,u?null:(0,n.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l,dangerouslySetInnerHTML:{__html:O.getInlineScriptSource(this.context)}}),s&&!u&&this.getPolyfillScripts(),s&&!u&&this.getPreNextScripts(),s&&!u&&this.getDynamicChunks(d),s&&!u&&this.getScripts(d)]})}}function y(e){let{inAmpMode:t,docComponentsRendered:r,locale:i,scriptLoader:a,__NEXT_DATA__:s}=(0,u.useHtmlContext)();return r.Html=!0,function(e,t,r){var n,i,a,s;if(!r.children)return;let l=[],u=Array.isArray(r.children)?r.children:[r.children],c=null==(i=u.find(e=>e.type===b))?void 0:null==(n=i.props)?void 0:n.children,d=null==(s=u.find(e=>"body"===e.type))?void 0:null==(a=s.props)?void 0:a.children,p=[...Array.isArray(c)?c:[c],...Array.isArray(d)?d:[d]];o.default.Children.forEach(p,t=>{var r;if(t&&(null==(r=t.type)?void 0:r.__nextScript)){if("beforeInteractive"===t.props.strategy){e.beforeInteractive=(e.beforeInteractive||[]).concat([{...t.props}]);return}if(["lazyOnload","afterInteractive","worker"].includes(t.props.strategy)){l.push(t.props);return}if(void 0===t.props.strategy){l.push({...t.props,strategy:"afterInteractive"});return}}}),t.scriptLoader=l}(a,s,e),(0,n.jsx)("html",{...e,lang:e.lang||i||void 0,amp:t?"":void 0,"data-ampdevmode":void 0})}function N(){let{docComponentsRendered:e}=(0,u.useHtmlContext)();return e.Main=!0,(0,n.jsx)("next-js-internal-body-render-target",{})}class P extends o.default.Component{static getInitialProps(e){return e.defaultGetInitialProps(e)}render(){return(0,n.jsxs)(y,{children:[(0,n.jsx)(b,{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(N,{}),(0,n.jsx)(O,{})]})]})}}P[i.NEXT_BUILTIN_DOCUMENT]=function(){return(0,n.jsxs)(y,{children:[(0,n.jsx)(b,{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(N,{}),(0,n.jsx)(O,{})]})]})}},8939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{APP_BUILD_MANIFEST:function(){return v},APP_CLIENT_INTERNALS:function(){return J},APP_PATHS_MANIFEST:function(){return h},APP_PATH_ROUTES_MANIFEST:function(){return m},BARREL_OPTIMIZATION_PREFIX:function(){return $},BLOCKED_PAGES:function(){return B},BUILD_ID_FILE:function(){return w},BUILD_MANIFEST:function(){return S},CLIENT_PUBLIC_FILES_PATH:function(){return F},CLIENT_REFERENCE_MANIFEST:function(){return G},CLIENT_STATIC_FILES_PATH:function(){return U},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return Q},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return Y},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return q},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return et},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return er},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return ee},COMPILER_INDEXES:function(){return i},COMPILER_NAMES:function(){return o},CONFIG_FILES:function(){return D},DEFAULT_RUNTIME_WEBPACK:function(){return en},DEFAULT_SANS_SERIF_FONT:function(){return el},DEFAULT_SERIF_FONT:function(){return es},DEV_CLIENT_MIDDLEWARE_MANIFEST:function(){return A},DEV_CLIENT_PAGES_MANIFEST:function(){return x},DYNAMIC_CSS_MANIFEST:function(){return X},EDGE_RUNTIME_WEBPACK:function(){return eo},EDGE_UNSUPPORTED_NODE_APIS:function(){return eg},EXPORT_DETAIL:function(){return N},EXPORT_MARKER:function(){return y},FUNCTIONS_CONFIG_MANIFEST:function(){return E},IMAGES_MANIFEST:function(){return R},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return K},MIDDLEWARE_BUILD_MANIFEST:function(){return W},MIDDLEWARE_MANIFEST:function(){return M},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return n.default},NEXT_BUILTIN_DOCUMENT:function(){return k},NEXT_FONT_MANIFEST:function(){return O},PAGES_MANIFEST:function(){return f},PHASE_DEVELOPMENT_SERVER:function(){return d},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return g},PHASE_PRODUCTION_BUILD:function(){return u},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return p},PRERENDER_MANIFEST:function(){return P},REACT_LOADABLE_MANIFEST:function(){return j},ROUTES_MANIFEST:function(){return T},RSC_MODULE_TYPES:function(){return ep},SERVER_DIRECTORY:function(){return L},SERVER_FILES_MANIFEST:function(){return I},SERVER_PROPS_ID:function(){return ea},SERVER_REFERENCE_MANIFEST:function(){return H},STATIC_PROPS_ID:function(){return ei},STATIC_STATUS_PAGES:function(){return eu},STRING_LITERAL_DROP_BUNDLE:function(){return V},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return b},SYSTEM_ENTRYPOINTS:function(){return ef},TRACE_OUTPUT_VERSION:function(){return ec},TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST:function(){return C},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ed},UNDERSCORE_NOT_FOUND_ROUTE:function(){return a},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return s},WEBPACK_STATS:function(){return _}});let n=r(99929)._(r(1999)),o={client:"client",server:"server",edgeServer:"edge-server"},i={[o.client]:0,[o.server]:1,[o.edgeServer]:2},a="/_not-found",s=""+a+"/page",l="phase-export",u="phase-production-build",c="phase-production-server",d="phase-development-server",p="phase-test",g="phase-info",f="pages-manifest.json",_="webpack-stats.json",h="app-paths-manifest.json",m="app-path-routes-manifest.json",S="build-manifest.json",v="app-build-manifest.json",E="functions-config-manifest.json",b="subresource-integrity-manifest",O="next-font-manifest",y="export-marker.json",N="export-detail.json",P="prerender-manifest.json",T="routes-manifest.json",R="images-manifest.json",I="required-server-files.json",x="_devPagesManifest.json",M="middleware-manifest.json",C="_clientMiddlewareManifest.json",A="_devMiddlewareManifest.json",j="react-loadable-manifest.json",L="server",D=["next.config.js","next.config.mjs","next.config.ts"],w="BUILD_ID",B=["/_document","/_app","/_error"],F="public",U="static",V="__NEXT_DROP_CLIENT_FILE__",k="__NEXT_BUILTIN_DOCUMENT__",$="__barrel_optimize__",G="client-reference-manifest",H="server-reference-manifest",W="middleware-build-manifest",z="middleware-react-loadable-manifest",K="interception-route-rewrite-manifest",X="dynamic-css-manifest",Y="main",q=""+Y+"-app",J="app-pages-internals",Z="react-refresh",Q="amp",ee="webpack",et="polyfills",er=Symbol(et),en="webpack-runtime",eo="edge-runtime-webpack",ei="__N_SSG",ea="__N_SSP",es={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},el={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},eu=["/500"],ec=1,ed=6e3,ep={client:"client",server:"server"},eg=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],ef=new Set([Y,Z,Q,q]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81149:(e,t)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return r}})},82101:(e,t)=>{"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},93322:(e,t)=>{"use strict";function r(e){return null!==e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isThenable",{enumerable:!0,get:function(){return r}})},1999:e=>{"use strict";e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},4590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return i}});let n=r(50732),o=r(83102);function i(e){let t=(0,o.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},65075:(e,t)=>{"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},66623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePagePath",{enumerable:!0,get:function(){return a}});let n=r(65075),o=r(50732),i=r(72811);function a(e){let t=/^\/index(\/|$)/.test(e)&&!(0,o.isDynamicRoute)(e)?"/index"+e:"/"===e?"/index":(0,n.ensureLeadingSlash)(e);{let{posix:e}=r(33873),n=e.normalize(t);if(n!==t)throw new i.NormalizeError("Requested and resolved page mismatch: "+t+" "+n)}return t}},83102:(e,t)=>{"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},81394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return i},normalizeRscURL:function(){return a}});let n=r(65075),o=r(18355);function i(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function a(e){return e.replace(/\.rsc($|\?)/,"$1")}},50732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return n.getSortedRouteObjects},getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(80610),o=r(50270)},50270:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let n=r(91900),o=/\/\[[^/]+?\](?=\/|$)/;function i(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},80610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return o},getSortedRoutes:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),a=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),a=!0),r.startsWith("…"))throw Error("Detected a three-dot character ('…') at ('"+r+"'). Did you mean ('...')?");if(r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function i(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(a){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');i(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');i(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(a)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');i(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}function o(e,t){let r={},o=[];for(let n=0;ne[r[t]])}},18355:(e,t)=>{"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}function n(e){return e.startsWith("@")&&"@children"!==e}function o(e,t){if(e.includes(i)){let e=JSON.stringify(t);return"{}"!==e?i+"?"+e:i}return e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return a},PAGE_SEGMENT_KEY:function(){return i},addSearchParamsIfPageSegment:function(){return o},isGroupSegment:function(){return r},isParallelRouteSegment:function(){return n}});let i="__PAGE__",a="__DEFAULT__"},72811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return f},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return m},NormalizeError:function(){return _},PageNotFoundError:function(){return h},SP:function(){return p},ST:function(){return g},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return a},getURL:function(){return s},isAbsoluteUrl:function(){return i},isResSent:function(){return u},loadGetInitialProps:function(){return d},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return v}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),i=0;io.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function s(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function u(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function d(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await d(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&u(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let p="undefined"!=typeof performance,g=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class f extends Error{}class _ extends Error{}class h extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},20306:e=>{(()=>{"use strict";var t={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContextAPI=void 0;let n=r(223),o=r(172),i=r(930),a="context",s=new n.NoopContextManager;class l{constructor(){}static getInstance(){return this._instance||(this._instance=new l),this._instance}setGlobalContextManager(e){return(0,o.registerGlobal)(a,e,i.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,o.getGlobal)(a)||s}disable(){this._getContextManager().disable(),(0,o.unregisterGlobal)(a,i.DiagAPI.instance())}}t.ContextAPI=l},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagAPI=void 0;let n=r(56),o=r(912),i=r(957),a=r(172);class s{constructor(){function e(e){return function(...t){let r=(0,a.getGlobal)("diag");if(r)return r[e](...t)}}let t=this;t.setLogger=(e,r={logLevel:i.DiagLogLevel.INFO})=>{var n,s,l;if(e===t){let e=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(n=e.stack)&&void 0!==n?n:e.message),!1}"number"==typeof r&&(r={logLevel:r});let u=(0,a.getGlobal)("diag"),c=(0,o.createLogLevelDiagLogger)(null!==(s=r.logLevel)&&void 0!==s?s:i.DiagLogLevel.INFO,e);if(u&&!r.suppressOverrideMessage){let e=null!==(l=Error().stack)&&void 0!==l?l:"";u.warn(`Current logger will be overwritten from ${e}`),c.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,a.registerGlobal)("diag",c,t,!0)},t.disable=()=>{(0,a.unregisterGlobal)("diag",t)},t.createComponentLogger=e=>new n.DiagComponentLogger(e),t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}static instance(){return this._instance||(this._instance=new s),this._instance}}t.DiagAPI=s},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsAPI=void 0;let n=r(660),o=r(172),i=r(930),a="metrics";class s{constructor(){}static getInstance(){return this._instance||(this._instance=new s),this._instance}setGlobalMeterProvider(e){return(0,o.registerGlobal)(a,e,i.DiagAPI.instance())}getMeterProvider(){return(0,o.getGlobal)(a)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,o.unregisterGlobal)(a,i.DiagAPI.instance())}}t.MetricsAPI=s},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropagationAPI=void 0;let n=r(172),o=r(874),i=r(194),a=r(277),s=r(369),l=r(930),u="propagation",c=new o.NoopTextMapPropagator;class d{constructor(){this.createBaggage=s.createBaggage,this.getBaggage=a.getBaggage,this.getActiveBaggage=a.getActiveBaggage,this.setBaggage=a.setBaggage,this.deleteBaggage=a.deleteBaggage}static getInstance(){return this._instance||(this._instance=new d),this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,l.DiagAPI.instance())}inject(e,t,r=i.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=i.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,l.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||c}}t.PropagationAPI=d},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceAPI=void 0;let n=r(172),o=r(846),i=r(139),a=r(607),s=r(930),l="trace";class u{constructor(){this._proxyTracerProvider=new o.ProxyTracerProvider,this.wrapSpanContext=i.wrapSpanContext,this.isSpanContextValid=i.isSpanContextValid,this.deleteSpan=a.deleteSpan,this.getSpan=a.getSpan,this.getActiveSpan=a.getActiveSpan,this.getSpanContext=a.getSpanContext,this.setSpan=a.setSpan,this.setSpanContext=a.setSpanContext}static getInstance(){return this._instance||(this._instance=new u),this._instance}setGlobalTracerProvider(e){let t=(0,n.registerGlobal)(l,this._proxyTracerProvider,s.DiagAPI.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return(0,n.getGlobal)(l)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(l,s.DiagAPI.instance()),this._proxyTracerProvider=new o.ProxyTracerProvider}}t.TraceAPI=u},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;let n=r(491),o=(0,r(780).createContextKey)("OpenTelemetry Baggage Key");function i(e){return e.getValue(o)||void 0}t.getBaggage=i,t.getActiveBaggage=function(){return i(n.ContextAPI.getInstance().active())},t.setBaggage=function(e,t){return e.setValue(o,t)},t.deleteBaggage=function(e){return e.deleteValue(o)}},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaggageImpl=void 0;class r{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map(([e,t])=>[e,t])}setEntry(e,t){let n=new r(this._entries);return n._entries.set(e,t),n}removeEntry(e){let t=new r(this._entries);return t._entries.delete(e),t}removeEntries(...e){let t=new r(this._entries);for(let r of e)t._entries.delete(r);return t}clear(){return new r}}t.BaggageImpl=r},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.baggageEntryMetadataSymbol=void 0,t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.baggageEntryMetadataFromString=t.createBaggage=void 0;let n=r(930),o=r(993),i=r(830),a=n.DiagAPI.instance();t.createBaggage=function(e={}){return new o.BaggageImpl(new Map(Object.entries(e)))},t.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(a.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:i.baggageEntryMetadataSymbol,toString:()=>e}}},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.context=void 0;let n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopContextManager=void 0;let n=r(780);class o{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=o},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ROOT_CONTEXT=t.createContextKey=void 0,t.createContextKey=function(e){return Symbol.for(e)};class r{constructor(e){let t=this;t._currentContext=e?new Map(e):new Map,t.getValue=e=>t._currentContext.get(e),t.setValue=(e,n)=>{let o=new r(t._currentContext);return o._currentContext.set(e,n),o},t.deleteValue=e=>{let n=new r(t._currentContext);return n._currentContext.delete(e),n}}}t.ROOT_CONTEXT=new r},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.diag=void 0;let n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagComponentLogger=void 0;let n=r(172);class o{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return i("debug",this._namespace,e)}error(...e){return i("error",this._namespace,e)}info(...e){return i("info",this._namespace,e)}warn(...e){return i("warn",this._namespace,e)}verbose(...e){return i("verbose",this._namespace,e)}}function i(e,t,r){let o=(0,n.getGlobal)("diag");if(o)return r.unshift(t),o[e](...r)}t.DiagComponentLogger=o},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagConsoleLogger=void 0;let r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class n{constructor(){for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0}),t.createLogLevelDiagLogger=void 0;let n=r(957);t.createLogLevelDiagLogger=function(e,t){function r(r,n){let o=t[r];return"function"==typeof o&&e>=n?o.bind(t):function(){}}return en.DiagLogLevel.ALL&&(e=n.DiagLogLevel.ALL),t=t||{},{error:r("error",n.DiagLogLevel.ERROR),warn:r("warn",n.DiagLogLevel.WARN),info:r("info",n.DiagLogLevel.INFO),debug:r("debug",n.DiagLogLevel.DEBUG),verbose:r("verbose",n.DiagLogLevel.VERBOSE)}}},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagLogLevel=void 0,function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;let n=r(200),o=r(521),i=r(130),a=o.VERSION.split(".")[0],s=Symbol.for(`opentelemetry.js.api.${a}`),l=n._globalThis;t.registerGlobal=function(e,t,r,n=!1){var i;let a=l[s]=null!==(i=l[s])&&void 0!==i?i:{version:o.VERSION};if(!n&&a[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return r.error(t.stack||t.message),!1}if(a.version!==o.VERSION){let t=Error(`@opentelemetry/api: Registration of version v${a.version} for ${e} does not match previously registered API v${o.VERSION}`);return r.error(t.stack||t.message),!1}return a[e]=t,r.debug(`@opentelemetry/api: Registered a global for ${e} v${o.VERSION}.`),!0},t.getGlobal=function(e){var t,r;let n=null===(t=l[s])||void 0===t?void 0:t.version;if(n&&(0,i.isCompatible)(n))return null===(r=l[s])||void 0===r?void 0:r[e]},t.unregisterGlobal=function(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${o.VERSION}.`);let r=l[s];r&&delete r[e]}},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCompatible=t._makeCompatibilityCheck=void 0;let n=r(521),o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function i(e){let t=new Set([e]),r=new Set,n=e.match(o);if(!n)return()=>!1;let i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=i.prerelease)return function(t){return t===e};function a(e){return r.add(e),!1}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;let n=e.match(o);if(!n)return a(e);let s={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};return null!=s.prerelease||i.major!==s.major?a(e):0===i.major?i.minor===s.minor&&i.patch<=s.patch?(t.add(e),!0):a(e):i.minor<=s.minor?(t.add(e),!0):a(e)}}t._makeCompatibilityCheck=i,t.isCompatible=i(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.metrics=void 0;let n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueType=void 0,function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class r{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=r;class n{}t.NoopMetric=n;class o extends n{add(e,t){}}t.NoopCounterMetric=o;class i extends n{add(e,t){}}t.NoopUpDownCounterMetric=i;class a extends n{record(e,t){}}t.NoopHistogramMetric=a;class s{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=s;class l extends s{}t.NoopObservableCounterMetric=l;class u extends s{}t.NoopObservableGaugeMetric=u;class c extends s{}t.NoopObservableUpDownCounterMetric=c,t.NOOP_METER=new r,t.NOOP_COUNTER_METRIC=new o,t.NOOP_HISTOGRAM_METRIC=new a,t.NOOP_UP_DOWN_COUNTER_METRIC=new i,t.NOOP_OBSERVABLE_COUNTER_METRIC=new l,t.NOOP_OBSERVABLE_GAUGE_METRIC=new u,t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new c,t.createNoopMeter=function(){return t.NOOP_METER}},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;let n=r(102);class o{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=o,t.NOOP_METER_PROVIDER=new o},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._globalThis=void 0,t._globalThis="object"==typeof globalThis?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propagation=void 0;let n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTextMapPropagator=void 0;class r{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=r},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTextMapSetter=t.defaultTextMapGetter=void 0,t.defaultTextMapGetter={get(e,t){if(null!=e)return e[t]},keys:e=>null==e?[]:Object.keys(e)},t.defaultTextMapSetter={set(e,t,r){null!=e&&(e[t]=r)}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trace=void 0;let n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NonRecordingSpan=void 0;let n=r(476);class o{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}t.NonRecordingSpan=o},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTracer=void 0;let n=r(491),o=r(607),i=r(403),a=r(139),s=n.ContextAPI.getInstance();class l{startSpan(e,t,r=s.active()){if(null==t?void 0:t.root)return new i.NonRecordingSpan;let n=r&&(0,o.getSpanContext)(r);return"object"==typeof n&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&(0,a.isSpanContextValid)(n)?new i.NonRecordingSpan(n):new i.NonRecordingSpan}startActiveSpan(e,t,r,n){let i,a,l;if(arguments.length<2)return;2==arguments.length?l=t:3==arguments.length?(i=t,l=r):(i=t,a=r,l=n);let u=null!=a?a:s.active(),c=this.startSpan(e,i,u),d=(0,o.setSpan)(u,c);return s.with(d,l,void 0,c)}}t.NoopTracer=l},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTracerProvider=void 0;let n=r(614);class o{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=o},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyTracer=void 0;let n=new(r(614)).NoopTracer;class o{constructor(e,t,r,n){this._provider=e,this.name=t,this.version=r,this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){let o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):n}}t.ProxyTracer=o},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyTracerProvider=void 0;let n=r(125),o=new(r(124)).NoopTracerProvider;class i{getTracer(e,t,r){var o;return null!==(o=this.getDelegateTracer(e,t,r))&&void 0!==o?o:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return null!==(e=this._delegate)&&void 0!==e?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=i},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SamplingDecision=void 0,function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;let n=r(780),o=r(403),i=r(491),a=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function s(e){return e.getValue(a)||void 0}function l(e,t){return e.setValue(a,t)}t.getSpan=s,t.getActiveSpan=function(){return s(i.ContextAPI.getInstance().active())},t.setSpan=l,t.deleteSpan=function(e){return e.deleteValue(a)},t.setSpanContext=function(e,t){return l(e,new o.NonRecordingSpan(t))},t.getSpanContext=function(e){var t;return null===(t=s(e))||void 0===t?void 0:t.spanContext()}},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceStateImpl=void 0;let n=r(564);class o{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,t),r}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+"="+this.get(t)),e),[]).join(",")}_parse(e){!(e.length>512)&&(this._internalState=e.split(",").reverse().reduce((e,t)=>{let r=t.trim(),o=r.indexOf("=");if(-1!==o){let i=r.slice(0,o),a=r.slice(o+1,t.length);(0,n.validateKey)(i)&&(0,n.validateValue)(a)&&e.set(i,a)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new o;return e._internalState=new Map(this._internalState),e}}t.TraceStateImpl=o},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateValue=t.validateKey=void 0;let r="[_0-9a-z-*/]",n=`[a-z]${r}{0,255}`,o=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`,i=RegExp(`^(?:${n}|${o})$`),a=/^[ -~]{0,255}[!-~]$/,s=/,|=/;t.validateKey=function(e){return i.test(e)},t.validateValue=function(e){return a.test(e)&&!s.test(e)}},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createTraceState=void 0;let n=r(325);t.createTraceState=function(e){return new n.TraceStateImpl(e)}},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;let n=r(475);t.INVALID_SPANID="0000000000000000",t.INVALID_TRACEID="00000000000000000000000000000000",t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpanKind=void 0,function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;let n=r(476),o=r(403),i=/^([0-9a-f]{32})$/i,a=/^[0-9a-f]{16}$/i;function s(e){return i.test(e)&&e!==n.INVALID_TRACEID}function l(e){return a.test(e)&&e!==n.INVALID_SPANID}t.isValidTraceId=s,t.isValidSpanId=l,t.isSpanContextValid=function(e){return s(e.traceId)&&l(e.spanId)},t.wrapSpanContext=function(e){return new o.NonRecordingSpan(e)}},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpanStatusCode=void 0,function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFlags=void 0,function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="1.6.0"}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e].call(i.exports,i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o={};(()=>{Object.defineProperty(o,"__esModule",{value:!0}),o.trace=o.propagation=o.metrics=o.diag=o.context=o.INVALID_SPAN_CONTEXT=o.INVALID_TRACEID=o.INVALID_SPANID=o.isValidSpanId=o.isValidTraceId=o.isSpanContextValid=o.createTraceState=o.TraceFlags=o.SpanStatusCode=o.SpanKind=o.SamplingDecision=o.ProxyTracerProvider=o.ProxyTracer=o.defaultTextMapSetter=o.defaultTextMapGetter=o.ValueType=o.createNoopMeter=o.DiagLogLevel=o.DiagConsoleLogger=o.ROOT_CONTEXT=o.createContextKey=o.baggageEntryMetadataFromString=void 0;var e=n(369);Object.defineProperty(o,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return e.baggageEntryMetadataFromString}});var t=n(780);Object.defineProperty(o,"createContextKey",{enumerable:!0,get:function(){return t.createContextKey}}),Object.defineProperty(o,"ROOT_CONTEXT",{enumerable:!0,get:function(){return t.ROOT_CONTEXT}});var r=n(972);Object.defineProperty(o,"DiagConsoleLogger",{enumerable:!0,get:function(){return r.DiagConsoleLogger}});var i=n(957);Object.defineProperty(o,"DiagLogLevel",{enumerable:!0,get:function(){return i.DiagLogLevel}});var a=n(102);Object.defineProperty(o,"createNoopMeter",{enumerable:!0,get:function(){return a.createNoopMeter}});var s=n(901);Object.defineProperty(o,"ValueType",{enumerable:!0,get:function(){return s.ValueType}});var l=n(194);Object.defineProperty(o,"defaultTextMapGetter",{enumerable:!0,get:function(){return l.defaultTextMapGetter}}),Object.defineProperty(o,"defaultTextMapSetter",{enumerable:!0,get:function(){return l.defaultTextMapSetter}});var u=n(125);Object.defineProperty(o,"ProxyTracer",{enumerable:!0,get:function(){return u.ProxyTracer}});var c=n(846);Object.defineProperty(o,"ProxyTracerProvider",{enumerable:!0,get:function(){return c.ProxyTracerProvider}});var d=n(996);Object.defineProperty(o,"SamplingDecision",{enumerable:!0,get:function(){return d.SamplingDecision}});var p=n(357);Object.defineProperty(o,"SpanKind",{enumerable:!0,get:function(){return p.SpanKind}});var g=n(847);Object.defineProperty(o,"SpanStatusCode",{enumerable:!0,get:function(){return g.SpanStatusCode}});var f=n(475);Object.defineProperty(o,"TraceFlags",{enumerable:!0,get:function(){return f.TraceFlags}});var _=n(98);Object.defineProperty(o,"createTraceState",{enumerable:!0,get:function(){return _.createTraceState}});var h=n(139);Object.defineProperty(o,"isSpanContextValid",{enumerable:!0,get:function(){return h.isSpanContextValid}}),Object.defineProperty(o,"isValidTraceId",{enumerable:!0,get:function(){return h.isValidTraceId}}),Object.defineProperty(o,"isValidSpanId",{enumerable:!0,get:function(){return h.isValidSpanId}});var m=n(476);Object.defineProperty(o,"INVALID_SPANID",{enumerable:!0,get:function(){return m.INVALID_SPANID}}),Object.defineProperty(o,"INVALID_TRACEID",{enumerable:!0,get:function(){return m.INVALID_TRACEID}}),Object.defineProperty(o,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return m.INVALID_SPAN_CONTEXT}});let S=n(67);Object.defineProperty(o,"context",{enumerable:!0,get:function(){return S.context}});let v=n(506);Object.defineProperty(o,"diag",{enumerable:!0,get:function(){return v.diag}});let E=n(886);Object.defineProperty(o,"metrics",{enumerable:!0,get:function(){return E.metrics}});let b=n(939);Object.defineProperty(o,"propagation",{enumerable:!0,get:function(){return b.propagation}});let O=n(845);Object.defineProperty(o,"trace",{enumerable:!0,get:function(){return O.trace}}),o.default={context:S.context,diag:v.diag,metrics:E.metrics,propagation:b.propagation,trace:O.trace}})(),e.exports=o})()},83382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return i}});let n=r(82101);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function i(e){return o(e)?e:Error((0,n.isPlainObject)(e)?function(e){let t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r})}(e):e+"")}},40911:(e,t)=>{"use strict";Object.defineProperty(t,"A",{enumerable:!0,get:function(){return o}});let r=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],n=(e,t)=>{let r=e;return"string"==typeof t?r=e.toLocaleString(t):!0===t&&(r=e.toLocaleString()),r};function o(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);if((t=Object.assign({},t)).signed&&0===e)return" 0 B";let o=e<0,i=o?"-":t.signed?"+":"";if(o&&(e=-e),e<1)return i+n(e,t.locale)+" B";let a=Math.min(Math.floor(Math.log10(e)/3),r.length-1);return i+n(e=Number((e/Math.pow(1e3,a)).toPrecision(3)),t.locale)+" "+r[a]}},34251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPageFiles",{enumerable:!0,get:function(){return i}});let n=r(4590),o=r(66623);function i(e,t){let r=(0,n.denormalizePagePath)((0,o.normalizePagePath)(t));return e.pages[r]||(console.warn(`Could not find files for ${r} in .next/build-manifest.json`),[])}},61611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ESCAPE_REGEX:function(){return n},htmlEscapeJsonString:function(){return o}});let r={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},n=/[&><\u2028\u2029]/g;function o(e){return e.replace(n,e=>r[e])}},91900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return i}});let n=r(81394),o=["(..)(..)","(.)","(..)","(...)"];function i(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function a(e){let t,r,i;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,i]=e.split(r,2);break}if(!t||!r||!i)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":i="/"===t?`/${i}`:t+"/"+i;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);i=t.split("/").slice(0,-1).concat(i).join("/");break;case"(...)":i="/"+i;break;case"(..)(..)":let a=t.split("/");if(a.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);i=a.slice(0,-2).concat(i).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:i}}},2186:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRenderSpan:function(){return l},AppRouteRouteHandlersSpan:function(){return d},BaseServerSpan:function(){return r},LoadComponentsSpan:function(){return n},LogSpanAllowList:function(){return _},MiddlewareSpan:function(){return g},NextNodeServerSpan:function(){return i},NextServerSpan:function(){return o},NextVanillaSpanAllowlist:function(){return f},NodeSpan:function(){return c},RenderSpan:function(){return s},ResolveMetadataSpan:function(){return p},RouterSpan:function(){return u},StartServerSpan:function(){return a}});var r=function(e){return e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404",e}(r||{}),n=function(e){return e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents",e}(n||{}),o=function(e){return e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer",e}(o||{}),i=function(e){return e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch",e}(i||{}),a=function(e){return e.startServer="startServer.startServer",e}(a||{}),s=function(e){return e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult",e}(s||{}),l=function(e){return e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch",e}(l||{}),u=function(e){return e.executeRoute="Router.executeRoute",e}(u||{}),c=function(e){return e.runHandler="Node.runHandler",e}(c||{}),d=function(e){return e.runHandler="AppRouteRouteHandlers.runHandler",e}(d||{}),p=function(e){return e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport",e}(p||{}),g=function(e){return e.execute="Middleware.execute",e}(g||{});let f=["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"],_=["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"]},96510:(e,t,r)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BubbledError:function(){return p},SpanKind:function(){return c},SpanStatusCode:function(){return u},getTracer:function(){return b},isBubbledError:function(){return g}});let o=r(2186),i=r(93322);try{n=r(20306)}catch(e){n=r(20306)}let{context:a,propagation:s,trace:l,SpanStatusCode:u,SpanKind:c,ROOT_CONTEXT:d}=n;class p extends Error{constructor(e,t){super(),this.bubble=e,this.result=t}}function g(e){return"object"==typeof e&&null!==e&&e instanceof p}let f=(e,t)=>{g(t)&&t.bubble?e.setAttribute("next.bubble",!0):(t&&e.recordException(t),e.setStatus({code:u.ERROR,message:null==t?void 0:t.message})),e.end()},_=new Map,h=n.createContextKey("next.rootSpanId"),m=0,S=()=>m++,v={set(e,t,r){e.push({key:t,value:r})}};class E{getTracerInstance(){return l.getTracer("next.js","0.0.1")}getContext(){return a}getTracePropagationData(){let e=a.active(),t=[];return s.inject(e,t,v),t}getActiveScopeSpan(){return l.getSpan(null==a?void 0:a.active())}withPropagatedContext(e,t,r){let n=a.active();if(l.getSpanContext(n))return t();let o=s.extract(n,e,r);return a.with(o,t)}trace(...e){var t;let[r,n,s]=e,{fn:u,options:c}="function"==typeof n?{fn:n,options:{}}:{fn:s,options:{...n}},p=c.spanName??r;if(!o.NextVanillaSpanAllowlist.includes(r)&&"1"!==process.env.NEXT_OTEL_VERBOSE||c.hideSpan)return u();let g=this.getSpanContext((null==c?void 0:c.parentSpan)??this.getActiveScopeSpan()),m=!1;g?(null==(t=l.getSpanContext(g))?void 0:t.isRemote)&&(m=!0):(g=(null==a?void 0:a.active())??d,m=!0);let v=S();return c.attributes={"next.span_name":p,"next.span_type":r,...c.attributes},a.with(g.setValue(h,v),()=>this.getTracerInstance().startActiveSpan(p,c,e=>{let t="performance"in globalThis&&"measure"in performance?globalThis.performance.now():void 0,n=()=>{_.delete(v),t&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX&&o.LogSpanAllowList.includes(r||"")&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(r.split(".").pop()||"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}`,{start:t,end:performance.now()})};m&&_.set(v,new Map(Object.entries(c.attributes??{})));try{if(u.length>1)return u(e,t=>f(e,t));let t=u(e);if((0,i.isThenable)(t))return t.then(t=>(e.end(),t)).catch(t=>{throw f(e,t),t}).finally(n);return e.end(),n(),t}catch(t){throw f(e,t),n(),t}}))}wrap(...e){let t=this,[r,n,i]=3===e.length?e:[e[0],{},e[1]];return o.NextVanillaSpanAllowlist.includes(r)||"1"===process.env.NEXT_OTEL_VERBOSE?function(){let e=n;"function"==typeof e&&"function"==typeof i&&(e=e.apply(this,arguments));let o=arguments.length-1,s=arguments[o];if("function"!=typeof s)return t.trace(r,e,()=>i.apply(this,arguments));{let n=t.getContext().bind(a.active(),s);return t.trace(r,e,(e,t)=>(arguments[o]=function(e){return null==t||t(e),n.apply(this,arguments)},i.apply(this,arguments)))}}:i}startSpan(...e){let[t,r]=e,n=this.getSpanContext((null==r?void 0:r.parentSpan)??this.getActiveScopeSpan());return this.getTracerInstance().startSpan(t,r,n)}getSpanContext(e){return e?l.setSpan(a.active(),e):void 0}getRootSpanAttributes(){let e=a.active().getValue(h);return _.get(e)}setRootSpanAttribute(e,t){let r=a.active().getValue(h),n=_.get(r);n&&n.set(e,t)}}let b=(()=>{let e=new E;return()=>e})()},73010:(e,t)=>{"use strict";function r(e,t){if(t)return e.filter(({key:e})=>t.includes(e))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getTracedMetadata",{enumerable:!0,get:function(){return r}})},63865:(e,t,r)=>{"use strict";e.exports=r(40361)},84244:(e,t,r)=>{"use strict";e.exports=r(63865).vendored.contexts.HtmlContext},15656:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cleanAmpPath:function(){return i},debounce:function(){return a},isBlockedPage:function(){return o}});let n=r(8939);function o(e){return n.BLOCKED_PAGES.includes(e)}function i(e){return e.match(/\?amp=(y|yes|true|1)/)&&(e=e.replace(/\?amp=(y|yes|true|1)&?/,"?")),e.match(/&=(y|yes|true|1)/)&&(e=e.replace(/&=(y|yes|true|1)/,"")),e=e.replace(/\?$/,"")}function a(e,t,r=1/0){let n,o,i;let s=0,l=0;function u(){let a=Date.now(),c=l+t-a;c<=0||s+r>=a?(n=void 0,e.apply(i,o)):n=setTimeout(u,c)}return function(...e){o=e,i=this,l=Date.now(),void 0===n&&(s=l,n=setTimeout(u,t))}}},20883:(e,t,r)=>{e.exports=r(70781)},99929:(e,t)=>{"use strict";t._=function(e){return e&&e.__esModule?e:{default:e}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/8842.js b/dsql-app/.local_dist/server/chunks/8842.js deleted file mode 100644 index 50bdca3..0000000 --- a/dsql-app/.local_dist/server/chunks/8842.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=8842,exports.ids=[8842],exports.modules={30469:(e,t,a)=>{a.d(t,{A:()=>o});var s=a(8732),l=a(82015),i=a.n(l),r=a(32415),n=a(83147),d=a(63715);function c({paradigm:e,payload:t,setLoading:a,table:s,database:l}){a(!0),(0,d.A)("/api/exportTableData",{method:"POST",body:{paradigm:e,dbName:l.db_slug,tableName:s.tableName,payload:t}},!0).then(t=>{if(t.success){if("export"==e){let e=new Blob([JSON.stringify(t.data||[],null,4)],{type:"application/json"}),a=URL.createObjectURL(e),i=document.createElement("a");i.href=a,i.style.display="none",i.download=`${l.db_slug}-${s.tableName}-${Date.now()}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i)}else"import"==e&&(window.alert("Data Imported Successfully"),window.location.reload())}else t.msg&&window.alert(t.msg)}).catch(e=>{console.log(e)}).finally(()=>{a(!1)})}function o({database:e,table:t}){let[a,l]=i().useState(!1),[d,o]=i().useState(!0),u=i().useRef(null);return i().useRef(null),(0,s.jsxs)("div",{className:"relative",children:[a&&(0,s.jsx)(r.A,{width:"15px"}),(0,s.jsx)("div",{className:"button outlined gray",onClick:a=>{c({paradigm:"export",database:e,setLoading:l,table:t})},children:"Export"}),(0,s.jsx)("div",{className:"button outlined gray",onClick:a=>{u.current?.addEventListener("change",a=>{l(!0);let s=a.target;if(!s.files?.[0]){window.alert("No FIles selected"),l(!1);return}n.A({inputFile:s.files[0]}).then(a=>{window.confirm(`Use this file '${a.fileName}' as your import file?`)?c({paradigm:"import",payload:a.fileBase64,database:e,setLoading:l,table:t}):l(!1),o(!1),setTimeout(()=>{o(!0)},200)})}),u.current?.click()},children:"Import"}),d&&(0,s.jsx)("input",{type:"file",name:"json_file_input",id:"json_file_input",accept:".json",className:"hidden",ref:u})]})}},29766:(e,t,a)=>{a.d(t,{A:()=>x});var s=a(8732),l=a(82015),i=a.n(l),r=a(41836),n=a(95939),d=a(43656),c=a(51548),o=a(32415),u=a(2817),m=a(63715);function p({database:e,table:t,setOpenPopover:a,dbSchemaData:l,query:r}){let[n,d]=i().useState(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{className:"ghost p-3 justify-start",onClick:()=>{d(!0),setTimeout(()=>{a&&a(!1)},200)},children:"Sync Data"}),(0,s.jsx)(u.A,{open:n,setOpen:d,children:(0,s.jsx)(h,{database:e,table:t,dbSchemaData:l,query:r})})]})}function h({database:e,table:t,query:a,dbSchemaData:l}){let[r,n]=i().useState(l),[u,p]=i().useState("Push"),[h,x]=i().useState(r?.[0]),[f,b]=i().useState(h?.tables),[g,j]=i().useState(f?.[0]),[N,y]=i().useState(!1),[w,v]=i().useState(!1);return(0,s.jsxs)("div",{className:"stack gap-2 relative w-full",children:[N||!r&&(0,s.jsx)(o.A,{width:"20px"}),(0,s.jsx)("h3",{className:"m-0 text-lg",children:"Sync Data with another table"}),w?(0,s.jsxs)("span",{className:"info green inline",children:["The selected table matches ",(0,s.jsx)("b",{children:t.tableFullName})," ","schema"]}):(0,s.jsxs)("span",{className:"info warning inline",children:["The selected table is not compatible with"," ",(0,s.jsx)("b",{children:t.tableFullName})]}),r&&(0,s.jsxs)("form",{onSubmit:s=>{!function({e,setLoading:t,database:a,table:s,query:l}){e.preventDefault(),t(!0);let i=e.target,r=i.paradigm?.value,n=i.database?.value,d=i.table?.value,c={paradigm:r,src:{db:a.db_slug,table:s.tableName},dst:{db:n,table:d},delegated:l.delegated};if(!window.confirm("Pull"==r?"NOTE: This operation will override the current database entries. Continue?":"NOTE: This operation will override the selected database entries. Continue?")){setTimeout(()=>{t(!1)},1e3);return}(0,m.A)("/api/sync-table-data",{method:"POST",body:{...c}},!0).then(e=>{e.success?(window.alert("Data Sync Successful"),window.location.reload()):e.msg&&window.alert("ERROR: "+e.msg)}).finally(()=>{setTimeout(()=>{t(!1)},1e3)})}({e:s,database:e,setLoading:y,table:t,query:a})},className:"w-full stack gap-2 items-stretch",children:[(0,s.jsxs)("div",{className:"stack gap-2 my-2",children:[(0,s.jsx)(d.A,{radioValues:[{title:"Push",payload:"Push",default:!0},{title:"Pull",payload:"Pull"}],name:"paradigm",smallText:!0,flexRow:!0,onChangeHandler:e=>{p(e.target.value)}}),(0,s.jsx)("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Push"==u?(0,s.jsxs)(s.Fragment,{children:["Sync data from the current table(",(0,s.jsx)("b",{children:t.tableFullName}),") to the selected table below"]}):(0,s.jsxs)(s.Fragment,{children:["Sync data from the selected table below to the current table(",(0,s.jsx)("b",{children:t.tableFullName}),")"]})})]}),(0,s.jsx)(c.A,{selectOptions:r.filter(t=>t.dbFullName!==e.db_full_name).map(e=>({title:e.dbName,payload:e.dbSlug})),name:"database",onChangeHandler:e=>{let t=r.find(t=>t.dbSlug==e.target.value);t&&(x(t),b(t.tables),j(t.tables?.[0]))}}),(0,s.jsx)(c.A,{selectOptions:f.map(e=>({title:e.tableFullName,payload:e.tableName})),name:"table",onChangeHandler:e=>{let t=f.find(t=>t.tableName===e.target.value);t&&j(t)}}),(0,s.jsx)("button",{className:w?"":"disabled",children:"Sync"})]})]})}function x({database:e,table:t,dbSchemaData:a,query:l}){let[d,c]=i().useState(!1);return(0,s.jsx)(r.Popover,{isOpen:d,onClickOutside:()=>c(!1),positions:["bottom"],align:"end",content:(0,s.jsxs)("div",{className:"stack items-stretch bg-white rounded shadow-md gap-0 min-w-[200px]",children:[(0,s.jsx)(p,{database:e,table:t,setOpenPopover:c,dbSchemaData:a,query:l}),(0,s.jsx)("hr",{className:"m-0"})]}),containerClassName:"z-[1000]",children:(0,s.jsx)("button",{onClick:()=>{c(!d)},className:"outlined gray px-2 py-1.5",children:(0,s.jsx)(n.A,{})})})}a(27825)},87663:(e,t,a)=>{a.a(e,async(e,s)=>{try{let h;a.d(t,{A:()=>p});var l=a(8732),i=a(82015),r=a.n(i),n=a(98842),d=a(51548),c=a(13737),o=a(63715),u=a(32415),m=e([n]);function p({data:e}){let{table:t,entries:s,activeEntries:i,setActiveEntries:m,confirmedDelegetedUser:p,database:x,targetField:f,searchTerm:b}=r().useContext(n.TableEntriesContext);a(94327),p?.delegated,p?.priviledges?.match(/Edit Tables/i),p?.priviledges?.match(/Delete Tables/i),p?.priviledges?.match(/Create Tables/i);let[g,j]=r().useState(!1),N=r().useRef(),[y,w]=r().useState(null);function v(e){if(j(!0),i&&m(null),!e?.toString().match(/./)){setTimeout(()=>{m&&m(s||[]),j(!1)},500);return}window.clearTimeout(h);let a=t?.fields.filter(e=>e.fieldName===f?.current),l=a&&a[0]&&a[0].dataType?.match(/int/i)||f?.current?.match(/^id$/)?"equal":"like";h=setTimeout(()=>{j(!1),(0,o.A)(`/api/queryEntriesSearchTerm?db=${x?.db_full_name}&table=${t?.tableName}&field=${f?.current}&term=${e}&operator=${l}`).then(e=>{"number"==typeof e.count&&w(e.count),e.success&&m&&m(e.result),j(!1)})},500)}return(0,l.jsxs)("div",{className:"w-full flex-col items-stretch",children:[(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),b?.current&&v(b.current)},className:"flex flex-row items-stretch gap-4 w-full",children:[(0,l.jsx)("div",{className:"max-w-xs",children:(0,l.jsx)(d.A,{required:!0,selectOptions:t?t.fields.map(e=>({title:e.fieldName||"",payload:e.fieldName||""})):[],name:"database_tables",onChangeHandler:e=>{f&&(f.current=e.target.value)},title:"Select Field",defaultValue:f?.current,id:"entries-search-field-select"})}),(0,l.jsx)("div",{className:"grow",children:(0,l.jsx)(c.A,{title:"Search Term",placeholder:"Enter search term that corresponds with the selected field type ...",onInputHandler:e=>{let t=e.target;t.value?.match(/./)&&b?b.current=t.value:b&&(b.current=null),v(t.value)},elementRef:N,id:"entries-search-input"})}),g&&(0,l.jsx)("div",{className:"relative items-center justify-center",children:(0,l.jsx)("div",{className:"relative mt-5 w-6",children:(0,l.jsx)(u.A,{width:"20px"})})})]}),b?.current?.match(/./)&&(0,l.jsx)("div",{className:"py-4",children:(0,l.jsxs)("span",{className:"text-lg",children:["number"==typeof y?y>0?(0,l.jsxs)("b",{children:[y," "]}):(0,l.jsx)(l.Fragment,{children:"No "}):"... ","Search result",y&&1!==y?"s":""," for"," ",(0,l.jsxs)("b",{children:['"',b.current,'"']})]})})]})}n=(m.then?(await m)():m)[0],s()}catch(e){s(e)}})},74511:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>j});var l=a(8732),i=a(82015),r=a.n(i),n=a(98842),d=a(46437),c=a(58548),o=a(94010),u=a(34486),m=a(86571),p=a(65241),h=a(59621),x=a(32415);a(63715),a(27825);var f=a(30469),b=a(29766),g=e([n,o,u,h]);function j(e){let{user:t,database:s,table:i,dbSchemaData:x,setTargetEntry:g,richTextEditors:j,jsonTextEditors:y,query:w,confirmedDelegetedUser:v,activeEntries:T,entriesCount:S,setActiveEntries:E}=r().useContext(n.TableEntriesContext),A=a(94327);return v?.delegated,v?.priviledges?.match(/Edit Tables/i),v?.priviledges?.match(/Delete Tables/i),v?.priviledges?.match(/Create Tables/i),(0,l.jsxs)(r().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{className:"flex-wrap",children:[(0,l.jsx)(d.A,{}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:(0,l.jsxs)("span",{className:"flex items-center flex-wrap gap-2",children:["All Entries In"," ",(0,l.jsxs)("span",{className:"bg-slate-100 dark:bg-slate-800 px-2 py-1 border border-solid border-slate-400 dark:border-slate-600 rounded relative",children:[i.tableFullName,(0,l.jsx)("div",{className:"absolute -top-5 -right-4",children:(0,l.jsx)(o.A,{slugText:i.tableName,justIcon:!0})})]})," ","Table"]})})]}),(0,l.jsxs)("div",{className:"w-full sm:w-auto",children:[(0,l.jsxs)("a",{href:`/admin/${t?.id}/databases/${s.db_slug}/tables/${i.tableName}/entries/add-entry`,className:"button flex items-center gap-2 w-full sm:w-auto justify-center",children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Entry"})]}),(0,l.jsx)(f.A,{database:s,table:i}),(0,l.jsx)(b.A,{database:s,table:i,dbSchemaData:x,query:w})]})]}),(0,l.jsx)(c.A,{confirmedDelegetedUser:w?.delegated,user:t})]}),s.active_clone?(0,l.jsx)(m.A,{database:s,user:t}):(0,l.jsx)(l.Fragment,{}),s.remote_connected?(0,l.jsx)(h.p,{database:s}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(p.A,{table:i,database:s,user:t}),(0,l.jsx)(u.A,{user:t,entries:T,database:s,table:i,setTargetEntry:g,dbSchemaData:x,richTextEditors:j,dataTypes:A,query:w,confirmedDelegetedUser:v,jsonTextEditors:y,search:!0}),S>20&&(0,l.jsx)(N,{activeEntries:T,setActiveEntries:E,database:s,table:i,entriesCount:S})]})}function N({activeEntries:e,setActiveEntries:t,database:a,table:s,entriesCount:i}){r().useContext(n.TableEntriesContext);let d=r().useRef(),c=r().useRef(1);return 20*Number(c.current)>=i?(0,l.jsx)(r().Fragment,{}):(0,l.jsx)("div",{className:"w-full flex items-center justify-center",ref:d,children:(0,l.jsx)(x.A,{position:"relative",style:{backgroundColor:"transparent"},width:"20px"})})}[n,o,u,h]=g.then?(await g)():g,s()}catch(e){s(e)}})},34486:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>h});var l=a(8732),i=a(82015),r=a.n(i),n=a(89579),d=a(87663),c=a(32415),o=a(30469),u=a(29766),m=a(2833),p=e([d]);function h({user:e,entries:t,database:a,table:s,setTargetEntry:i,dbSchemaData:p,richTextEditors:h,jsonTextEditors:x,dataTypes:f,title:b,confirmedDelegetedUser:g,query:j,search:N,entriesCount:y}){g?.delegated,g?.priviledges?.match(/Edit Tables/i),g?.priviledges?.match(/Delete Tables/i),g?.priviledges?.match(/Create Tables/i),g?.priviledges?.match(/Edit Entries/i),g?.priviledges?.match(/Delete Entries/i);let{active_clone:w,active_clone_parent_db:v,remote_connected:T}=a;return(0,l.jsx)(r().Fragment,{children:(0,l.jsxs)("section",{className:"paper gray gray-bg",children:[b&&(0,l.jsxs)("div",{className:"justify-between w-full flex-wrap px-4 sm:px-0 pt-4 sm:pt-0",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:b}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("a",{className:"button flex gap-2 items-center",href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries/add-entry`,children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Entry"})]}),(0,l.jsx)(o.A,{database:a,table:s}),(0,l.jsx)(u.A,{database:a,table:s,dbSchemaData:p,query:j})]})]}),N&&(0,l.jsx)(d.A,{}),(0,l.jsxs)("div",{className:"w-full flex-col gap-6",children:[t?.[0]&&t.map(t=>(0,l.jsx)(r().Fragment,{children:(0,l.jsx)(n.A,{user:e,database:a,table:s,dbSchemaData:p,richTextEditors:h,dataTypes:f,entry:t,query:j,confirmedDelegetedUser:g,jsonTextEditors:x})},t.id)),!t&&(0,l.jsx)("div",{className:"w-full h-[300px]",children:(0,l.jsx)(c.A,{position:"relative"})}),t&&!t?.[0]&&(0,l.jsxs)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries/add-entry`,className:"border-dotted border-slate-200 border-2 p-4 w-full flex-col rounded flex items-center hover:border-primary/50 gap-2",children:[(0,l.jsx)("span",{className:"text-slate-400 text-center",children:"No Entries Added Yet."}),(0,l.jsx)(m.A,{}),(0,l.jsx)("span",{className:"text-center",children:"Add an Entry to this Table"})]}),y&&y>10?(0,l.jsx)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries`,className:"button outlined gray w-full -mb-4",children:(0,l.jsx)("span",{children:"See All Entries"})}):null,t?.[0]&&b&&(0,l.jsxs)("a",{className:"button flex gap-2 items-center w-full justify-center mt-2 more-padding",href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries/add-entry`,style:{borderStyle:"dotted",borderWidth:"2px"},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Entry"})]})]})]})})}d=(p.then?(await p)():p)[0],s()}catch(e){s(e)}})},89579:(e,t,a)=>{a.d(t,{A:()=>g});var s=a(8732),l=a(82015),i=a.n(l),r=a(64030),n=a(63715),d=a(86152),c=a(39897),o=a(32415),u=a(81897),m=a(27825),p=a.n(m),h=a(63014),x=a(95939),f=a(41836);function b({user:e,table:t,entry:a,url:l,query:r}){let[n,d]=i().useState(!1),c=i().useRef(null);return(0,s.jsx)("div",{className:"relative z-[1000]",children:(0,s.jsx)(f.Popover,{isOpen:n,onClickOutside:()=>d(!1),containerClassName:"z-[1000]",positions:["bottom"],align:"end",content:(0,s.jsx)("div",{className:"bg-white dark:bg-slate-900 rounded shadow-md cancel-link",children:(0,s.jsxs)("div",{className:"flex-col min-w-[200px] items-stretch gap-0",children:[(0,s.jsx)("button",{className:"plain-text justify-start py-3",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(a)).then(()=>{window.alert("Post Copied"),d(!1)})},children:"Copy Object"}),(0,s.jsx)("hr",{className:"m-0"}),(0,s.jsx)("button",{className:"plain-text justify-start py-3",onClick:()=>{let a=(0,h.A)({paradigm:"JavaScript",table:t,query:r,user:e});navigator.clipboard.writeText(a||"").then(()=>{window.alert("JavaScript Type Definition Copied"),d(!1)})},children:"Copy JS Type Definition"}),(0,s.jsx)("hr",{className:"m-0"}),(0,s.jsx)("button",{className:"plain-text justify-start py-3",onClick:()=>{let a=(0,h.A)({paradigm:"TypeScript",table:t,query:r,user:e});navigator.clipboard.writeText(a||"").then(()=>{window.alert("TypeScript Type Definition Copied"),d(!1)})},children:"Copy TS Type Definition"}),(0,s.jsx)("hr",{className:"m-0"}),(0,s.jsx)("a",{href:l,className:"button plain-text justify-start py-3",children:(0,s.jsx)("span",{children:"View Entry"})})]})}),children:(0,s.jsx)("button",{onClick:()=>{d(!n)},ref:c,className:"ghost p-2",children:(0,s.jsx)(x.A,{})})})})}function g({user:e,database:t,table:a,dbSchemaData:l,richTextEditors:m,jsonTextEditors:h,dataTypes:x,entry:f,entryPage:g,confirmedDelegetedUser:j,query:N}){let y=a.fields.filter(e=>e.fieldName&&!e.fieldName.match(r.A)),w=a.fields.find(e=>"uuid"===e.fieldName),v=j?.delegated;j?.priviledges?.match(/Edit Tables/i),j?.priviledges?.match(/Delete Tables/i),j?.priviledges?.match(/Create Tables/i),j?.priviledges?.match(/Edit Entries/i);let T=j?.priviledges?.match(/Delete Entries/i);w&&y.unshift({dataType:"UUID",fieldName:"uuid",defaultField:!0}),y.unshift({dataType:"BIGINT",fieldName:"id",defaultField:!0}),y.push({dataType:"VARCHAR(250)",fieldName:"date_created",defaultField:!0}),y.push({dataType:"BIGINT",fieldName:"date_created_code",defaultField:!0}),y.push({dataType:"TIMESTAMP",fieldName:"date_created_timestamp",defaultField:!0}),y.push({dataType:"VARCHAR(250)",fieldName:"date_updated",defaultField:!0}),y.push({dataType:"BIGINT",fieldName:"date_updated_code",defaultField:!0}),y.push({dataType:"TIMESTAMP",fieldName:"date_updated_timestamp",defaultField:!0});let[S,E]=i().useState(!1),[A,_]=i().useState(!0),[C,F]=i().useState(f),[$,D]=i().useState(!1);i().useRef(null);let k=i().useRef([]),[R,O]=i().useState(`/admin/${e?.id}/databases/${t.db_slug}/tables/${a.tableName}/entries/${C.id}`),I=`${t.db_slug}-${a.tableName}-${C.id}-submit-button`;return(0,s.jsxs)("div",{className:"card col w-full overflow-hidden",children:[(0,s.jsx)("a",{href:R,onClick:e=>{let t=e.target;(t.closest(".cancel-link")||t.closest(".MuiPopover-root"))&&e.preventDefault()},className:"w-full",children:(0,s.jsxs)("div",{className:"w-full bg-slate-700 text-white py-2 px-4 rounded justify-between flex-wrap hover:bg-slate-800 cursor-pointer relative z-[1000] ",onClick:e=>{let t=e.target;t.closest(".cancel-link")||t.closest(".MuiPopover-root")||(e.ctrlKey?window.open(R,"__blank"):window.location.href=R)},children:[(0,s.jsxs)("span",{children:["Entry #",C.id]}),(0,s.jsxs)("div",{className:"flex-wrap cancel-link",children:[(!v||v&&T)&&(0,s.jsx)("span",{className:"text-slate-300 hover:text-fuchsia-200 cursor-pointer"+(S?" pointer-events-none opacity-40":""),onClick:e=>{window.confirm(`Delete Entry #${C.id}?`)&&(E(!0),(0,n.A)("/api/deleteTableEntry"+window.location.search,{method:"post",body:{dbFullName:t.db_full_name,tableName:a.tableName,entryId:C.id,dbSlug:t.db_slug,dbId:t.id,delegated:N?.delegated,confirmedDelegetedUser:j}},!0).then(e=>{e.success?(0,d.A)().then(()=>{window.location.reload()}):(window.alert(e.msg),setTimeout(()=>{E(!1)},500))}))},children:"Delete Entry"}),!g&&(0,s.jsxs)(i().Fragment,{children:[(0,s.jsx)("span",{className:"opacity-20",children:"|"}),(0,s.jsx)("span",{className:"text-slate-300 hover:text-fuchsia-200 cursor-pointer",onClick:e=>{A?_(!1):_(!0)},children:A?(0,s.jsx)("span",{children:"Expand"}):(0,s.jsx)("span",{children:"Collapse"})})]}),(0,s.jsx)("span",{className:"opacity-20",children:"|"}),(0,s.jsx)("div",{className:"button ghost px-0",onClick:s=>{let l=p().cloneDeep(f);delete l.date_created,delete l.date_created_code,delete l.date_created_timestamp,delete l.date_updated,delete l.date_updated_code,delete l.date_updated_timestamp,delete l.id,delete l.uuid,localStorage.setItem("duplicate_entry",JSON.stringify(l)),window.location.href=`/admin/${e?.id}/databases/${t.db_slug}/tables/${a.tableName}/entries/add-entry?duplicate=true&id=${f.id}`},children:(0,s.jsx)("span",{className:"text-slate-300",children:"Duplicate"})}),(0,s.jsx)("span",{className:"opacity-20",children:"|"}),(0,s.jsx)(b,{table:a,user:e,entry:f,query:N,url:R})]})]})}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-8 minimal-scrollbars relative",style:g?{}:{maxHeight:A?"300px":"none",paddingTop:"10px",paddingBottom:"10px",overflow:"hidden"},onSubmit:e=>{e.preventDefault(),E(!0);let s={},l=e.target;y.forEach(e=>{if(!e.fieldName||!l[e.fieldName])return;let t="string"!=typeof l[e.fieldName].value,a="number"!=typeof l[e.fieldName].value;(t||a||l[e.fieldName].value)&&(l[e.fieldName]?.dataset.default||(s[e.fieldName]=l[e.fieldName].value))}),k.current[0]&&k.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(s[e.fieldName]=e.ref.current.getContent())}),h.current[0]&&h.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(s[e.fieldName]=e.ref.current.getValue())}),(0,n.A)("/api/updateTableEntry",{method:"post",body:{dbFullName:t.db_full_name,dbSlug:t.db_slug,dbId:t.id,tableName:a.tableName,entryId:C.id,payload:s,tableSchema:a,delegated:N?.delegated,confirmedDelegetedUser:j}},!0).then(e=>{e.success?(0,n.A)("/api/refreshEntry",{method:"POST",body:{table:a.tableName,db:t.db_full_name,id:C.id,schema:JSON.stringify(a)}}).then(e=>{e.success&&(F(e.entry),setTimeout(()=>{E(!1)},500))}):(window.alert(e.msg+"\n"+(e.err||"")),setTimeout(()=>{E(!1)},500))})},onKeyUp:e=>{e.ctrlKey&&"Enter"==e.key&&window.confirm("Update this Form?")&&document.getElementById(I)?.click()},children:[S&&(0,s.jsx)(o.A,{}),(A&&!g?y.slice(0,3):y).map((e,t)=>{let a=x.filter(t=>t.name===e.dataType?.replace(/\d|\(|\)/g,""));return(0,s.jsx)(u.A,{fieldObject:e,dataTypeSchema:a[0],richTextEditors:m,currentRichTextEditorForms:k,entry:C,query:N,entryPage:g,confirmedDelegetedUser:j,jsonTextEditors:h,formButtonId:I},t+1)}),(0,s.jsx)("button",{type:"submit",className:S?" pointer-events-none opacity-40":"",id:I,children:"Update Entry"})]}),!g&&(0,s.jsx)(c.A,{collapse:A,setCollapse:_})]})}},43656:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732);function l({radioValues:e,name:t,onChangeHandler:a,setAlert:l,flexRow:i,labelColor:r,baseText:n,smallText:d,className:c}){try{return(0,s.jsx)("div",{className:"flex items-start gap-4 flex-wrap "+(i?"":" flex-col ")+(c||""),children:e.map((e,i)=>{let{payload:c,title:o,jsx:u}=e,m=!1===c?c:c||o||null;return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{className:"m-0"+(n?" w-5 h-5":d?" w-4 h-4":" w-6 h-6"),type:"radio",defaultChecked:!!e.default,name:t,id:t+"_"+m,onChange:t=>{l&&l(null),e.onChangeHandler?e.onChangeHandler(t):a&&a(t)},value:"string"==typeof m?m:void 0}),u||(0,s.jsx)("label",{htmlFor:t+"_"+m,className:"text-lg m-0 "+(r||"text-slate-800")+(n?" text-base":d?" text-sm":" text-lg"),children:o})]},i+1)})})}catch(e){return console.log("ERROR in FormRadio =>",e),(0,s.jsx)("div",{children:"Form Radio Error"})}}a(82015)},51548:(e,t,a)=>{a.d(t,{A:()=>i});var s=a(8732),l=a(58526);function i({selectOptions:e,name:t,onChangeHandler:a,required:i,setAlert:r,title:n,defaultValue:d,info:c,id:o}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[n&&(0,s.jsxs)("label",{htmlFor:t,children:[n,i?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:o||t,className:"w-full bg-white",required:i,onChange:e=>{r&&r(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:d||void 0,children:e.map((e,t)=>{let{payload:a,title:l}=e;return(0,s.jsx)("option",{value:a,selected:!!e.default,children:l},t+1)})}),(0,s.jsx)(l.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,s.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,s.jsx)("span",{children:c})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}a(82015)},95939:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},98842:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{TableEntriesContext:()=>S,default:()=>w,getServerSideProps:()=>v});var l=a(8732),i=a(82015),r=a.n(i),n=a(20048),d=a.n(n),c=a(95222),o=a(74511),u=a(64098),m=a(90378),p=a.n(m),h=a(31651),x=a.n(h),f=a(22373),b=a.n(f),g=a(67216),j=a.n(g),N=a(11169),y=e([o,u]);[o,u]=y.then?(await y)():y;let T=a(29021),S=r().createContext({});function w({user:e,database:t,table:a,dbSchemaData:s,entries:i,query:n,confirmedDelegetedUser:d,entriesCount:m}){let p=`${a.tableFullName} Table Entries | Datasquirel`,h=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:p}),(0,l.jsx)("meta",{name:"description",content:"All Entries in table"})]}),[x,f]=r().useState(null),[b,g]=r().useState(i),j=r().useRef("title"),y=r().useRef(null),w=r().useRef([]),v=r().useRef([]);return(0,l.jsx)(c.A,{head:h,user:e,extraHeaderContent:(0,l.jsx)(u.A,{database:t,query:n,confirmedDelegetedUser:d,user:e}),children:(0,l.jsxs)(S.Provider,{value:{user:e,database:t,table:a,dbSchemaData:s,entries:i,targetEntry:x,setTargetEntry:f,richTextEditors:w,jsonTextEditors:v,query:n,confirmedDelegetedUser:d,activeEntries:b,setActiveEntries:g,targetField:j,searchTerm:y,entriesCount:m},children:[(0,l.jsx)(o.A,{}),(0,l.jsx)(N.A,{snug:!0})]})})}async function v({req:e,res:t,query:a}){let s=await d()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t=a.single,l=await x()({request:e,user:s,databaseSlug:t,query:a});if(!l)throw Error("No Db Object Found!");let{dbUserId:i}=l,r=await j()(`SELECT * FROM user_databases WHERE user_id='${i}' AND db_slug='${a.single}'`);if(!r||!r[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let n=JSON.parse(T.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${i}/main.json`,"utf-8")),d=(n.filter(e=>e.dbFullName===r[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0],c=await p()({database:r[0].db_full_name,queryString:`SELECT * FROM \`${d.tableName}\` ORDER BY id DESC LIMIT 20`,tableSchema:d}),o=await p()({database:r[0].db_full_name,queryString:`SELECT COUNT(id) AS count FROM ${d.tableName}`,tableSchema:d});return{props:{user:s,database:r[0],table:d,dbSchemaData:n,entries:c,query:a,confirmedDelegetedUser:l,entriesCount:o?.[0]?.count||0}}}catch(e){return b()({component:"[single_table]/entries-page-component/getServerSideProps/catch-error",message:e.message,user:s}),{props:{user:s,database:null,table:null,entries:[]}}}}s()}catch(e){s(e)}})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/9600.js b/dsql-app/.local_dist/server/chunks/9600.js deleted file mode 100644 index 69ffbbb..0000000 --- a/dsql-app/.local_dist/server/chunks/9600.js +++ /dev/null @@ -1 +0,0 @@ -exports.id=9600,exports.ids=[9600],exports.modules={32415:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n({width:e,position:t,style:a,borderWidth:r,screen:n,title:i}){return(0,s.jsxs)("div",{className:" top-0 left-0 w-full h-full flex items-center justify-center gap-4 bg-white/80 dark:bg-slate-800/80 z-50"+(n?" fixed":" absolute"),style:{...a,position:t,zIndex:2e4},children:[(0,s.jsx)("span",{className:"general_loader",style:e?{width:e,height:e,minWidth:e,borderWidth:r||"4px"}:{}}),i?(0,s.jsx)("span",{children:i}):(0,s.jsx)(l().Fragment,{})]})}},93353:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(8732),r=a(66759);function l({size:e,adminAside:t,collapseAsideMobile:a,setCollapseAsideMobile:l}){return(0,s.jsxs)("a",{href:"/",className:"logo",onClick:e=>{let t=e.target;if(t?.closest("button"))return e.preventDefault()},children:[t&&(0,s.jsxs)("button",{className:"flex lg:hidden small-text mr-2 primary-light",onClick:e=>{a&&l?l(!1):l&&l(!0)},children:[(0,s.jsx)("div",{className:"-mt-0.5",children:(0,s.jsx)(r.A,{})}),(0,s.jsx)("span",{className:"dark:text-white",children:"Menu"})]}),(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"dark:hidden -mt-1.5 -mr-1.5"}),(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"hidden dark:flex -mt-1.5 -mr-1.5"}),(0,s.jsx)("span",{className:"text-slate-800 dark:text-white text-[20px] font-bold hidden sm:flex -mt-[1px]",children:"Datasquirel"})]})}a(82015)},87472:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n({pageTitle:e,pageDescription:t,pagePathname:a,aceEditor:r}){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+a}),(0,s.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+a}),(0,s.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+a}),(0,s.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+a}),(0,s.jsx)("meta",{property:"og:title",content:e}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{itemProp:"name",content:e}),(0,s.jsx)("meta",{itemProp:"description",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:e}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),r&&(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},34254:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n(e){let[t,a]=l().useState("Light Mode");return(0,s.jsx)("div",{className:"",id:"theme-selector-wrapper",onClick:()=>{let e=document.getElementById("theme-selector-graphic-wrapper"),t=localStorage.getItem("theme"),s=e?.querySelector("img.sun"),r=e?.querySelector("img.moon");!t||t?.match(/light/)?(document.documentElement.className="dark",localStorage.setItem("theme","dark"),t="dark",s?.classList.add("hidden"),r?.classList.remove("hidden"),e?.firstChild?.classList.add("ml-auto"),a("Dark Mode")):t?.match(/dark/)&&(document.documentElement.className="light",localStorage.setItem("theme","light"),t="light",r?.classList.add("hidden"),s?.classList.remove("hidden"),e?.firstChild?.classList.remove("ml-auto"),a("Light Mode"))},children:(0,s.jsx)("div",{className:"p-1 rounded-full w-12 transition-all",id:"theme-selector-graphic-wrapper",children:(0,s.jsxs)("div",{className:"pointer-events-none transition-all dark:ml-auto",children:[(0,s.jsx)("img",{src:"/images/sun.png",alt:"Sun Icon",width:18,className:"sun dark:hidden"}),(0,s.jsx)("img",{src:"/images/new-moon.png",alt:"Sun Icon",width:18,className:"moon hidden dark:flex"})]})})})}},63715:(e,t,a)=>{"use strict";async function s(e,t,a){let s;let r=e.match(/\?/)?e:e+window.location.search;if("string"==typeof t)try{s="post"===t?(await fetch(r,{method:t,headers:{"Content-Type":"application/json","x-csrf-auth":a?localStorage.getItem("csrf"):""}})).json():(await fetch(r)).json()}catch(e){s=null}else if("object"==typeof t)try{let e;if(t.body&&"object"==typeof t.body){let e=t.body;t.body=JSON.stringify(e)}if(t.headers){t.headers["x-csrf-auth"]=a?localStorage.getItem("csrf"):"";let s={...t};e=await fetch(r,s)}else e=await fetch(r,{...t,headers:{"Content-Type":"application/json","x-csrf-auth":a?localStorage.getItem("csrf"):""}});s=e.json()}catch(e){s=null}else try{s=(await fetch(r)).json()}catch(e){s=null}return s}a.d(t,{A:()=>s})},54896:(e,t,a)=>{"use strict";async function s({links:e}){let t=e||document.querySelectorAll("nav a");if(t&&t.forEach(e=>{e.dataset.currentlink===window.location.pathname?e.classList.add("active"):window.location.pathname.match(RegExp(`${e.dataset.currentlink}\\/.*`))&&!e.dataset.strictlink&&e.classList.add("active")}),window.location.pathname.match(/\/databases\/.*/)){let e=document.querySelectorAll("a");e&&window.location.search.match(/delegated=true/)&&e.forEach((e,t)=>{e?.pathname?.match(/databases/)&&(e.href=e.pathname+window.location.search)})}}a.d(t,{A:()=>s})},71457:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var s=a(8732),r=a(82015),l=a.n(r),n=a(27912),i=a.n(n);a(54896);var c=a(20681),o=a(64699);function d(e){return(0,s.jsx)(l().Fragment,{})}var m=a(11169);function h({children:e,head:t,user:a,productionEnvironment:r,darkBgHeader:n,transparentHeader:h}){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)(i(),{children:t}),(0,s.jsx)(d,{head:t,productionEnvironment:r}),(0,s.jsx)(c.A,{user:a,darkBg:n,transparent:h}),e,(0,s.jsx)(o.A,{}),(0,s.jsx)(m.A,{})]})}},49538:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var s=a(8732),r=a(82015),l=a.n(r),n=a(32415),i=a(52070);function c({user:e}){return(0,s.jsxs)("div",{className:"dropdown right-aligned",children:[(0,s.jsxs)("a",{href:"/admin",className:"button outlined gray more-padding relative z-20 mb-2",children:[(0,s.jsx)(i.A,{size:18,className:"mr-1"}),(0,s.jsx)("span",{children:"Dashboard"})]}),null,(0,s.jsx)("a",{href:`/admin/${e?.id}/settings`,className:"button plain-text more-padding normal-weight",children:"Settings"}),(0,s.jsx)("a",{href:"/logout",className:"button plain-text more-padding normal-weight",children:"Logout"})]})}var o=a(34254),d=a(58526);function m({activeUser:e,noModeSelector:t}){return e?.logged_in_status?(0,s.jsxs)("div",{className:"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2 whitespace-nowrap",children:[(0,s.jsxs)("div",{className:"ml-auto dropdown-wrapper p-0 xl:p-4 hover:bg-slate-100 hidden",children:[(0,s.jsx)("a",{href:`/admin/${e?.id}/notifications`,className:"flex items-center justify-center",children:(0,s.jsx)("img",{src:"/images/notification-icon.svg",alt:"Notification Icon",width:20,className:"opacity-50"})}),(0,s.jsxs)("div",{className:"dropdown mt-0 xl:-mt-3 gap-2",children:[(0,s.jsx)("span",{className:"text-slate-400",children:"Notifications"}),(0,s.jsx)(n.A,{position:"relative",width:"20px"})]})]}),(0,s.jsxs)("div",{className:"ml-auto dropdown-wrapper",children:[(0,s.jsxs)("div",{className:"avatar",style:{width:"36px",height:"36px"},children:[(0,s.jsx)("img",{src:e?.image,alt:"User Image",width:35,className:"w-full h-full object-cover rounded-full"}),e?.social_login?(0,s.jsxs)("div",{className:"sub-img",children:[(0,s.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github.png":"/images/sharing.png",alt:"",className:"flex dark:hidden"}),(0,s.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github-white.png":"/images/sharing.png",alt:"",className:"hidden dark:flex"})]}):(0,s.jsx)(l().Fragment,{})]}),(0,s.jsx)("span",{className:"dark:text-white",children:(0,s.jsxs)("b",{children:[e?.first_name," ",e?.last_name]})}),(0,s.jsx)(d.A,{size:20}),(0,s.jsx)(c,{user:e})]}),!t&&(0,s.jsx)("div",{className:"ml-2",children:(0,s.jsx)(o.A,{})})]}):(0,s.jsx)(l().Fragment,{})}},64699:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(8732);a(82015);var r=a(93353);function l(e){return(0,s.jsxs)("footer",{className:"p-8 md:p-10 w-full flex flex-col items-center",children:[(0,s.jsxs)("div",{className:"main-container items-start justify-between gap-6 flex-wrap flex-col md:flex-row pt-6",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-6",children:[(0,s.jsx)(r.A,{}),(0,s.jsx)("span",{className:"font-normal max-w-sm text-sm text-left",children:"Datasquirel is a fast efficient cloud-based data store that takes away the entire hassle of data management."})]}),(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("h4",{className:"m-0",children:"Features"}),(0,s.jsx)("a",{href:"/docs/database-reference/data-types",className:"text-slate-600",children:"Database Schema"}),(0,s.jsx)("a",{href:"/docs/database-reference/querying-data",className:"text-slate-600",children:"SQL Queries"}),(0,s.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"text-slate-600",children:"Media Storage"})]}),(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("h4",{className:"m-0",children:"Docs"}),(0,s.jsx)("a",{href:"/docs/quick-start",className:"text-slate-600",children:"Quick Start Guide"}),(0,s.jsx)("a",{href:"/docs/api-reference",className:"text-slate-600",children:"API Guide"}),(0,s.jsx)("a",{href:"/docs/gui-reference",className:"text-slate-600",children:"GUI Interface"})]}),(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("h4",{className:"m-0",children:"Company"}),(0,s.jsx)("a",{href:"/about",className:"text-slate-600",children:"About Us"}),(0,s.jsx)("a",{href:"/terms",className:"text-slate-600",children:"Terms and Conditions"}),(0,s.jsx)("a",{href:"/privacy",className:"text-slate-600",children:"Privacy Policy"})]})]}),(0,s.jsx)("hr",{className:"my-10"}),(0,s.jsx)("div",{className:"container",children:(0,s.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]})})]})}},20681:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var s=a(8732),r=a(82015),l=a.n(r),n=a(34254),i=a(93353),c=a(49538),o=a(58526);function d({user:e,darkBg:t,transparent:a}){let[r,d]=l().useState(e?.logged_in_status?e:null);return(0,s.jsx)("header",{className:"w-full px-4 md:px-8 flex justify-center gap-4 "+(t?" shadow-slate-900/20 dark-content":" shadow-slate-900/5")+(a?"":" bg-white dark:bg-slate-800 shadow-lg dark:shadow-black/10 z-50")+(e?.logged_in_status?" py-4":" py-6"),style:{zIndex:700},children:(0,s.jsx)("div",{className:"container",children:(0,s.jsxs)("nav",{className:"w-full flex items-center justify-between gap-4 md:gap-10",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 p-4 xl:p-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto xl:bg-transparent"+(a?" bg-white xl:bg-transparent":" bg-white dark:bg-slate-800"),id:"main-nav-content-wrapper",children:[(0,s.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,s.jsx)("a",{href:"/",children:(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,s.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let t=document.getElementById("main-nav-content-wrapper");t?.classList.toggle("hidden")},style:{border:"none"},children:(0,s.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,s.jsxs)("div",{className:"flex items-center grow flex-col-reverse xl:flex-row mb-10 xl:mb-0",children:[(0,s.jsxs)("div",{className:"flex-col xl:flex-row w-full gap-y-10 gap-x-6",children:[(0,s.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,s.jsxs)("a",{href:"/docs/gui-reference",className:"relative z-10 flex items-center gap-2",children:[(0,s.jsx)("span",{children:"Features"}),(0,s.jsx)(o.A,{size:20})]}),(0,s.jsxs)("div",{className:"dropdown",children:[(0,s.jsx)("a",{href:"/docs/database-reference/data-types",className:"button plain-text more-padding normal-weight",children:"Database Schema"}),(0,s.jsx)("a",{href:"/docs/database-reference/querying-data",className:"button plain-text more-padding normal-weight",children:"Sql Queries"}),(0,s.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"button plain-text more-padding normal-weight",children:"Media Storage"})]})]}),(0,s.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,s.jsxs)("a",{href:"/docs",className:"relative z-10 flex items-center gap-2",children:[(0,s.jsx)("span",{children:"Docs"}),(0,s.jsx)(o.A,{size:20})]}),(0,s.jsxs)("div",{className:"dropdown",children:[(0,s.jsx)("a",{href:"/docs/quick-start",className:"button plain-text more-padding normal-weight",children:"Quick Start"}),(0,s.jsx)("a",{href:"/docs/api-reference",className:"button plain-text more-padding normal-weight",children:"Api Guide"}),(0,s.jsx)("a",{href:"/docs/gui-reference",className:"button plain-text more-padding normal-weight",children:"GUI Interface"})]})]}),(0,s.jsx)("a",{href:"/about",children:"About Us"}),(0,s.jsx)("a",{href:"/contact",children:"Contact Us"})]}),r?.logged_in_status?(0,s.jsx)(c.A,{activeUser:r,noModeSelector:!0}):(0,s.jsxs)("div",{className:"ml-auto w-full xl:w-auto justify-center",children:[(0,s.jsx)("a",{href:"/login",className:"button outlined gray hidden xl:flex"+(t?" light":""),children:"Login"}),(0,s.jsx)("a",{href:"/login",className:"button outlined gray flex xl:hidden",children:"Login"}),(0,s.jsx)("a",{href:"/create-account",className:"button",children:"Get Started"})]})]})]}),(0,s.jsx)("div",{className:"ml-0 xl:-ml-2",children:(0,s.jsx)(n.A,{})}),(0,s.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all",onClick:e=>{let t=document.getElementById("main-nav-content-wrapper");t?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,s.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,s.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,s.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})})}},11169:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var s=a(8732),r=a(58591),l=a(82015),n=a.n(l);function i({snug:e}){let[t,a]=n().useState(!1);return(0,s.jsx)(n().Fragment,{children:t&&(0,s.jsx)("button",{className:"fixed z-40 w-12 h-12 p-2 rounded-full bg-white dark:bg-slate-600 shadow-xl flex items-center justify-center hover:bg-slate-800 dark:hover:bg-slate-800 text-slate-500 dark:text-slate-200 outline-slate-300 dark:outline-transparent"+(e?" bottom-6 right-4":" bottom-4 md:bottom-10 right-4 md:right-10"),style:{outlineStyle:"solid",outlineWidth:"1px",zIndex:2e3},onClick:e=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},children:(0,s.jsx)(r.A,{size:20})})})}},89600:(e,t,a)=>{"use strict";a.r(t),a.d(t,{AppContext:()=>g,default:()=>u});var s=a(8732),r=a(82015),l=a.n(r),n=a(28133),i=a.n(n),c=a(27912),o=a.n(c);a(79061),a(44422);var d=a(63715),m=a(71457),h=a(87472);class x extends l().Component{constructor(e){super(e),this.state={hasError:!1};let t="Error | Datasquirel",a="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",r=(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)("title",{children:t}),(0,s.jsx)("meta",{name:"description",content:a}),(0,s.jsx)(h.A,{pageTitle:t,pageDescription:a,pagePathname:"/"})]});this.state.head=r}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){(0,d.A)("/api/admin/clientError",{method:"post",body:{component:"ErrorBoundary-class-component",message:e.message+" ==== Error Info => "+t,user:{}}})}render(){return this.state.hasError?(0,s.jsx)(m.A,{head:this.state.head,user:null,children:(0,s.jsxs)("div",{className:"paper items-center px-20",children:[(0,s.jsx)("h2",{className:"text-base text-slate-400 m-0",children:"Application Error!"}),(0,s.jsx)("h1",{className:"text-2xl m-0 mb-4",children:"Please try again!"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("a",{href:"/",className:"button outlined",children:"Home"}),(0,s.jsx)("button",{onClick:e=>{window.history.back()},children:"Go Back"})]})]})}):this.props.children}}let g=l().createContext({pageProps:{}});function u({Component:e,pageProps:t}){return(0,s.jsxs)(g.Provider,{value:{pageProps:t},children:[(0,s.jsx)(o(),{children:(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),(0,s.jsx)(x,{children:(0,s.jsx)(e,{...t})}),(0,s.jsx)(i(),{src:"/scripts/main.js",strategy:"afterInteractive"})]})}},79061:()=>{},44422:()=>{}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/9621.js b/dsql-app/.local_dist/server/chunks/9621.js deleted file mode 100644 index 5465ee3..0000000 --- a/dsql-app/.local_dist/server/chunks/9621.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=9621,exports.ids=[9621],exports.modules={59621:(e,a,s)=>{s.a(e,async(e,l)=>{try{s.d(a,{A:()=>o,p:()=>u});var t=s(8732),i=s(82015),n=s.n(i),r=s(48241),c=s(86571),d=e([r]);function o({database:e,tables:a,setTargetTable:s,confirmedDelegetedUser:l,query:i,user:d}){return l?.delegated,l?.priviledges?.match(/Edit Tables/i),l?.priviledges?.match(/Delete Tables/i),l?.priviledges?.match(/Create Tables/i),(0,t.jsxs)(n().Fragment,{children:[e.active_clone&&d?(0,t.jsx)(c.A,{database:e,user:d}):(0,t.jsx)(t.Fragment,{}),e.remote_connected?(0,t.jsx)(u,{database:e}):(0,t.jsx)(t.Fragment,{}),(0,t.jsxs)("section",{className:"paper gray",children:[a&&a[0]?(0,t.jsxs)("div",{className:"flex-wrap gap-4 justify-between w-full",children:[(0,t.jsx)("h2",{className:"text-xl m-0",children:"Tables"}),(0,t.jsx)("a",{href:`/admin/${d?.id}/databases/${e.db_slug}/tables`,className:"button outlined gray small-text",children:"See All Tables"})]}):(0,t.jsx)("h2",{className:"text-xl m-0",children:"This Database is empty"}),(0,t.jsx)("hr",{}),d?(0,t.jsx)(r.A,{database:e,tables:a,setTargetTable:s,confirmedDelegetedUser:l,query:i,user:d}):null]})]})}function u({database:e}){return(0,t.jsx)("div",{className:"info green",children:(0,t.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,t.jsx)("b",{children:e.remote_db_full_name?.replace(/datasquirel_user_\d+_/,"")})," ","on"," ",(0,t.jsx)("a",{className:"font-bold text-inherit",href:e.remote_connection_host,target:"_blank",children:e.remote_connection_host})," ","Host"]})})}r=(d.then?(await d)():d)[0],l()}catch(e){l(e)}})},6258:(e,a,s)=>{s.d(a,{A:()=>o});var l=s(8732),t=s(82015),i=s.n(t),n=s(63715),r=s(83147),c=s(32415),d=s(2459);function o({database:e}){let a=i().useRef(),[s,t]=i().useState(!1);return(0,l.jsxs)(i().Fragment,{children:[(0,l.jsx)("input",{type:"file",name:"sql-file-input",id:"sql-file-input",accept:".sql",className:"hidden",ref:a}),(0,l.jsxs)("button",{className:"flex-col normal-weight outlined gray dashed w-full p-8 relative",onClick:s=>{a.current?.addEventListener("change",a=>{let s=a.target;if(!s.files?.[0]){window.alert("No FIles selected");return}r.A({inputFile:s.files[0]}).then(a=>{window.confirm(`Use this file '${a.fileName}' as your import file?`)&&(t(!0),n.A("/api/importDatabase",{method:"post",body:{database:e,fileBase64:a.fileBase64}},!0).then(e=>{e.success?window.location.reload():window.alert("Import Failed!"),setTimeout(()=>{t(!1)},1e3)}))})}),a.current?.click()},children:[s&&(0,l.jsx)(c.A,{}),(0,l.jsx)("span",{className:"text-slate-400",children:"Do you have an SQL file already?"}),(0,l.jsx)(d.A,{}),(0,l.jsx)("span",{className:"",children:"Import Database"})]})]})}},39615:(e,a,s)=>{s.d(a,{A:()=>o});var l=s(8732),t=s(82015),i=s.n(t),n=s(63715),r=s(83147),c=s(32415),d=s(38552);function o({database:e}){let a=i().useRef(),[s,t]=i().useState(!1);return(0,l.jsxs)(i().Fragment,{children:[(0,l.jsx)("input",{type:"file",name:"json_file_input",id:"json_file_input",accept:".json",className:"hidden",ref:a}),(0,l.jsxs)("button",{className:"flex-col normal-weight outlined gray dashed w-full p-8 relative",onClick:s=>{a.current?.addEventListener("change",a=>{let s=a.target;if(!s.files?.[0]){window.alert("No FIles selected");return}r.A({inputFile:s.files[0]}).then(a=>{window.confirm(`Use this file '${a.fileName}' as your import file?`)&&(t(!0),n.A("/api/importDatabaseSchema",{method:"post",body:{database:e,fileBase64:a.fileBase64}},!0).then(e=>{e.success?window.location.reload():window.alert("Import Failed!"),setTimeout(()=>{t(!1)},1e3)}))})}),a.current?.click()},children:[s&&(0,l.jsx)(c.A,{}),(0,l.jsx)("span",{className:"text-slate-400",children:"Do you have a JSON schema?"}),(0,l.jsx)(d.A,{}),(0,l.jsx)("span",{className:"",children:"Import JSON schema"})]})]})}},15510:(e,a,s)=>{s.a(e,async(e,l)=>{try{s.d(a,{A:()=>h});var t=s(8732),i=s(82015),n=s.n(i),r=s(94010),c=s(55158),d=s(62506),o=s(93213),u=s(6070),m=e([r]);function h({table:e,setTargetTable:a,database:s,confirmedDelegetedUser:l,query:i,icons:m,user:h}){let p=l?.delegated,x=l?.priviledges?.match(/Edit Tables/i),f=l?.priviledges?.match(/Delete Tables/i);l?.priviledges?.match(/Create Table/i);let{active_clone:b,active_clone_parent_db:j,remote_connected:g}=s;return(0,t.jsxs)("a",{href:`/admin/${h?.id}/databases/${s.db_slug}/tables/${e.table_slug}`,className:"card w-full items-center justify-between py-4"+(e?.child_table?" green":""),onClick:e=>{e.target.closest(".db-list-item-actions-block")&&e.preventDefault()},children:[(0,t.jsxs)("div",{className:"flex-wrap items-center flex",children:[(0,t.jsx)(o.A,{size:20,opacity:.3}),(0,t.jsx)("span",{className:"title",style:{fontSize:"16px"},children:e.table_name}),(0,t.jsxs)("span",{className:"text-sm text-slate-400",children:["Created: ",e.date_created?.substring(0,21)]})]}),(0,t.jsxs)("div",{className:"flex-wrap",children:[(0,t.jsx)("div",{className:"db-list-item-actions-block flex-wrap",children:(0,t.jsxs)(d.A,{children:[(0,t.jsx)(r.A,{slugText:e.table_slug||"",outlined:!0}),(!p||p&&x)&&!j&&!g&&(0,t.jsx)(n().Fragment,{children:(0,t.jsx)("div",{className:"button outlined light-gray small-text",onClick:a=>{window.location.pathname=`/admin/${h?.id}/databases/${s.db_slug}/tables/${e.table_slug}/edit-table`},children:(0,t.jsx)("span",{children:"Edit"})})}),!j&&!e.child_table&&(0,t.jsx)("div",{className:"button outlined light-gray small-text",onClick:a=>{window.location.href=`/admin/${h?.id}/databases/${s.db_slug}/tables/add-table?clone=true&clone_db=${s.db_slug}&clone_table=${e.table_slug}`},children:(0,t.jsx)("span",{children:"Clone"})}),(!p||p&&f)&&!j&&!g&&(0,t.jsx)("div",{className:"button outlined light-gray small-text",onClick:s=>{a(e),(0,c.PB)("delete-table-confirmation")},children:(0,t.jsx)("span",{children:"Delete"})})]})}),(0,t.jsx)(u.A,{className:"text-slate-600",size:20})]})]})}r=(m.then?(await m)():m)[0],l()}catch(e){l(e)}})},48241:(e,a,s)=>{s.a(e,async(e,l)=>{try{s.d(a,{A:()=>f});var t=s(8732),i=s(82015),n=s.n(i),r=s(15510),c=s(6258),d=s(39615),o=s(11717),u=s(62338),m=s(46512),h=s(96089),p=s(2833),x=e([r]);function f({database:e,tables:a,setTargetTable:s,confirmedDelegetedUser:l,query:i,user:x}){let f=l?.delegated;l?.priviledges?.match(/Edit Tables/i),l?.priviledges?.match(/Delete Tables/i);let b=l?.priviledges?.match(/Create Table/i),j=(!a||!a[0])&&!f||(!a||!a[0])&&!!f&&!!b,{active_clone:g,active_clone_parent_db:N,remote_connected:y}=e;return(0,t.jsx)(n().Fragment,{children:(0,t.jsxs)("div",{className:"w-full flex-col",children:[a&&a[0]&&a.map(a=>(0,t.jsx)(r.A,{table:a,setTargetTable:s,database:e,confirmedDelegetedUser:l,query:i,icons:{edit:(0,t.jsx)(o.A,{}),duplicate:(0,t.jsx)(u.A,{}),delete:(0,t.jsx)(m.A,{}),copy:(0,t.jsx)(h.A,{})},user:x},a.id)),j&&!N&&!y&&(0,t.jsx)(n().Fragment,{children:(0,t.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 items-stretch gap-6",children:[(0,t.jsxs)("a",{href:`/admin/${x?.id}/databases/${e.db_slug}/tables/add-table`,className:"button flex-col normal-weight outlined gray dashed border-dotted w-full p-8",children:[(0,t.jsx)("span",{className:"text-slate-400",children:"No Tables Created."}),(0,t.jsx)(p.A,{}),(0,t.jsx)("span",{className:"",children:"Add Table"})]}),(0,t.jsx)(c.A,{database:e}),(0,t.jsx)(d.A,{database:e})]})}),(!a||!a[0])&&f&&(0,t.jsx)("span",{className:"text-sm bg-slate-100 px-3 py-2 rounded w-full flex items-center justify-center text-slate-400",children:"Tables will show here once the owner of the database adds one"})]})})}r=(x.then?(await x)():x)[0],l()}catch(e){l(e)}})},86571:(e,a,s)=>{s.d(a,{A:()=>t});var l=s(8732);function t({database:e,user:a}){let s=e.active_clone_parent_db?.replace(/datasquirel_user_\d+_/,""),t=`/admin/${a?.id}/databases/${s}`;return(0,l.jsx)("div",{className:"info green",children:(0,l.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:t,target:"_blank",className:"query-url",children:s})})]})})}s(82015)},55158:(e,a,s)=>{s.d(a,{Ay:()=>r,PB:()=>c,fs:()=>d});var l=s(8732),t=s(58150),i=s(82015),n=s.n(i);function r({children:e,title:a,data:s,fullPage:i,wrapperClasses:r,closePopupDispatch:c,wrapperStyle:o,noContainer:u}){return i?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(r||""),"data-popupid":a||null,style:o,children:[u?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":s?JSON.stringify(s):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{d(),c&&c()},children:(0,l.jsx)(t.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[u?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":s?JSON.stringify(s):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]})}function c(e,a){let s=document.querySelector(`[data-popupid='${e}']`);s&&(s.style.display="flex",a&&a(s))}function d(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},62506:(e,a,s)=>{s.d(a,{A:()=>n});var l=s(8732),t=s(82015),i=s.n(t);function n({children:e,column:a,className:s}){let t=i().useRef();return(0,l.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:t,children:e})}},83147:(e,a,s)=>{s.d(a,{A:()=>l});async function l({inputFile:e}){try{let a=e.name.replace(/\..*/,""),s=await new Promise((a,s)=>{var l=new FileReader;l.readAsDataURL(e),l.onload=function(){a(l.result)},l.onerror=function(e){console.log("Error: ",e.message)}});return{fileBase64:s.replace(/.*?base64,/,""),fileBase64Full:s,fileName:a,fileSize:e.size,fileType:e.type}}catch(a){return console.log("Image Processing Error! =>",a.message),{fileBase64:null,fileBase64Full:null,fileName:e.name,fileSize:null,fileType:null}}}}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/9732.js b/dsql-app/.local_dist/server/chunks/9732.js deleted file mode 100644 index 74835cc..0000000 --- a/dsql-app/.local_dist/server/chunks/9732.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";exports.id=9732,exports.ids=[9732],exports.modules={81897:(e,t,a)=>{a.d(t,{A:()=>S});var l=a(8732),r=a(82015),s=a.n(r),d=a(32415),n=a(40373),i=a(1976),o=a.n(i);function c({editor:e,rootElement:t}){return(0,l.jsx)("div",{className:"embed-popup-form-content-wrapper text-sm mt-2 flex-wrap bg-white p-10 rounded max-w-2xl w-full",children:(0,l.jsxs)("form",{onSubmit:a=>{a.preventDefault();let l=a.target["embed-text-area"].value;if(!l?.match(/./))return alert("Please Enter HTML Text to continue.");e.insertContent(l),document.body.removeChild(t)},className:"w-full flex flex-col items-stretch gap-2",children:[(0,l.jsx)("h3",{className:"m-0 text-center text-lg",children:"Enter HTML code"}),(0,l.jsx)("textarea",{name:"embed-text-area",id:"embed-text-area",cols:30,rows:10,placeholder:"Paste Code here ..."}),(0,l.jsx)("button",{type:"submit",children:"Embed"})]})})}function u({editor:e}){navigator.clipboard.writeText(e?.getContent()||"").then(()=>{alert("Html Copied to Clipboard!")})}var m=a(58150);function p({editor:e,rootElement:t}){e.getContent();let a=s().useRef(),r=s().useRef(),[d,n]=s().useState(null);return(0,l.jsxs)("div",{onKeyUp:e=>{e.ctrlKey&&"Enter"==e.key&&r.current?.click()},children:[(0,l.jsx)("div",{className:"embed-popup-form-content-wrapper relative flex flex-col items-center justify-center",children:(0,l.jsxs)("div",{className:"max-w-[1200px] rounded-md overflow-hidden bg-white w-[90vw] items-start justify-start relative",children:[(0,l.jsx)("div",{ref:a,className:"w-full h-[80vh] text-[18px]"}),(0,l.jsx)("button",{className:"absolute bottom-4 right-4",onClick:a=>{if(d){let a=d.getValue();e.setContent(a),setTimeout(()=>{document.body.removeChild(t)},200)}},ref:r,children:"Save"})]})}),(0,l.jsx)("button",{className:"absolute top-4 right-8 rounded-full white",onClick:()=>{try{document.body.removeChild(t)}catch(e){}},style:{width:"40px",height:"40px",padding:"0",zIndex:"12039800000"},children:(0,l.jsx)(m.A,{})})]})}function f({editor:e}){let t=document.createElement("div");t.style.position="fixed",t.style.width="100vw",t.style.height="100vh",t.style.zIndex="123000000000000000",t.style.backgroundColor="rgba(0,0,0,0.8)",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.top="0",t.style.left="0",document.body.append(t),t.onclick=e=>{e.target.closest(".embed-popup-form-content-wrapper")||document.body.removeChild(t)},e&&o().createRoot(t).render((0,l.jsx)(p,{editor:e,rootElement:t}))}function x({editor:e}){let t=document.createElement("div");t.style.position="fixed",t.style.width="100vw",t.style.height="100vh",t.style.zIndex="123000000000000000",t.style.backgroundColor="rgba(0,0,0,0.8)",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.top="0",t.style.left="0",document.body.append(t),t.onclick=e=>{if(e.target.closest(".embed-popup-form-content-wrapper")){console.log("Still In Form");return}document.body.removeChild(t)},e&&o().createRoot(t).render((0,l.jsx)(c,{editor:e,rootElement:t}))}a(90317);var h=a(17855);function y({fieldObject:e,dataTypeSchema:t,richTextEditors:a,entry:r,currentRichTextEditorForms:i,entryPage:o,formButtonId:c}){let[m,p]=s().useState(!1),y=s().useRef(),b=s().useRef();return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0 w-full rich-text-editor-wrapper",children:[(0,l.jsxs)("label",{className:"font-bold text-slate-700 dark:text-slate-300 text-base px-3 py-1 bg-slate-100 dark:bg-slate-700 rounded-t-md border border-solid border-slate-300 dark:border-slate-300/20 flex items-center gap-2",htmlFor:e.fieldName,children:[e.encrypted&&(0,l.jsx)(h.A,{}),(0,l.jsx)("span",{children:e.fieldName})]}),(0,l.jsxs)("div",{ref:y,id:e.fieldName,className:"w-full p-0 sm:p-4 flex-col items-stretch bg-slate-100 relative dark:bg-slate-700 border border-solid border-slate-300 dark:border-slate-300/20",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},children:[!m&&(0,l.jsx)(d.A,{}),m&&(0,l.jsx)(s().Fragment,{children:(0,l.jsx)(n.Editor,{tinymceScriptSrc:"/tinymce/tinymce.min.js",onInit:(e,t)=>{b.current=t},initialValue:e.defaultValue||(r&&e.fieldName&&r[e.fieldName]?r[e.fieldName]:""),init:{height:o?400:300,width:"100%",convert_urls:!1,menubar:!1,plugins:["advlist","lists","link","image","charmap","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","preview","help","wordcount"],toolbar:"undo redo | blocks | bold italic forecolor | link image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat help | editCode embedCode copyCode",placeholder:"Type something ...",document_base_url:"/",content_css:e.cssFiles||void 0,setup:e=>{!function({editor:e,formButtonId:t}){e.addShortcut("meta+13","Save Entry.",()=>{window.confirm("Update this Form?")&&t&&document.getElementById(t)?.click()}),e.addShortcut("meta+shift+e","Edit Code.",()=>{f({editor:e})}),e.addShortcut("meta+shift+d","Embed Code.",()=>{x({editor:e})}),e.addShortcut("meta+shift+c","Copy Code.",()=>{u({editor:e})}),e.ui.registry.addButton("editCode",{icon:"edit-block",onAction:t=>f({editor:e}),tooltip:"Edit HTML Code"}),e.ui.registry.addButton("embedCode",{icon:"sourcecode",onAction:t=>x({editor:e}),tooltip:"Embed Code"}),e.ui.registry.addButton("copyCode",{icon:"copy",onAction:t=>u({editor:e}),tooltip:"Copy HTML"})}({editor:e,formButtonId:c})}}})})]})]})}a(63715),a(84759);var b=a(82544);let g=(0,b.A)("CircleMinus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),N=(0,b.A)("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);function v({fieldObject:e,typeFinal:t,isExpanded:a,setHeight:r,COLLAPSED_HEIGHT:s,EXPANDED_HEIGHT:d}){return(0,l.jsxs)("div",{className:"gap-2 w-full",children:[(0,l.jsxs)("label",{className:"font-bold text-slate-700 dark:text-slate-300 text-base px-3 py-1 bg-slate-100 dark:bg-slate-700 rounded-t-md border border-solid border-slate-300 dark:border-slate-300/20 flex items-center gap-2",htmlFor:e.fieldName,children:[e.encrypted&&(0,l.jsx)(h.A,{}),(0,l.jsx)("span",{children:e.fieldName})]}),(0,l.jsx)("div",{className:"px-4 py-1 bg-secondary text-white rounded-full text-sm font-bold -mt-2",children:(0,l.jsx)("span",{children:t})}),(0,l.jsxs)("div",{className:"ml-auto cursor-pointer gap-1 text-slate-400 hover:text-slate-800 -mt-2 items-center flex",onClick:e=>{a?r(s):r(d)},children:[(0,l.jsx)("span",{className:"font-semibold text-sm",children:a?"Collapse":"Expand"}),a?(0,l.jsx)(g,{size:18,className:"mt-[-1px]"}):(0,l.jsx)(N,{size:18,className:"mt-[-1px]"})]})]})}function j({fieldObject:e,dataTypeSchema:t,entry:a,entryPage:r,jsonTextEditors:d,type:n}){try{let[t,a]=s().useState(0),[r,d]=s().useState(300),i=s().useRef();return s().useRef(),(0,l.jsx)(s().Fragment,{children:(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0 w-full rich-text-editor-wrapper",children:[(0,l.jsx)(v,{fieldObject:e,isExpanded:300!==r,setHeight:d,typeFinal:n||"json",COLLAPSED_HEIGHT:300,EXPANDED_HEIGHT:600}),(0,l.jsx)(_,{height:r,jsonEditorRef:i})]})})}catch(e){return(0,l.jsx)(s().Fragment,{children:(0,l.jsx)("span",{children:"Editor Load Error"})})}}function _({height:e,jsonEditorRef:t}){return(0,l.jsx)("div",{className:"w-full p-0 sm:p-4 flex-col relative dark:bg-slate-700 border border-solid border-slate-300 dark:border-slate-300/20 overflow-hidden",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px",height:`${e}px`},children:(0,l.jsx)("div",{ref:t,className:"w-full text-[18px] h-full"})})}function S({fieldObject:e,dataTypeSchema:t,richTextEditors:a,jsonTextEditors:r,entry:d,currentRichTextEditorForms:n,confirmedDelegetedUser:i,query:o,entryPage:c,formButtonId:u}){i?.delegated,i?.priviledges?.match(/Edit Tables/i),i?.priviledges?.match(/Delete Tables/i),i?.priviledges?.match(/Create Tables/i),i?.priviledges?.match(/Edit Entries/i),i?.priviledges?.match(/Delete Entries/i);let m=function({fieldObject:e,dataTypeSchema:t,elementRef:a,entry:r}){let s;let d=e=>{let t=e.target.closest("form");if(!t)return;let a=t?.querySelector("#slug");a&&(a.value=e.target.value.toLowerCase().replace(/ /g,"-").replace(/[^a-z\-0-9]/g,""))};return e.defaultField?s=(0,l.jsx)("input",{ref:a,type:"text",name:"def_field_"+e.fieldName,id:"def_field_"+e.fieldName,placeholder:e.fieldName,defaultValue:r&&r[e.fieldName||""]?r[e.fieldName||""]:e.defaultValue?e.defaultValue:"",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},readOnly:!0,"data-default":"true"}):(e.dataType?.match(/varchar/i)&&(s=(0,l.jsx)("textarea",{ref:a,name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,maxLength:e.dataType?.match(/\d+/)?.[0]?parseInt(e.dataType?.match(/\d+/)?.[0]||""):void 0,defaultValue:r&&r[e.fieldName||""]?r[e.fieldName||""]:e.defaultValue?e.defaultValue:"",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},onChange:t=>{e.fieldName?.match(/^title$/)&&d(t)}})),e.dataType?.match(/int$/i)&&(s=(0,l.jsx)("input",{ref:a,type:"number",name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,max:t.maxValue,style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},defaultValue:r&&r[e.fieldName||""]?r[e.fieldName||""]:e.defaultValue?e.defaultValue:"",onChange:e=>{}})),e.dataType?.match(/text$/i)&&(s=(0,l.jsx)("textarea",{ref:a,name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,defaultValue:r&&r[e.fieldName||""]?r[e.fieldName||""]:e.defaultValue?e.defaultValue:"",style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},rows:10,onChange:e=>{}})),e.fieldName?.match(/password|^pass$|^key$/i)&&(s=(0,l.jsxs)("div",{className:"w-full relative",children:[(0,l.jsx)("input",{ref:a,type:"password",name:e.fieldName,id:e.fieldName,placeholder:e.fieldName,required:!!e.notNullValue,max:t.maxValue,style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},defaultValue:r&&r[e.fieldName]?r[e.fieldName]:e.defaultValue?e.defaultValue:"",onChange:e=>{}}),(0,l.jsx)("span",{className:"absolute right-4 cursor-pointer",onClick:e=>{let t=e.target.closest("div").querySelector("input");"password"===t.type?(t.type="text",e.target.innerText="Hide"):(t.type="password",e.target.innerText="Reveal")},children:"Reveal"})]})),s||(s=(0,l.jsx)("input",{ref:a,type:"text",name:e.fieldName,id:e.fieldName,style:{borderRadius:"0 5px 5px 5px",marginTop:"-1px"},defaultValue:r&&r[e.fieldName||""]?r[e.fieldName||""]:e.defaultValue?e.defaultValue:"",onChange:e=>{}})),s)}({fieldObject:e,dataTypeSchema:t,elementRef:s().useRef(),entry:d});if(e.dataType?.match(/text$/i)&&e.richText&&!e.plainText&&!e.fieldName?.match(/^pass|^key$/i)&&!e.encrypted||e.encrypted&&e.richText)return(0,l.jsx)(s().Fragment,{children:(0,l.jsx)(y,{fieldObject:e,dataTypeSchema:t,richTextEditors:a,currentRichTextEditorForms:n,entry:d,entryPage:c,formButtonId:u})});let p=e.json||e.yaml||e.html||e.css||e.javascript||e.shell;return e.dataType?.match(/text$/i)&&p&&!e.plainText&&!e.fieldName?.match(/^pass|^key$/i)&&!e.encrypted||e.encrypted&&p?(0,l.jsx)(j,{fieldObject:e,dataTypeSchema:t,entry:d,entryPage:c,jsonTextEditors:r,type:e.json?"json":e.yaml?"yaml":e.html?"html":e.css?"css":e.javascript?"javascript":e.shell?"shell":"json"}):(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0 w-full"+(e.defaultField?" opacity-50":""),children:[(0,l.jsxs)("label",{className:"font-bold text-slate-700 dark:text-slate-300 text-base px-3 py-1 bg-slate-100 dark:bg-slate-700 rounded-t-md border border-solid border-slate-300 dark:border-slate-300/20 flex items-center gap-2",htmlFor:e.fieldName,children:[e.encrypted&&(0,l.jsx)(s().Fragment,{children:(0,l.jsx)(h.A,{})}),(0,l.jsx)("span",{children:e.fieldName}),e.defaultField&&(0,l.jsx)("span",{className:"bg-white dark:bg-slate-900 text-primary dark:text-slate-300 font-semibold text-xs px-2 py-0.5 rounded-xs",children:"Default Field"})]}),m]})}},84759:(e,t,a)=>{a.d(t,{A:()=>l});function l({editorHTMLElementRef:e,fieldObject:t,setRefresh:a,language:l="javascript",entry:r,jsonTextEditors:s,editorRef:d,readOnly:n,initialContent:i,options:o}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{a?.(e=>e+1)},1e3);return}let c=ace.edit(e.current);c.setOptions({mode:"ace/mode/"+l,value:i||(t?.defaultValue?t.defaultValue:t?.fieldName&&r?.[t.fieldName]?(()=>{if("json"!==l)return r[t.fieldName];try{return JSON.stringify(JSON.parse(r[t.fieldName]),null,4)}catch(e){return r[t.fieldName]}})():""),placeholder:"json"==l?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:n,...o}),d&&t?.fieldName&&(s?.current.push({fieldName:t.fieldName,ref:d}),d.current=c);try{ace.require("ace/ext/beautify").beautify(c.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},65241:(e,t,a)=>{a.d(t,{A:()=>d});var l=a(8732),r=a(82015),s=a.n(r);function d({table:e,database:t,user:a,activeDbClone:r}){let d=e?.childTableDbFullName?e.childTableDbFullName.replace(new RegExp(/datasquirel_user_\d+_/),""):null,n=e.childTableDbFullName===t.db_full_name;return d?(0,l.jsxs)("span",{className:"info small green gap-1"+(t?.active_clone?" -mt-6":""),style:{fontWeight:"500"},children:["This Table is an active clone of"," ",(0,l.jsx)("a",{href:`/admin/${a?.id}/databases/${d}/tables/${e.childTableName}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,l.jsx)("b",{children:e.childTableName})})," ","in"," ",n?(0,l.jsxs)("span",{children:["this current database(",(0,l.jsx)("b",{children:t.db_name}),")."]}):(0,l.jsxs)(s().Fragment,{children:[(0,l.jsx)("a",{href:`/admin/${a?.id}/databases/${d}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,l.jsx)("b",{children:d})}),(0,l.jsx)("span",{children:"database."})]})," ",t?.active_clone?"":"Only Foreign keys and Entries can be updated."]}):(0,l.jsx)(s().Fragment,{})}},31651:(e,t,a)=>{a(81630);let l=a(77463);e.exports=async function({request:e,databaseSlug:t,user:a,query:r}){try{let s=a.id,d=null;if(!r?.delegated)return{dbUserId:s};let n=r.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${n}_${t}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let a=l({encryptedString:e.cookies[o]});if(!a)throw Error("Invalid Token");if((d=JSON.parse(a)).databaseSlug===t)return{dbUserId:s=d.rootUserId,rootUserId:d.rootUserId,rootUserName:d.rootUserName,rootUserEmail:d.rootUserEmail,rootUserImage:d.rootUserImage,databaseFullName:d.databaseFullName,databaseSlug:d.databaseSlug,allowedTables:d.allowedTables,priviledges:d.priviledges,database:d.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:s}}catch(e){return null}}},17855:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},89545:(e,t,a)=>{let l=a(77463),r=a(68743);e.exports=async function({unparsedResults:e,tableSchema:t}){let a=[];try{for(let s=0;s",t.message),e}}},90378:(e,t,a)=>{a(29021);let l=a(89545),r=a(22373),s=a(67216),d=a(1231),n=a(88896);e.exports=async function({queryString:e,queryValuesArray:t,database:a,tableSchema:i,useLocal:o}){let c;let u=!!o||!!a?.match(/^datasquirel$/),m=o?n:u?s:d;try{c=e&&t&&Array.isArray(t)&&t[0]?u?await m(e,t):await m({paradigm:"Full Access",database:a,queryString:e,queryValues:t}):u?await m(e):await m({paradigm:"Full Access",database:a,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&i)try{let e=c;return await l({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},1231:(e,t,a)=>{let l=a(29021);a(33873);let r=a(9973),s=a(31976),d=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:s()}});e.exports=function({paradigm:e,database:t,queryString:a,queryValues:n}){try{return new Promise((i,o)=>{let c=!!e?.match(/full.access|^fa$/i);try{function u(e){d.end(),i(JSON.parse(JSON.stringify(e)))}function m(e){d.end(),i({error:e.message,queryStringGenerated:a,queryValuesGenerated:n,sql:e.sql})}d=c?r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:s()}}):r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:s()}}),n&&Array.isArray(n)&&n[0]?d.query(a,n).then(u).catch(m):d.query(a).then(u).catch(m)}catch(e){l.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,t,a)=>{let l=a(9973),r=a(31976);async function s(...e){let t=l({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=s}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/9796.js b/dsql-app/.local_dist/server/chunks/9796.js new file mode 100644 index 0000000..1c7f5c6 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/9796.js @@ -0,0 +1 @@ +exports.id=9796,exports.ids=[9796],exports.modules={16757:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var t=s(8732),l=s(82015),r=s.n(l);function i({width:e,position:a,style:s,borderWidth:l,screen:i,title:n}){return(0,t.jsxs)("div",{className:" top-0 left-0 w-full h-full flex items-center justify-center gap-4 bg-white/80 dark:bg-slate-800/80 z-50"+(i?" fixed":" absolute"),style:{...s,position:a,zIndex:2e4},children:[(0,t.jsx)("span",{className:"general_loader",style:e?{width:e,height:e,minWidth:e,borderWidth:l||"4px"}:{}}),n?(0,t.jsx)("span",{children:n}):(0,t.jsx)(r().Fragment,{})]})}},50139:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});var t=s(8732),l=s(66759);function r({size:e,adminAside:a,collapseAsideMobile:s,setCollapseAsideMobile:r}){return(0,t.jsxs)("a",{href:"/",className:"logo",onClick:e=>{let a=e.target;if(a?.closest("button"))return e.preventDefault()},children:[a&&(0,t.jsxs)("button",{className:"flex lg:hidden small-text mr-2 primary-light",onClick:e=>{s&&r?r(!1):r&&r(!0)},children:[(0,t.jsx)("div",{className:"-mt-0.5",children:(0,t.jsx)(l.A,{})}),(0,t.jsx)("span",{className:"dark:text-white",children:"Menu"})]}),(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"dark:hidden -mt-1.5 -mr-1.5"}),(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"hidden dark:flex -mt-1.5 -mr-1.5"}),(0,t.jsx)("span",{className:"text-slate-800 dark:text-white text-[20px] font-bold hidden sm:flex -mt-[1px]",children:"Datasquirel"})]})}s(82015)},81868:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var t=s(8732),l=s(82015),r=s.n(l);function i(){let[e,a]=r().useState("Light Mode");return(0,t.jsx)("div",{className:"",id:"theme-selector-wrapper",onClick:()=>{let e=document.getElementById("theme-selector-graphic-wrapper"),s=localStorage.getItem("theme"),t=e?.querySelector("img.sun"),l=e?.querySelector("img.moon");!s||s?.match(/light/)?(document.documentElement.className="dark",localStorage.setItem("theme","dark"),s="dark",t?.classList.add("hidden"),l?.classList.remove("hidden"),e?.firstChild?.classList.add("ml-auto"),a("Dark Mode")):s?.match(/dark/)&&(document.documentElement.className="light",localStorage.setItem("theme","light"),s="light",l?.classList.add("hidden"),t?.classList.remove("hidden"),e?.firstChild?.classList.remove("ml-auto"),a("Light Mode"))},children:(0,t.jsx)("div",{className:"p-1 rounded-full w-12 transition-all",id:"theme-selector-graphic-wrapper",children:(0,t.jsxs)("div",{className:"pointer-events-none transition-all dark:ml-auto",children:[(0,t.jsx)("img",{src:"/images/sun.png",alt:"Sun Icon",width:18,className:"sun dark:hidden"}),(0,t.jsx)("img",{src:"/images/new-moon.png",alt:"Sun Icon",width:18,className:"moon hidden dark:flex"})]})})})}},46169:(e,a,s)=>{"use strict";s.d(a,{A:()=>l});var t=s(13893);let l=s.n(t)()},27550:(e,a,s)=>{"use strict";async function t({links:e}){let a=e||document.querySelectorAll("nav a");if(a&&a.forEach(e=>{e.dataset.currentlink===window.location.pathname?e.classList.add("active"):window.location.pathname.match(RegExp(`${e.dataset.currentlink}\\/.*`))&&!e.dataset.strictlink&&e.classList.add("active")}),window.location.pathname.match(/\/databases\/.*/)){let e=document.querySelectorAll("a");e&&window.location.search.match(/delegated=true/)&&e.forEach((e,a)=>{e?.pathname?.match(/databases/)&&(e.href=e.pathname+window.location.search)})}}s.d(a,{A:()=>t})},1013:(e,a,s)=>{"use strict";s.d(a,{A:()=>p});var t=s(8732),l=s(82015),r=s.n(l),i=s(27912),n=s.n(i);s(27550);var c=s(81868),d=s(50139),o=s(192),m=s(58526);function h({user:e,darkBg:a,transparent:s}){let[l,i]=r().useState(e?.logged_in_status?e:null);return(0,t.jsx)("header",{className:"w-full px-4 md:px-8 flex justify-center gap-4 "+(a?" shadow-slate-900/20 dark-content":" shadow-slate-900/5")+(s?"":" bg-white dark:bg-slate-800 shadow-lg dark:shadow-black/10 z-50")+(e?.logged_in_status?" py-4":" py-6"),style:{zIndex:700},children:(0,t.jsx)("div",{className:"container",children:(0,t.jsxs)("nav",{className:"w-full flex items-center justify-between gap-4 md:gap-10",children:[(0,t.jsx)(d.A,{}),(0,t.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 p-4 xl:p-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto xl:bg-transparent"+(s?" bg-white xl:bg-transparent":" bg-white dark:bg-slate-800"),id:"main-nav-content-wrapper",children:[(0,t.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,t.jsx)("a",{href:"/",children:(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,t.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let a=document.getElementById("main-nav-content-wrapper");a?.classList.toggle("hidden")},style:{border:"none"},children:(0,t.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,t.jsxs)("div",{className:"flex items-center grow flex-col-reverse xl:flex-row mb-10 xl:mb-0",children:[(0,t.jsxs)("div",{className:"flex-col xl:flex-row w-full gap-y-10 gap-x-6",children:[(0,t.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,t.jsxs)("a",{href:"/docs/gui-reference",className:"relative z-10 flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Features"}),(0,t.jsx)(m.A,{size:20})]}),(0,t.jsxs)("div",{className:"dropdown",children:[(0,t.jsx)("a",{href:"/docs/database-reference/data-types",className:"button plain-text more-padding normal-weight",children:"Database Schema"}),(0,t.jsx)("a",{href:"/docs/database-reference/querying-data",className:"button plain-text more-padding normal-weight",children:"Sql Queries"}),(0,t.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"button plain-text more-padding normal-weight",children:"Media Storage"})]})]}),(0,t.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,t.jsxs)("a",{href:"/docs",className:"relative z-10 flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Docs"}),(0,t.jsx)(m.A,{size:20})]}),(0,t.jsxs)("div",{className:"dropdown",children:[(0,t.jsx)("a",{href:"/docs/quick-start",className:"button plain-text more-padding normal-weight",children:"Quick Start"}),(0,t.jsx)("a",{href:"/docs/api-reference",className:"button plain-text more-padding normal-weight",children:"Api Guide"}),(0,t.jsx)("a",{href:"/docs/gui-reference",className:"button plain-text more-padding normal-weight",children:"GUI Interface"})]})]}),(0,t.jsx)("a",{href:"/about",children:"About Us"}),(0,t.jsx)("a",{href:"/contact",children:"Contact Us"})]}),l?.logged_in_status?(0,t.jsx)(o.A,{activeUser:l,noModeSelector:!0}):(0,t.jsxs)("div",{className:"ml-auto w-full xl:w-auto justify-center",children:[(0,t.jsx)("a",{href:"/login",className:"button outlined gray hidden xl:flex"+(a?" light":""),children:"Login"}),(0,t.jsx)("a",{href:"/login",className:"button outlined gray flex xl:hidden",children:"Login"}),(0,t.jsx)("a",{href:"/create-account",className:"button",children:"Get Started"})]})]})]}),(0,t.jsx)("div",{className:"ml-0 xl:-ml-2",children:(0,t.jsx)(c.A,{})}),(0,t.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all",onClick:e=>{let a=document.getElementById("main-nav-content-wrapper");a?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,t.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,t.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,t.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})})}function x(){return(0,t.jsxs)("footer",{className:"p-8 md:p-10 w-full flex flex-col items-center",children:[(0,t.jsxs)("div",{className:"main-container items-start justify-between gap-6 flex-wrap flex-col md:flex-row pt-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-6",children:[(0,t.jsx)(d.A,{}),(0,t.jsx)("span",{className:"font-normal max-w-sm text-sm text-left",children:"Datasquirel is a fast efficient cloud-based data store that takes away the entire hassle of data management."})]}),(0,t.jsxs)("div",{className:"flex-col items-start",children:[(0,t.jsx)("h4",{className:"m-0",children:"Features"}),(0,t.jsx)("a",{href:"/docs/database-reference/data-types",className:"text-slate-600",children:"Database Schema"}),(0,t.jsx)("a",{href:"/docs/database-reference/querying-data",className:"text-slate-600",children:"SQL Queries"}),(0,t.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"text-slate-600",children:"Media Storage"})]}),(0,t.jsxs)("div",{className:"flex-col items-start",children:[(0,t.jsx)("h4",{className:"m-0",children:"Docs"}),(0,t.jsx)("a",{href:"/docs/quick-start",className:"text-slate-600",children:"Quick Start Guide"}),(0,t.jsx)("a",{href:"/docs/api-reference",className:"text-slate-600",children:"API Guide"}),(0,t.jsx)("a",{href:"/docs/gui-reference",className:"text-slate-600",children:"GUI Interface"})]}),(0,t.jsxs)("div",{className:"flex-col items-start",children:[(0,t.jsx)("h4",{className:"m-0",children:"Company"}),(0,t.jsx)("a",{href:"/about",className:"text-slate-600",children:"About Us"}),(0,t.jsx)("a",{href:"/terms",className:"text-slate-600",children:"Terms and Conditions"}),(0,t.jsx)("a",{href:"/privacy",className:"text-slate-600",children:"Privacy Policy"})]})]}),(0,t.jsx)("hr",{className:"my-10"}),(0,t.jsx)("div",{className:"container",children:(0,t.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]})})]})}function g(){return(0,t.jsx)(r().Fragment,{})}var u=s(43363);function p({children:e,head:a,user:s,productionEnvironment:l,darkBgHeader:i,transparentHeader:c}){return(0,t.jsxs)(r().Fragment,{children:[(0,t.jsx)(n(),{children:a}),(0,t.jsx)(g,{}),(0,t.jsx)(h,{user:s,darkBg:i,transparent:c}),e,(0,t.jsx)(x,{}),(0,t.jsx)(u.A,{})]})}},192:(e,a,s)=>{"use strict";s.d(a,{A:()=>m});var t=s(8732),l=s(82015),r=s.n(l),i=s(16757),n=s(52070);function c({user:e}){return(0,t.jsxs)("div",{className:"dropdown right-aligned",children:[(0,t.jsxs)("a",{href:"/admin",className:"button outlined gray more-padding relative z-20 mb-2",children:[(0,t.jsx)(n.A,{size:18,className:"mr-1"}),(0,t.jsx)("span",{children:"Dashboard"})]}),null,(0,t.jsx)("a",{href:`/admin/${e?.id}/settings`,className:"button plain-text more-padding normal-weight",children:"Settings"}),(0,t.jsx)("a",{href:"/logout",className:"button plain-text more-padding normal-weight",children:"Logout"})]})}var d=s(81868),o=s(58526);function m({activeUser:e,noModeSelector:a}){return e?.logged_in_status?(0,t.jsxs)("div",{className:"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2 whitespace-nowrap",children:[(0,t.jsxs)("div",{className:"ml-auto dropdown-wrapper p-0 xl:p-4 hover:bg-slate-100 hidden",children:[(0,t.jsx)("a",{href:`/admin/${e?.id}/notifications`,className:"flex items-center justify-center",children:(0,t.jsx)("img",{src:"/images/notification-icon.svg",alt:"Notification Icon",width:20,className:"opacity-50"})}),(0,t.jsxs)("div",{className:"dropdown mt-0 xl:-mt-3 gap-2",children:[(0,t.jsx)("span",{className:"text-slate-400",children:"Notifications"}),(0,t.jsx)(i.A,{position:"relative",width:"20px"})]})]}),(0,t.jsxs)("div",{className:"ml-auto dropdown-wrapper",children:[(0,t.jsxs)("div",{className:"avatar",style:{width:"36px",height:"36px"},children:[(0,t.jsx)("img",{src:e?.image,alt:"User Image",width:35,className:"w-full h-full object-cover rounded-full"}),e?.social_login?(0,t.jsxs)("div",{className:"sub-img",children:[(0,t.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github.png":"/images/sharing.png",alt:"",className:"flex dark:hidden"}),(0,t.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github-white.png":"/images/sharing.png",alt:"",className:"hidden dark:flex"})]}):(0,t.jsx)(r().Fragment,{})]}),(0,t.jsx)("span",{className:"dark:text-white",children:(0,t.jsxs)("b",{children:[e?.first_name," ",e?.last_name]})}),(0,t.jsx)(o.A,{size:20}),(0,t.jsx)(c,{user:e})]}),!a&&(0,t.jsx)("div",{className:"ml-2",children:(0,t.jsx)(d.A,{})})]}):(0,t.jsx)(r().Fragment,{})}},43363:(e,a,s)=>{"use strict";s.d(a,{A:()=>n});var t=s(8732),l=s(58591),r=s(82015),i=s.n(r);function n({snug:e}){let[a,s]=i().useState(!1);return(0,t.jsx)(i().Fragment,{children:a&&(0,t.jsx)("button",{className:"fixed z-40 w-12 h-12 p-2 rounded-full bg-white dark:bg-slate-600 shadow-xl flex items-center justify-center hover:bg-slate-800 dark:hover:bg-slate-800 text-slate-500 dark:text-slate-200 outline-slate-300 dark:outline-transparent"+(e?" bottom-6 right-4":" bottom-4 md:bottom-10 right-4 md:right-10"),style:{outlineStyle:"solid",outlineWidth:"1px",zIndex:2e3},onClick:e=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},children:(0,t.jsx)(l.A,{size:20})})})}},19796:(e,a,s)=>{"use strict";s.r(a),s.d(a,{AppContext:()=>x,default:()=>g});var t=s(8732),l=s(82015),r=s.n(l),i=s(28133),n=s.n(i),c=s(27912),d=s.n(c);s(79061),s(44422);var o=s(46169),m=s(1013);class h extends r().Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,a){(0,o.A)("/api/admin/clientError",{method:"post",body:{component:"ErrorBoundary-class-component",message:e.message+" ==== Error Info => "+a,user:{}}})}render(){return this.state.hasError?(0,t.jsx)(m.A,{head:this.state.head,user:null,children:(0,t.jsxs)("div",{className:"paper items-center px-20",children:[(0,t.jsx)("h2",{className:"text-base text-slate-400 m-0",children:"Application Error!"}),(0,t.jsx)("h1",{className:"text-2xl m-0 mb-4",children:"Please try again!"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("a",{href:"/",className:"button outlined",children:"Home"}),(0,t.jsx)("button",{onClick:e=>{window.history.back()},children:"Go Back"})]})]})}):this.props.children}}let x=r().createContext({pageProps:{}});function g({Component:e,pageProps:a}){return(0,t.jsxs)(x.Provider,{value:{pageProps:a},children:[(0,t.jsx)(d(),{children:(0,t.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),(0,t.jsx)(h,{children:(0,t.jsx)(e,{...a})}),(0,t.jsx)(n(),{src:"/scripts/main.js",strategy:"afterInteractive"})]})}},79061:()=>{},44422:()=>{}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/9901.js b/dsql-app/.local_dist/server/chunks/9901.js new file mode 100644 index 0000000..e5855f0 --- /dev/null +++ b/dsql-app/.local_dist/server/chunks/9901.js @@ -0,0 +1,17 @@ +"use strict";exports.id=9901,exports.ids=[9901],exports.modules={46083:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(8732),s=t(82015),i=t.n(s),n=t(32251),r=t(36138),d=t(27825),o=t.n(d);function c({targetField:e,fieldIndex:a,tableFields:s,setTableFields:d,refreshFieldsListRef:c,setActiveEdit:u,database:m,currentTable:x,user:p}){let h=e?.dataType?e.dataType.replace(/\d|\(|\)/g,""):null,f=e?.dataType?e.dataType.replace(/[^\d]/g,""):"200",g=t(94327),y=i().useRef(o().cloneDeep(e)),v=i().useRef(),[j,N]=i().useState(e),[w,b]=i().useState(e?.fieldName),[T,_]=i().useState(h),[F,S]=i().useState(f),[C,A]=i().useState("Varchar is simply letters and numbers within the range 0 - 255"),[k,D]=i().useState(e?.richText&&!e?.encrypted?"Yes":"No"),V=!!T?.match(/uuid/i);return(0,l.jsx)("div",{className:"w-full -mt-3 bg-white dark:bg-slate-800 flex-wrap",ref:v,children:(0,l.jsxs)("form",{className:"flex flex-col xl:flex-row items-start gap-4 w-full justify-between border border-solid p-4 border-slate-200 dark:border-slate-600 rounded rounded-t-none focus:shadow-lg shadow-slate-700 dark:shadow-black relative flex-wrap",onSubmit:e=>{e.preventDefault(),d(e=>(e[a]=j,e)),c.current(e=>e+1);let t=e.target;t.closest(".table-field-wrapper")?.querySelector(".edit-table-field-section")?.classList.toggle("hidden")},children:[(0,l.jsxs)("div",{className:"gap-4 flex-wrap w-full md:w-auto flex-col xl:flex-row items-stretch",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_name",children:"Field Name"}),(0,l.jsx)("input",{type:"text",name:"new_field_name",id:"new_field_name",placeholder:"Eg. post_title",onInput:async e=>{let a=e.target;a.value=a.value.toLowerCase().replace(/ /g,"_"),N(e=>(e.fieldName=a.value,e.updatedField=!0,e.originName||(e.originName=w),e))},required:!0,defaultValue:w})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"flex-wrap xl:flex-nowrap w-full md:w-auto",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Data Type"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:C})})]})]}),(0,l.jsxs)("div",{className:"w-auto",children:[(0,l.jsx)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl-w-auto",onChange:a=>{let t=a.target;_(t.value),t.childNodes.forEach(e=>{e.value===t.value&&e.dataset.desc&&A(e.dataset.desc),e.value===t.value&&e.dataset.literal?(j.defaultValueLiteral=e.dataset.literal,j.nullValue=!1):delete j.defaultValueLiteral}),e.dataType=t.value+(t.value.match(/VARCHAR/)?`(${F||200})`:"")},defaultValue:T||void 0,children:g.map((e,a)=>e.name.match(/VARCHAR/)?(0,l.jsx)("option",{value:e.name,"data-desc":e.description,children:e.title+"("+(F||200)+")"},a+1):(0,l.jsx)("option",{value:e.name,"data-desc":e.description,"data-literal":e.valueLiteral||void 0,children:e.title},a+1))}),T?.match(/VARCHAR/)&&(0,l.jsx)("input",{type:"number",defaultValue:F||200,className:"px-2",style:{maxWidth:"60px"},max:255,min:5,onChange:a=>{S(a.target.value),e.dataType=T+`(${a.target.value})`}})]})]}),T?.match(/text/i)&&(0,l.jsx)(i().Fragment,{children:(0,l.jsx)(r.A,{targetField:e})}),!e.dataType?.match(/text/i)&&!V&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Required?"}),(0,l.jsxs)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",defaultValue:e?.notNullValue?"Yes":"No",onChange:a=>{console.log(e),"Yes"===a.target.value?e.notNullValue=!0:(e.notNullValue=!1,delete e.notNullValue)},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]}),!V&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_default_value",children:j?.dataType?.match(/text$/i)?"Can't Set Default for text values":"Default Value (optional)"}),(0,l.jsx)("input",{type:"text",name:"new_field_default_value",id:"new_field_default_value",className:j?.dataType?.match(/text$/i)?"pointer-events-none opacity-50":"",placeholder:"Default Value",defaultValue:j?.defaultValue?j.defaultValue:j?.nullValue?"NULL":"",onInput:e=>{let a=e.target;j.dataType?.match(/text$/i)||N(e=>(a.value.match(/./)?delete e.notNullValue:(delete e.defaultValue,delete e.nullValue),a.value.match(/^null$/i)?(delete e.defaultValue,e.nullValue=!0):a.value.match(/./)&&(delete e.nullValue,e.defaultValue=a.value),e))}})]}),!V&&(0,l.jsx)(n.A,{database:m,setFieldData:N,setTableFields:d,tableFields:s,targetField:e,user:p,currentTable:x,fieldIndex:a})]}),(0,l.jsxs)("div",{className:"secondary mt-auto flex-wrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full md:w-auto grow",children:"Save Updates"}),(0,l.jsx)("div",{className:"button outlined gray mt-auto py-2.5 w-full md:w-auto justify-center grow",onClick:t=>{y.current&&(e=o().cloneDeep(y.current)),d(e=>{let t=o().cloneDeep(e);return a&&y.current&&(t[a]=o().cloneDeep(y.current)),t}),u&&u(!1)},children:"Cancel"})]})]})})}},32251:(e,a,t)=>{t.d(a,{A:()=>g});var l=t(8732),s=t(82015),i=t.n(s),n=t(83155),r=t(58150);function d({targetField:e}){if(!e?.richText)return null;let[a,t]=i().useState(e.cssFiles||[]),s=i().useRef(null);return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full my-4",style:{minWidth:"70px"},children:[(0,l.jsx)("span",{className:"label text-xs text-slate-500",children:"Add CSS"}),a.map((e,a)=>(0,l.jsxs)("div",{className:"relative border border-solid border-slate-300 text-xs px-2 py-1 rounded-full",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(r.A,{size:20,onClick:()=>{t(a=>a.filter(a=>a!==e))},className:"cursor-pointer hover:opacity-60 "})]},a+1)),(0,l.jsxs)("div",{className:"row w-full",children:[(0,l.jsx)(n.A,{name:"css-file",placeholder:"CSS file URL",elementRef:s}),(0,l.jsx)("button",{className:"secondary outlined",onClick:()=>{let e=s.current?.value;e?.match(/./)&&t(a=>[...new Set([...a,e])])},children:"Add"})]}),(0,l.jsx)("span",{className:"text-sm text-slate-600",children:"Add CSS files to your Rich Text field"})]})}function o({targetField:e,setFieldData:a}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"encryption_field",children:"Encrypt?"}),(0,l.jsxs)("select",{name:"encryption_field",id:"encryption_field",className:"px-2",defaultValue:e?.encrypted?"Yes":"No",onChange:e=>{a&&a(a=>(e.target.value.match(/yes/i)?a.encrypted=!0:(a.encrypted=!1,delete a.encrypted),a))},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]})}var c=t(93763);function u({targetField:e,setFieldData:a}){return null}function m({targetField:e}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"encryption_field",children:"Pattern"}),(0,l.jsx)("span",{className:"text-sm text-slate-500",children:'This describes a pattern that must be matched for this field to be valid. If you add a pattern and make a db entry that doesn\'t match, the entry will be "NULL" or an empty string or the default value.'}),(0,l.jsx)("input",{type:"text",placeholder:"Regex Pattern. Eg: '\\\\.[a-z]+'",onInput:a=>{let t=a.target;t?.value?.length>0?e.pattern=t.value:delete e.pattern},defaultValue:e?.pattern}),(0,l.jsx)("input",{type:"text",placeholder:"Regex Pattern Flags. Eg: igm",onInput:a=>{let t=a.target;t?.value?.length>0?e.patternFlags=t.value:delete e.patternFlags},defaultValue:e?.patternFlags})]})}var x=t(27825),p=t.n(x),h=t(84483);function f({targetField:e,setFieldData:a}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"unique_field",children:"Unique Field?"}),(0,l.jsxs)("select",{name:"unique_field",id:"unique_field",className:"px-2",defaultValue:e?.unique?"Yes":"No",onChange:e=>{a&&a(a=>(e.target.value.match(/yes/i)?a.unique=!0:(a.unique=!1,delete a.unique),a))},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]})}function g({targetField:e,currentTable:a,database:t,tableFields:s,setTableFields:n,setFieldData:r,user:x,fieldIndex:g}){let[y,v]=i().useState(!1),j=i().useRef(p().cloneDeep(e));return(0,l.jsxs)(i().Fragment,{children:[(0,l.jsx)("span",{className:"button outlined gray mt-5 w-full xl:w-auto",onClick:()=>{v(!0)},children:"More"}),(0,l.jsx)(h.A,{open:y,onClose:()=>{j.current&&(e=p().cloneDeep(j.current)),v(!1)},maxWidth:"600px",children:(0,l.jsxs)("div",{className:"m-auto flex flex-col max-w-xl w-full max-h-[90vh] overflow-y-auto",children:[(0,l.jsx)("div",{className:"w-full justify-between",children:(0,l.jsx)("span",{className:"text-xl",children:"More Options"})}),(0,l.jsx)(d,{targetField:e}),(0,l.jsx)(f,{targetField:e,setFieldData:r}),(0,l.jsx)(o,{targetField:e,setFieldData:r}),a&&(0,l.jsx)(c.A,{targetField:e,setFieldData:r,database:t,tableFields:s,setTableFields:n,currentTable:a,user:x}),(0,l.jsx)(u,{targetField:e,setFieldData:r}),(0,l.jsx)(m,{targetField:e}),(0,l.jsx)("button",{className:"w-full outlined more-padding",onClick:()=>{v(!1)},children:"Done"})]})})]})}},471:(e,a,t)=>{t.d(a,{A:()=>F});var l=t(8732),s=t(82015),i=t.n(s);function n({tableFields:e,setTableFields:a,setRefresh:t,setPageRefresh:l,refreshFieldsListRef:s}){let i=e.findIndex(e=>"date_created"===e.fieldName);e.splice(i,0,{newTempField:!0}),a(e),s?.current&&s.current(e=>e+1)}t(80255);var r=t(51339),d=t(16757),o=t(42960),c=t(93763),u=t(46169);function m({field:e,setTargetField:a,fieldIndex:t,tableFields:s,setTableFields:n,refreshFieldsListRef:r,database:d,currentTable:m,user:x,isDelegated:p,setLoading:h}){let[f,g]=i().useState(e),[y,v]=i().useState(!1);return(0,l.jsxs)("div",{className:"flex-col w-full table-field-wrapper"+(y?" shadow-2xl shadow-slate-700/40 relative z-50":""),children:[(0,l.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(y?" rounded-t":" rounded")+(f.fieldName?.match(o.A)?" text-slate-400 pointer-events-none border-slate-200 border":" light-gray"),children:[(0,l.jsx)("span",{className:"font-bold"+(f.fieldName?.match(o.A)?" dark:text-slate-500":" dark:text-white"),children:f.fieldName}),(0,l.jsx)("span",{className:"text-xs py-1 px-2 bg-slate-100 dark:bg-slate-700 dark:text-slate-200 rounded ",children:f.dataType}),f?.foreignKey&&(0,l.jsxs)("div",{className:"text-xs bg-primary text-white px-2 py-0.5 rounded-full",children:[(0,l.jsx)("span",{children:"Foreign Key: "}),(0,l.jsxs)("span",{children:[f.foreignKey.destinationTableName," ("," ",(0,l.jsx)("b",{children:f.foreignKey.destinationTableColumnName})," ",")"]})]}),f.fieldName?.match(o.A)&&(0,l.jsx)("span",{className:"text-slate-300 text-sm font-semibold ml-0 md:ml-auto",children:"Default Field"}),!(!p&&!f.fieldName?.match(o.A)&&f.dataType?.match(/INT/))||f.foreignKey||d?.active_clone?.toString()?.match(/1/)?!p&&!f.fieldName?.match(o.A)&&f.dataType?.match(/INT/)&&!d?.active_clone?.toString()?.match(/1/)?(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(0,l.jsx)("div",{className:"button py-1 text-xs light-gray",onClick:a=>{window.confirm("Delete this foreign Key?")&&(delete e.foreignKey,h(!0),(0,u.A)("/api/updateClonedTableForeignKeys",{method:"post",body:{tableData:m,database:d.db_full_name,dbSlug:d.db_slug,delegated:!!window.location?.search?.match(/delegated=true/i)}},!0).then(e=>{e.success?window.location.reload():window.alert("Update Failed, Please Try again.")}))},style:{color:"var(--slate-500)"},children:"Delete Foreign Key"})}):(0,l.jsx)(i().Fragment,{}):(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(0,l.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:e=>{y?v(!1):v(!0)},style:{color:"var(--slate-500)"},children:"Add Foreign Key"})})]}),y&&!p&&(0,l.jsx)("div",{className:"card col w-full -mt-5 pt-0 no-hover",children:(0,l.jsx)(c.A,{targetField:e,setFieldData:g,tableFields:s,setTableFields:n,database:d,currentTable:m,user:x,setActiveEdit:v,activeClonedTable:!0})})]})}var x=t(32251),p=t(36138);function h({fieldIndex:e,setTableFields:a,database:s,user:n,isNewField:r,setLiteralValue:d,tempFieldData:o,setTempFieldData:c,dataTypeValue:u,setDataTypeValue:m,dataType:h,setDataType:f,dataTypeDesc:g,setDataTypeDesc:y}){let v=t(94327);i().useRef();let j=!!h.match(/uuid/i);return(0,l.jsxs)(i().Fragment,{children:[r&&(0,l.jsx)("span",{className:"absolute -top-4 text-sm bg-fuchsia-600 dark:bg-white text-white dark:text-fuchsia-800 px-3 py-1 rounded-full",children:"New Field"}),(0,l.jsxs)("div",{className:"gap-4 flex-wrap xl:flex-nowrap flex-col xl:flex-row items-stretch w-full xl:w-auto",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_name",children:"Field Name"}),(0,l.jsx)("input",{type:"text",name:"new_field_name",id:"new_field_name",placeholder:"Eg. post_title",onInput:async e=>{let a=e.target,t=a.value.toLowerCase().replace(/ /g,"_");a.value=t},required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"items-start flex-wrap xl:flex-nowrap",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Data Type"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm w-full items-start gap-2",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:g})})]})]}),(0,l.jsxs)("div",{className:"w-full xl:w-auto",children:[(0,l.jsx)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl:w-auto",onChange:e=>{let a=e.target;f(a.value),a.childNodes.forEach(e=>{e.value===a.value&&y(e.dataset.desc),e.value===a.value&&e.dataset.literal&&d(e.dataset.literal)})},children:v.map((e,a)=>e.name.match(/VARCHAR/)?(0,l.jsx)("option",{value:e.name,"data-desc":e.description,children:e.title+"("+(u||200)+")"},a+1):(0,l.jsx)("option",{value:e.name,"data-desc":e.description,"data-literal":e.valueLiteral||void 0,children:e.title},a+1))}),h.match(/VARCHAR/)&&(0,l.jsx)("input",{type:"number",defaultValue:u,className:"px-2",style:{maxWidth:"60px"},max:255,min:5,onChange:e=>{m(e.target.value)}})]})]}),h?.match(/text/i)&&(0,l.jsx)(i().Fragment,{children:(0,l.jsx)(p.A,{targetField:o})}),!j&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Required?"}),(0,l.jsxs)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]})]}),!j&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_field_default_value",children:"Default Value (optional)"}),(0,l.jsx)("input",{type:"text",name:"new_field_default_value",id:"new_field_default_value",placeholder:"Default Value"})]}),!j&&(0,l.jsx)(x.A,{database:s,setFieldData:c,targetField:o,user:n,fieldIndex:e})]}),(0,l.jsxs)("div",{className:"secondary mt-auto flex-wrap xl:flex-nowrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full sm:w-auto justify-center grow",children:"Add Field"}),(0,l.jsx)("div",{className:"button outlined-gray mt-auto py-2.5 w-full sm:w-auto justify-center grow",onClick:t=>{a(a=>a.filter((a,t)=>t!=e))},children:"Cancel"})]})]})}function f({fieldIndex:e,tableFields:a,setTableFields:s,refreshFieldsListRef:n,database:r,currentTable:d,user:o}){t(94327);let[c,u]=i().useState("VARCHAR"),[m,x]=i().useState("200"),[p,f]=i().useState("Varchar is simply letters and numbers within the range 0 - 255"),[g,y]=i().useState({}),v=i().useRef(),[j,N]=i().useState(""),w=!!c.match(/uuid/i);return(0,l.jsx)("div",{className:"w-full mt-1 flex-wrap relative z-0 hover:z-20",ref:v,children:(0,l.jsx)("form",{className:"flex flex-row items-start gap-4 w-full justify-between border border-solid p-4 pt-6 border-slate-400 rounded focus:shadow-lg shadow-slate-400/40 dark:shadow-black/30 relative flex-wrap xl:flex-nowrap shadow-xl",onSubmit:a=>{a.preventDefault();let t=g.foreignKey;t&&!t.destinationTableName&&delete g.foreignKey;let l=a.target,i=l.new_field_name.value,r=l.new_field_data_type.value,d=l.new_field_required?.value,o=l.new_field_default_value?.value,c=l.encryption_field?.value,u=l.rich_text_option?.value,x=l.foreign_key_field,p=l.foreign_key_destination_table_name,h=l.foreign_key_destination_table_column_name;x?.value;let f={...g,fieldName:i,dataType:g?.dataType&&g?.foreignKey?g.dataType:r?.match(/VARCHAR/)?`${r}(${m})`:r};d?.match(/yes/i)?f.notNullValue=!0:o?.match(/./)||(f.nullValue=!0),o?.match(/./)&&(f.defaultValue=o),c?.match(/yes/i)&&(f.encrypted=!0),h?.value?.match(/./i)&&!h?.value?.match(/^--$/i)&&(f.dataType=h.dataset.dataType,f.foreignKey={foreignKeyName:h.dataset.foreignKeyName,destinationTableName:p.dataset.destinationTableName,destinationTableColumnName:h.dataset.destinationTableColumnName,cascadeDelete:!0}),u?.match(/yes/i)&&(f.richText=!0),w?(f.defaultValueLiteral=j,f.nullValue=!1):delete f.defaultValueLiteral,console.log("newFieldObject",f),function({fieldIndex:e,setTableFields:a,refreshFieldsListRef:t,payload:l}){a(a=>(a.splice(e,1,l),a)),t?.current&&t.current(e=>e+1)}({fieldIndex:e,setTableFields:s,refreshFieldsListRef:n,payload:f})},children:(0,l.jsx)(h,{database:r,fieldIndex:e,isNewField:!0,literalValue:j,refreshFieldsListRef:n,setLiteralValue:N,setTableFields:s,user:o,currentTable:d,tableFields:a,tempFieldData:g,setTempFieldData:y,dataTypeValue:m,setDataTypeValue:x,dataType:c,setDataType:u,dataTypeDesc:p,setDataTypeDesc:f})})})}var g=t(27825),y=t.n(g);function v({tableFields:e,setTableFields:a,refreshFieldsListRef:t,order:l,field:s,e:i}){let n=y().cloneDeep(e),r=n.findIndex(e=>e.fieldName===s.fieldName);if(r<0)return;let d=n[r];if("up"===l&&r&&r<=1){console.log("Min Reached =>",r);return}if("down"===l&&r&&r>=n.length-7){console.log("Max Reached =>",r);return}try{let e;let a=i.target.closest(".table-field-wrapper"),t=a.previousElementSibling,s=a.nextElementSibling,n=window.DSQL.Flip,r=n.getState(a);"up"===l?(e=n.getState(t),a.parentNode?.insertBefore(a,t)):s?.nextElementSibling&&(e=n.getState(s),a.parentNode?.insertBefore(a,s.nextElementSibling)),n.from(r,{duration:.3,ease:"power1.inOut"}),n.from(e,{duration:.3,ease:"power1.inOut"})}catch(e){console.log("Error =>",e.message)}if(!r){console.log("No target Field Index =>",r);return}n.splice(r,1),"up"===l?n.splice(r-1,0,d):n.splice(r+1,0,d),setTimeout(()=>{a([...n]),t.current&&t.current(e=>e+1)},500)}var j=t(46083),N=t(55904),w=t(58526);function b({field:e,setTargetField:a,fieldIndex:t,tableFields:s,setTableFields:n,refreshFieldsListRef:r,database:d,currentTable:c,confirmedDelegetedUser:u,user:m}){let x=u?.delegated,p=u?.priviledges?.match(/Edit Tables/i);u?.priviledges?.match(/Delete Tables/i),u?.priviledges?.match(/Create Tables/i);let{active_clone:h,active_clone_parent_db:f,remote_connected:g}=d,[y,b]=i().useState(e),[T,_]=i().useState(!1);return(0,l.jsxs)("div",{className:"flex-col w-full table-field-wrapper"+(T?" shadow-2xl shadow-slate-300/40 dark:shadow-black/30 relative z-50":""),children:[(0,l.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(T?" rounded-t":" rounded")+(y.fieldName?.match(o.A)?" text-slate-400 pointer-events-none border-slate-200 border":" light-gray"),children:[(0,l.jsx)("span",{className:"font-bold"+(y.fieldName?.match(o.A)?" dark:text-slate-500":" dark:text-white"),children:y.fieldName}),(0,l.jsx)("span",{className:"text-xs py-1 px-2 bg-slate-100 dark:bg-slate-700 dark:text-slate-200 rounded ",children:y.dataType}),y?.foreignKey&&(0,l.jsxs)("div",{className:"text-xs bg-primary text-white px-2 py-0.5 rounded-full",children:[(0,l.jsx)("span",{children:"Foreign Key: "}),(0,l.jsxs)("span",{children:[y.foreignKey.destinationTableName," ("," ",(0,l.jsx)("b",{children:y.foreignKey.destinationTableColumnName})," ",")"]})]}),y.fieldName?.match(o.A)&&(0,l.jsx)("span",{className:"text-slate-300 text-sm font-semibold ml-0 md:ml-auto",children:"Default Field"}),!y.fieldName?.match(o.A)&&!f&&!g&&(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(!x||x&&p)&&(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)(N.A,{children:[(0,l.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:e=>{T?_(!1):_(!0)},style:{color:"var(--slate-500)"},children:"Edit"}),!f&&!g&&(0,l.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:a=>{window.confirm(`Delete "${e.fieldName}"?`)&&n(e=>e.filter((e,a)=>a!=t))},style:{color:"var(--slate-500)"},children:"Delete"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"button outlined gray p-2 w-8 h-8 rounded-full rotate-180",onClick:a=>{v({tableFields:s,setTableFields:n,refreshFieldsListRef:r,order:"up",field:e,e:a})},children:(0,l.jsx)(w.A,{size:20})}),(0,l.jsx)("div",{className:"button outlined gray p-2 w-8 h-8 rounded-full",onClick:a=>{v({tableFields:s,setTableFields:n,refreshFieldsListRef:r,order:"down",field:e,e:a})},children:(0,l.jsx)(w.A,{size:20})})]})]})})]}),T&&(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(j.A,{fieldIndex:t,tableFields:s,setTableFields:n,refreshFieldsListRef:r,targetField:e,setActiveEdit:_,database:d,currentTable:c,user:m})})]})}var T=t(60424);let _=1;function F({user:e,tableFields:a,setTableFields:t,setTargetField:s,refreshFieldsListRef:o,updateTable:c,updateTableAfterFieldsUpdateFunction:u,collapsed:x,database:p,table:h,confirmedDelegetedUser:g,query:y}){h?.childTable&&h.childTableDbFullName?.replace(new RegExp(/datasquirel_user_\d+_/),"");let v=g?.delegated,j=g?.priviledges?.match(/Edit Tables/i);g?.priviledges?.match(/Delete Tables/i),g?.priviledges?.match(/Create Tables/i);let{active_clone:N,active_clone_parent_db:w,remote_connected:F}=p,[S,C]=i().useState(0);o.current=C;let[A,k]=i().useState(!1),[D,V]=i().useState(x||!1);return v&&!j?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)("section",{className:"paper green",children:[A&&(0,l.jsx)(d.A,{}),h?.childTable?(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Fields"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{let t=(0,T.A)({paradigm:"JavaScript",table:h,query:y,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("JavaScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (JS)"})}),(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{let t=(0,T.A)({paradigm:"TypeScript",table:h,query:y,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("TypeScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (TS)"})})]})]}),(0,l.jsx)("div",{className:"flex-col w-full",style:D?{maxHeight:"200px"}:{},children:a&&a[0]&&a.map((i,n)=>(_++,(0,l.jsx)(m,{field:i,fieldIndex:n,setTargetField:s,setTableFields:t,refreshFieldsListRef:o,tableFields:a,database:p,setLoading:k,currentTable:h,user:e,isDelegated:v},_)))}),x&&(0,l.jsx)(r.A,{collapse:D||!1,setCollapse:V})]}):(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Fields"}),(0,l.jsxs)("div",{children:[(!v||v&&j)&&!w&&!F&&(0,l.jsxs)("div",{className:"button secondary outlined",onClick:e=>{D&&V(!1),n({setTableFields:t,tableFields:a,setRefresh:C,refreshFieldsListRef:o})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Field"})]}),(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{if(!h)return;let t=(0,T.A)({paradigm:"JavaScript",table:h,query:y,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("JavaScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (JS)"})}),(0,l.jsx)("div",{className:"button outlined light-gray",onClick:a=>{if(!h)return;let t=(0,T.A)({paradigm:"TypeScript",table:h,query:y,user:e});t&&navigator.clipboard.writeText(t).then(()=>{window.alert("TypeScript Type Definition Copied")})},children:(0,l.jsx)("span",{children:"Copy TypeDef (TS)"})})]})]}),(0,l.jsxs)("div",{className:"flex-col w-full",style:D?{maxHeight:"200px"}:{},children:[a&&a[0]&&a.map((i,n)=>(_++,i.newTempField)?(0,l.jsx)(f,{fieldIndex:n,tableFields:a,setTableFields:t,refreshFieldsListRef:o,database:p,currentTable:h,user:e},_):(0,l.jsx)(b,{field:i,fieldIndex:n,setTargetField:s,setTableFields:t,refreshFieldsListRef:o,tableFields:a,database:p,currentTable:h,confirmedDelegetedUser:g,user:e},_)),(!v||v&&j)&&!w&&!F&&(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("div",{className:"button outlined gray w-full more-padding",style:{borderStyle:"dashed"},onClick:e=>{D&&V(!1),n({setTableFields:t,tableFields:a,setRefresh:C,refreshFieldsListRef:o})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Field"})]}),c&&(0,l.jsx)("button",{className:"secondary w-full py-3",onClick:e=>{window.confirm("Update Table Fields?")&&(k(!0),u&&u(k))},children:"Update Table Fields"})]})]}),x&&(0,l.jsx)(r.A,{collapse:D,setCollapse:V})]})]})}},93763:(e,a,t)=>{t.d(a,{A:()=>o});var l=t(8732),s=t(82015),i=t.n(s),n=t(46169),r=t(16757),d=t(2913);function o({targetField:e,setFieldData:a,tableFields:t,setTableFields:s,database:o,currentTable:c,user:u,setActiveEdit:m,activeClonedTable:x}){let[p,h]=i().useState(!!e?.foreignKey),[f,g]=i().useState(null),[y,v]=i().useState(null),[j,N]=i().useState(null),[w,b]=i().useState(null),[T,_]=i().useState(!1),[F,S]=i().useState("boolean"!=typeof e.foreignKey?.cascadeDelete||e.foreignKey.cascadeDelete),[C,A]=i().useState("boolean"==typeof e.foreignKey?.cascadeUpdate&&e.foreignKey.cascadeUpdate);return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full mt-2 relative",style:{minWidth:"70px"},children:[T&&(0,l.jsx)(r.A,{}),(0,l.jsxs)("label",{htmlFor:"foreign_key_field",className:"flex flex-wrap items-center gap-2 mt-2",children:[(0,l.jsx)("span",{children:"Foreign Key?"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 rounded-full hover:bg-slate-100 hidden xl:flex text-slate-600",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:"Foriegn key links the current table to another table"})})]})]}),(0,l.jsxs)("select",{name:"foreign_key_field",id:"foreign_key_field",className:"px-2",defaultValue:e?.foreignKey?"Yes":"No",onChange:e=>{e.target.value.match(/yes/i)?(h(!0),a&&a(e=>(e.foreignKey={foreignKeyName:void 0,destinationTableName:void 0,destinationTableColumnName:void 0,cascadeDelete:!0},e))):(h(!1),a&&a(e=>(delete e.foreignKey,e)))},children:[(0,l.jsx)("option",{value:"No",children:"No"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"})]}),p&&f&&(0,l.jsx)(i().Fragment,{children:(0,l.jsxs)("select",{name:"foreign_key_destination_table_name",id:"foreign_key_destination_table_name",className:"px-2",defaultValue:e?.foreignKey?.destinationTableName?e.foreignKey.destinationTableName:void 0,onChange:e=>{let t=e.target;if(e.target.value?.match(/--/)){a?a(e=>{let a=e.foreignKey;return a&&(a.destinationTableName=void 0),e}):t.dataset.destinationTableName=void 0;return}let l=f.filter(a=>a.tableName===e.target.value)[0];v(l),l?.fields&&N(l.fields),a?a(a=>{let t=a.foreignKey;return t&&(t.destinationTableName=e.target.value),a}):e.target.dataset.destinationTableName=e.target.value},children:[(0,l.jsx)("option",{value:"--",children:"--Select Table--"}),f.map((e,a)=>(0,l.jsx)("option",{value:e.tableName,children:e.tableFullName},a+1))]})}),y&&j&&(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("select",{name:"foreign_key_destination_table_column_name",id:"foreign_key_destination_table_column_name",className:"px-2",defaultValue:e?.foreignKey?.destinationTableColumnName?e.foreignKey.destinationTableColumnName:void 0,onChange:e=>{try{let t=j.filter(a=>a.fieldName===e.target.value)[0];if(b(t),e.target.value?.match(/--/)){a&&a(e=>{let a=e.foreignKey;return a&&(a.destinationTableColumnName=void 0),e});return}let l=`dsql_${o.user_id}_${o.db_slug}_${Date.now()}`;a?a(e=>{e.dataType=t.dataType;let a=e.foreignKey;return a&&(a.destinationTableColumnName=t.fieldName,a.destinationTableColumnType=t.dataType,a.foreignKeyName=l),e}):(e.target.dataset.dataType=t.dataType,e.target.dataset.destinationTableColumnName=t.fieldName,e.target.dataset.foreignKeyName=l)}catch(e){(0,n.A)("/api/admin/clientError",{method:"post",body:{component:"ForeignKey/lines-232-264",message:e.message,user:u}})}},children:[(0,l.jsx)("option",{value:"--",children:"--Select Column--"}),j.map((e,a)=>(0,l.jsx)("option",{value:e.fieldName,children:e.fieldName},a+1))]}),x&&w&&(0,l.jsx)("button",{className:"secondary w-full",onClick:e=>{_(!0),(0,n.A)("/api/updateClonedTableForeignKeys",{method:"post",body:{tableData:c,database:o.db_full_name,dbSlug:o.db_slug,delegated:!!window.location?.search?.match(/delegated=true/i)}},!0).then(e=>{e.success?window.alert("Foreign Key Added Successfully!"):window.alert("Update Failed, Please Try again."),setTimeout(()=>{m&&m(!1)},1e3)})},children:"Add Foreign Key"}),(0,l.jsx)(d.A,{checkBoxValues:[{title:"Cascade Delete",default:F,name:"cascade-delete",onChangeHandler:e=>{S(e.target.checked)}},{title:"Cascade Update",name:"cascade-update",default:C,onChangeHandler:e=>{A(e.target.checked)}}],smallText:!0})]}),x&&(0,l.jsx)("button",{className:"light-gray w-full",onClick:a=>{delete e.foreignKey,m&&m(!1)},children:"Cancel"})]})}},36138:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({targetField:e}){return(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"rich_text_option",children:"Text Type"}),(0,l.jsxs)("select",{name:"rich_text_option",id:"rich_text_option",className:"px-2",onChange:a=>{switch(delete e.json,delete e.richText,delete e.yaml,delete e.html,delete e.javascript,delete e.shell,a.target.value){case"plain":break;case"rte":e.richText=!0;break;case"json":e.json=!0;break;case"yaml":e.yaml=!0;break;case"html":e.html=!0;break;case"css":e.css=!0;break;case"javascript":e.javascript=!0;break;case"shell":e.shell=!0}},defaultValue:e.richText?"rte":e.json?"json":e.yaml?"yaml":e.html?"html":e.javascript?"javascript":e.shell?"shell":e.css?"css":"plain",children:[(0,l.jsx)("option",{value:"plain",children:"Plain Text"}),(0,l.jsx)("option",{value:"rte",children:"Rich Text"}),(0,l.jsx)("option",{value:"json",children:"JSON"}),(0,l.jsx)("option",{value:"yaml",children:"YAML"}),(0,l.jsx)("option",{value:"html",children:"HTML"}),(0,l.jsx)("option",{value:"css",children:"CSS"}),(0,l.jsx)("option",{value:"javascript",children:"Javascript"}),(0,l.jsx)("option",{value:"shell",children:"Shell"})]})]})}t(82015)},60424:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(42960);function s({paradigm:e,table:a,query:t,user:s}){let i="";try{let s=`DSQL_${t.single}_${t.single_table}`.toUpperCase(),r=a.fields;function n(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let d=[],o=[];d.push(`type ${s} = {`),o.push(`/** + * @typedef {object} ${s}`),r.forEach(e=>{let a=e.nullValue?"?":e.fieldName?.match(l.A)?"?":"";d.push(` ${e.fieldName}${a}: ${n(e.dataType||"")};`),o.push(` * @property {${n(e.dataType||"")}${a}} ${e.fieldName}`)}),d.push("}"),o.push(" */"),e?.match(/javascript/i)&&(i=o.join("\n")),e?.match(/typescript/i)&&(i=d.join("\n"))}catch(e){console.log(e.message),i=null}return i}},2913:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({name:e,checkBoxValues:a,setAlert:t,labelColor:s,flexRow:i,baseText:n,smallText:r,className:d}){return(0,l.jsx)("div",{className:"flex items-start gap-x-4"+(i?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(d||""),children:a.map((a,i)=>{let{payload:d,title:o,onChangeHandler:c,fixed:u,jsx:m}=a,x=a.name?`${e}-${a.name}`:d?e+"-"+d:e;return(0,l.jsxs)("div",{className:"flex items-center"+(a.default&&u?" pointer-events-none":"")+(r?" gap-1 ":" gap-2 ")+(a?.className?a.className:""),children:[(0,l.jsx)("input",{className:"m-0"+(r?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!a.default,name:x,id:x,onChange:e=>{t&&t(null),c&&c(e,a)},value:d,style:{minWidth:"20px"},...a.props}),m||(0,l.jsx)("label",{htmlFor:x,className:"m-0 "+(s||"text-slate-800 dark:text-white/80")+(n||r?" text-base":" text-lg"),children:o})]},i+1)})})}t(82015)},51339:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({collapse:e,setCollapse:a}){return(0,l.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:t=>{e?a(!1):a(!0)},children:[(0,l.jsx)("span",{children:e?"Expand":"Collapse"}),(0,l.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,l.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}t(82015)},84483:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({children:e,open:a,setOpen:t,onClose:s,maxWidth:i}){return(0,l.jsx)(l.Fragment,{})}t(82015),t(1976),t(58150)},42960:(e,a,t)=>{t.d(a,{A:()=>l});let l=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},72272:(e,a,t)=>{t.d(a,{A:()=>d});var l=t(77047),s=t(29021),i=t.n(s),n=t(33873),r=t.n(n);function d({userId:e}){try{let a=r().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(i().readFileSync(a,"utf-8"))}catch(e){return(0,l.A)({component:"grabUserSchemaData",message:e.message}),null}}},77047:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(29021),s=t.n(l);async function i({user:e,message:a,component:t,noMail:l,req:i}){let n=new Date,r=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],a=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],l=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||l||a||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let l=`🚀 SERVER ERROR =========================== +Error Message: ${a} +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(l+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),i?.url&&(l+=` +URL: ${i.url}`),i?.body&&(l+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),r&&(l+=` +IP: ${r}`),l+=` +Date: ${n.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let d=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",l),s().appendFileSync("./.tmp/error.log",` + + + + +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/chunks/9914.js b/dsql-app/.local_dist/server/chunks/9914.js deleted file mode 100644 index 8ab21d4..0000000 --- a/dsql-app/.local_dist/server/chunks/9914.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict";exports.id=9914,exports.ids=[9914],exports.modules={95248:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>h});var r=t(8732),l=t(82015),n=t.n(l),o=t(58548),d=t(46437),i=t(63715),c=t(32415),u=t(77826),m=t(87730),p=e([m]);function h(e){let{singleUser:a,database:t,user:s}=n().useContext(m.SingleDbUserContext),l=Object.keys(a).filter(e=>!e.match(/^id$|^date_|^user_id$|^social_|^disk_usage|user_type/)),[p,h]=n().useState(!1),[g,_]=n().useState(a.image);return(0,r.jsxs)(n().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(d.A,{}),g&&(0,r.jsx)("img",{src:g,alt:"",className:"avatar large outlined"}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[a.first_name," ",a.last_name]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("a",{href:`/admin/${s?.id}/databases/${t.db_slug}/users/${a.id}/change-password`,className:"button outlined gray",children:"Change Password"}),(0,r.jsx)("button",{className:"bg-red-500",onClick:e=>{h(!0),window.confirm("Delete this user?")&&(0,i.A)("/api/deleteDbUser",{method:"post",body:{userId:a.id,dbFullName:t.db_full_name}},!0).then(e=>{e.success&&(window.location.pathname=`/admin/${s?.id}/databases/${t.db_slug}/users`)})},children:"Delete User"})]})]}),(0,r.jsx)(o.A,{user:s})]}),(0,r.jsxs)("section",{className:"paper",children:[p&&(0,r.jsx)(c.A,{}),(0,r.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,r.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:e=>{e.preventDefault(),h(!0);let s=e.target,r=Array.from(s),l={};r.forEach(e=>{!e?.nodeName?.match(/button/i)&&e?.name&&e?.value?.match(/./)&&(e?.name?.match(/username|email/)||(l[e.name]=e.value))});let n={dbFullName:t.db_full_name,payload:{...l,id:a.id}};(0,i.A)("/api/updateDbUser",{method:"post",body:n},!0).then(e=>{g?.imageBase64?(g.imageName=`${t.db_slug}-user-${a.id}`,g.mimeType="jpeg",delete g.imageBase64Full,(0,i.A)("/api/addUserMedia",{method:"post",body:{media:[g],folder:t.db_slug.replace(/_/g,"-"),type:"image"}},!0).then(e=>{e&&e.mediaData&&e.mediaData[0]?.media_url?(0,i.A)("/api/updateDbUser",{method:"post",body:{dbFullName:t.db_full_name,payload:{id:a.id,image:e.mediaData[0].media_url,image_thumbnail:e.mediaData[0].media_thumbnail_url}}},!0).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{h(!1)},500)}):window.location.reload()})):window.location.reload()})},children:[l.map((e,t)=>e?.match(/password|^database|email|username/)?(0,r.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,r.jsx)("label",{htmlFor:e,children:e}),(0,r.jsx)("input",{type:"text",name:e,id:e,value:a[e],placeholder:e,className:"opacity-40 pointer-events-none",onChange:e=>{e.preventDefault()}},t+1)]},t+1):e?.match(/more_user_data/)?(0,r.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,r.jsx)("label",{htmlFor:e,children:e}),(0,r.jsx)("textarea",{name:e,id:e,defaultValue:a[e]?a[e]:void 0,placeholder:e,rows:6},t+1)]},t+1):(0,r.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,r.jsx)("label",{htmlFor:e,children:e}),(0,r.jsx)("input",{type:"text",name:e,id:e,defaultValue:a[e]?a[e]:void 0,placeholder:e},t+1)]},t+1)),(0,r.jsxs)("div",{className:"border border-slate-300 dark:border-slate-600 border-solid bg-slate-100 dark:bg-slate-700 rounded p-6 flex-col items-start w-full",children:[(0,r.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"Update Image"}),(0,r.jsx)(u.A,{userImage:g,setUserImage:_,className:"w-full"})]}),(0,r.jsx)("button",{children:"Update User"})]})})]})]})}m=(p.then?(await p)():p)[0],s()}catch(e){s(e)}})},31651:(e,a,t)=>{t(81630);let s=t(77463);e.exports=async function({request:e,databaseSlug:a,user:t,query:r}){try{let l=t.id,n=null;if(!r?.delegated)return{dbUserId:l};let o=r.dbUserId,d=`${process.env.DSQL_USER_DB_PREFIX}${o}_${a}`,i=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${d}`;try{if(!e.cookies?.[i])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[i]});if(!t)throw Error("Invalid Token");if((n=JSON.parse(t)).databaseSlug===a)return{dbUserId:l=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},96089:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},25088:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},71296:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},98136:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},89545:(e,a,t)=>{let s=t(77463),r=t(68743);e.exports=async function({unparsedResults:e,tableSchema:a}){let t=[];try{for(let l=0;l",a.message),e}}},22373:(e,a,t)=>{let s=t(29021),{IncomingMessage:r}=t(81630);e.exports=async function({user:e,message:a,component:t,noMail:r,req:l}){let n=new Date,o=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],a=l.headers["x-real-ip"],t=l.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],r=t||s||a||l.socket.remoteAddress;if(!r)return null;return String(r)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== -Error Message: ${a} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),l?.url&&(r+=` -URL: ${l.url}`),l?.body&&(r+=` -Request Body: ${JSON.stringify(l.body,null,4)}`),o&&(r+=` -IP: ${o}`),r+=` -Date: ${n.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let d=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",r),s.appendFileSync("./.tmp/error.log",` - - - - -${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},90378:(e,a,t)=>{t(29021);let s=t(89545),r=t(22373),l=t(67216),n=t(1231),o=t(88896);e.exports=async function({queryString:e,queryValuesArray:a,database:t,tableSchema:d,useLocal:i}){let c;let u=!!i||!!t?.match(/^datasquirel$/),m=i?o:u?l:n;try{c=e&&a&&Array.isArray(a)&&a[0]?u?await m(e,a):await m({paradigm:"Full Access",database:t,queryString:e,queryValues:a}):u?await m(e):await m({paradigm:"Full Access",database:t,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&d)try{let e=c;return await s({unparsedResults:e,tableSchema:d})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},1231:(e,a,t)=>{let s=t(29021);t(33873);let r=t(9973),l=t(31976),n=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:l()}});e.exports=function({paradigm:e,database:a,queryString:t,queryValues:o}){try{return new Promise((d,i)=>{let c=!!e?.match(/full.access|^fa$/i);try{function u(e){n.end(),d(JSON.parse(JSON.stringify(e)))}function m(e){n.end(),d({error:e.message,queryStringGenerated:t,queryValuesGenerated:o,sql:e.sql})}n=c?r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:a,ssl:l()}}):r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:a,ssl:l()}}),o&&Array.isArray(o)&&o[0]?n.query(t,o).then(u).catch(m):n.query(t).then(u).catch(m)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),d({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,a,t)=>{let s=t(9973),r=t(31976);async function l(...e){let a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=l},87730:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.r(a),t.d(a,{SingleDbUserContext:()=>D,default:()=>f,getServerSideProps:()=>S});var r=t(8732),l=t(82015),n=t.n(l),o=t(95222),d=t(20048),i=t.n(d),c=t(64098),u=t(31651),m=t.n(u),p=t(95248),h=t(67216),g=t.n(h),_=t(90378),y=t.n(_),b=e([c,p]);[c,p]=b.then?(await b)():b;let x=t(29021),D=n().createContext({});function f({user:e,database:a,table:t,dbSchemaData:s,singleUser:l,query:n,confirmedDelegetedUser:d}){let i=`${l.first_name} ${l.last_name} Users | Datasquirel"`,u=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:i}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(o.A,{head:u,user:e,extraHeaderContent:(0,r.jsx)(c.A,{database:a,query:n,confirmedDelegetedUser:d,user:e}),children:(0,r.jsx)(D.Provider,{value:{user:e,database:a,table:t,dbSchemaData:s,singleUser:l,query:n,confirmedDelegetedUser:d},children:(0,r.jsx)(p.A,{})})})}async function S({req:e,res:a,query:t}){let s=await i()(e,a);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await m()({request:e,user:s,databaseSlug:t.single,query:t});if(!r)return{redirect:{destination:"/admin",permanent:!1}};let{dbUserId:l,rootUserId:n}=r,o=await g()(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${t.single}'`);if(!o||!o[0])return console.log("Database Not Found"),{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let d=JSON.parse(x.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l}/main.json`,"utf-8")),c=(d.filter(e=>e.dbFullName===o[0].db_full_name)[0]?.tables).filter(e=>"users"===e.tableName)[0],u=await y()({database:o[0].db_full_name,queryString:`SELECT * FROM users WHERE id='${t.user}'`,tableSchema:c});return u?.[0]?{props:{user:s,database:o?.[0]||null,table:c||{},dbSchemaData:d,singleUser:u?.[0]||null,query:t,confirmedDelegetedUser:r}}:{redirect:{destination:`/admin/${s?.id}/databases/${o[0].db_slug}/users`,permanent:!1}}}s()}catch(e){s(e)}})}}; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/dynamic-css-manifest.js b/dsql-app/.local_dist/server/dynamic-css-manifest.js new file mode 100644 index 0000000..8df9f6b --- /dev/null +++ b/dsql-app/.local_dist/server/dynamic-css-manifest.js @@ -0,0 +1 @@ +self.__DYNAMIC_CSS_MANIFEST="[]"; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/middleware-build-manifest.js b/dsql-app/.local_dist/server/middleware-build-manifest.js index 4ae0725..5d75d40 100644 --- a/dsql-app/.local_dist/server/middleware-build-manifest.js +++ b/dsql-app/.local_dist/server/middleware-build-manifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:[],rootMainFilesTree:{},pages:{"/":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9654-a0de90f5592a8262.js","static/css/60c48dd4b3301227.css","static/chunks/pages/index-55aca6f5ee5ea4e8.js"],"/404":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/404-1eace598915739ef.js"],"/500":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/500-f40435ff099c3bec.js"],"/_app":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/css/40a7197d287e4ac0.css","static/chunks/pages/_app-946b7f00d529ca86.js"],"/_error":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/_error-133b121cd6670ef3.js"],"/about":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9654-a0de90f5592a8262.js","static/chunks/pages/about-35029bb377afcb90.js"],"/admin":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/3616-7b41eb08ff52c809.js","static/chunks/820-c223e3d64da3f271.js","static/chunks/pages/admin-efa0744f5c14dc87.js"],"/admin/[user_id]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/3616-7b41eb08ff52c809.js","static/chunks/820-c223e3d64da3f271.js","static/chunks/pages/admin/[user_id]-7a323a8952bfcc9e.js"],"/admin/[user_id]/api-keys":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/pages/admin/[user_id]/api-keys-2041b6f22085abeb.js"],"/admin/[user_id]/connect":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/pages/admin/[user_id]/connect-b54a7d4366e0f783.js"],"/admin/[user_id]/databases":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/3616-7b41eb08ff52c809.js","static/chunks/pages/admin/[user_id]/databases-6b7a3f30d592000d.js"],"/admin/[user_id]/databases/[single]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/pages/admin/[user_id]/databases/[single]-63b295eb9207c913.js"],"/admin/[user_id]/databases/[single]/connect":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/pages/admin/[user_id]/databases/[single]/connect-f0141d41d59a8f0e.js"],"/admin/[user_id]/databases/[single]/edit-database":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/6052-1f9ca3a7d2d16828.js","static/chunks/pages/admin/[user_id]/databases/[single]/edit-database-c1da7cdcca0eeaec.js"],"/admin/[user_id]/databases/[single]/schema":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/6052-1f9ca3a7d2d16828.js","static/chunks/pages/admin/[user_id]/databases/[single]/schema-135fad70f63d5f99.js"],"/admin/[user_id]/databases/[single]/shell":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/pages/admin/[user_id]/databases/[single]/shell-80b1f573d72d1634.js"],"/admin/[user_id]/databases/[single]/tables":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables-ae83bb65c1facc24.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/8717-aea4be023740276e.js","static/chunks/1391-727762e25412e6d0.js","static/chunks/2413-5357ac7638ad8ed0.js","static/chunks/2004-64a7cf1362719c72.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/6156-e0dcf7d8f002ae4a.js","static/chunks/2163-2888548322298e53.js","static/chunks/6460-3f63007c03118fc2.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]-1d13e3c577038b39.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/8717-aea4be023740276e.js","static/chunks/2413-5357ac7638ad8ed0.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/6156-e0dcf7d8f002ae4a.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table-d8262158ddb6bfc2.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/entries":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/8717-aea4be023740276e.js","static/chunks/1391-727762e25412e6d0.js","static/chunks/2004-64a7cf1362719c72.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/2163-2888548322298e53.js","static/chunks/6460-3f63007c03118fc2.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries-ed4516e967a3f21e.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/8717-aea4be023740276e.js","static/chunks/1391-727762e25412e6d0.js","static/chunks/2004-64a7cf1362719c72.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/2163-2888548322298e53.js","static/chunks/6460-3f63007c03118fc2.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]-380611fd56aa33ad.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/1391-727762e25412e6d0.js","static/chunks/8779-930a59d1d1a1be5c.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/2163-2888548322298e53.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry-8d261204cffa33a9.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/fields":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/8717-aea4be023740276e.js","static/chunks/2413-5357ac7638ad8ed0.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/6156-e0dcf7d8f002ae4a.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields-fc4b3b32a4c7dff4.js"],"/admin/[user_id]/databases/[single]/tables/add-table":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/8717-aea4be023740276e.js","static/chunks/2413-5357ac7638ad8ed0.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/6156-e0dcf7d8f002ae4a.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/add-table-3d1f0a6e9693f671.js"],"/admin/[user_id]/databases/[single]/users":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/6836-b267904eb7c540d4.js","static/chunks/3857-402e95bd26a58769.js","static/chunks/pages/admin/[user_id]/databases/[single]/users-9ef5271e62eabede.js"],"/admin/[user_id]/databases/[single]/users/[user]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/4565-e849d55f03e474f9.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]-817858a3ef1cccd2.js"],"/admin/[user_id]/databases/[single]/users/[user]/change-password":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]/change-password-04a47157d95b361b.js"],"/admin/[user_id]/databases/[single]/users/add-social-logins":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/4565-e849d55f03e474f9.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/add-social-logins-660f9e475f68c717.js"],"/admin/[user_id]/databases/[single]/users/add-user":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/304-2b6b4eb0adbbac90.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/4565-e849d55f03e474f9.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/add-user-18b8b63b1ba1c13d.js"],"/admin/[user_id]/databases/add-database":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/9799-abc615966398fac4.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/6052-1f9ca3a7d2d16828.js","static/chunks/pages/admin/[user_id]/databases/add-database-fa3778d6e9bfcc7e.js"],"/admin/[user_id]/media":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/5256-56bdbb8f4109cb29.js","static/chunks/pages/admin/[user_id]/media-57a5450a842bec23.js"],"/admin/[user_id]/media/[...folder]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/5256-56bdbb8f4109cb29.js","static/chunks/pages/admin/[user_id]/media/[...folder]-fd2a6d34d0e1b059.js"],"/admin/[user_id]/schema":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/9799-abc615966398fac4.js","static/chunks/pages/admin/[user_id]/schema-22f39a31e6fc9598.js"],"/admin/[user_id]/settings":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/9799-abc615966398fac4.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/5160-1036ca7a8eaeebea.js","static/chunks/3616-7b41eb08ff52c809.js","static/chunks/9907-e7e1d036d8444890.js","static/chunks/820-c223e3d64da3f271.js","static/chunks/4147-cebaebce870b5fb7.js","static/chunks/pages/admin/[user_id]/settings-5a657bc8977fb7f7.js"],"/admin/[user_id]/users":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/3857-402e95bd26a58769.js","static/chunks/pages/admin/[user_id]/users-9947b884dd45464d.js"],"/admin/[user_id]/users/add-user":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/pages/admin/[user_id]/users/add-user-b34fda15345c38b4.js"],"/admin/[user_id]/users/databases":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/3857-402e95bd26a58769.js","static/chunks/pages/admin/[user_id]/users/databases-4066874afcb57801.js"],"/admin/[user_id]/users/databases/[database]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/3857-402e95bd26a58769.js","static/chunks/pages/admin/[user_id]/users/databases/[database]-962b42a10b98dda3.js"],"/admin/[user_id]/users/databases/[database]/[user]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9799-abc615966398fac4.js","static/chunks/4565-e849d55f03e474f9.js","static/chunks/pages/admin/[user_id]/users/databases/[database]/[user]-2da2075136778947.js"],"/blog":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/blog-86a57f87f960d208.js"],"/contact":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/contact-cd1dacd74efe270e.js"],"/create-account":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9907-e7e1d036d8444890.js","static/chunks/4147-cebaebce870b5fb7.js","static/chunks/pages/create-account-93cce1fe65377589.js"],"/docs":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/docs-21d1067cb26803ef.js"],"/docs/[page]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/docs/[page]-f26a582ab816687d.js"],"/docs/[page]/[sub-page]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/docs/[page]/[sub-page]-d986893c235e6d5b.js"],"/email-verification":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/email-verification-b622c0527271a373.js"],"/login":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/9907-e7e1d036d8444890.js","static/chunks/pages/login-4cd0b4a8e9124058.js"],"/logout":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/logout-b8a4207f3314e897.js"],"/privacy":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/privacy-85269bae0ca39885.js"],"/redirect":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/redirect-f5ba2244ad574804.js"],"/reset-password":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/29107295-a5c0cca9b8761d61.js","static/chunks/pages/reset-password-bf3706a70e969a34.js"],"/send-password-reset-link":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/send-password-reset-link-40c349141dc68707.js"],"/su":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su-aef540ca8a9d0d26.js"],"/su/backups":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su/backups-515e155cc25fc6e2.js"],"/su/console":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/ed150ef9-468dbc55986083e4.js","static/chunks/2793-2960a1457850c87f.js","static/chunks/2016-d9bbef83b5278263.js","static/css/85fa6dafca566008.css","static/chunks/pages/su/console-b4070a91c4a61e92.js"],"/su/docs":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/5165-f1a837469292e394.js","static/chunks/pages/su/docs-2d31693f0537ec1b.js"],"/su/docs/create-page":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/1391-727762e25412e6d0.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/3061-4daacb81cd42c700.js","static/chunks/6803-fe4ad60e4db387da.js","static/chunks/pages/su/docs/create-page-e5da0607ae76879e.js"],"/su/docs/edit-page":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/1391-727762e25412e6d0.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/3061-4daacb81cd42c700.js","static/chunks/6803-fe4ad60e4db387da.js","static/chunks/pages/su/docs/edit-page-19991b2455a27bda.js"],"/su/docs/pages":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/5165-f1a837469292e394.js","static/chunks/pages/su/docs/pages-09cc22003ca2977d.js"],"/su/docs/pages/[id]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/1391-727762e25412e6d0.js","static/chunks/5414-904c4e3b277b1a40.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/3061-4daacb81cd42c700.js","static/chunks/6803-fe4ad60e4db387da.js","static/chunks/pages/su/docs/pages/[id]-aa63805a266c145f.js"],"/su/envar":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su/envar-cf23a0d85f1b95f7.js"],"/su/error-logs":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su/error-logs-bd760a695db3aa94.js"],"/su/load-balancing":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su/load-balancing-0968f396408769a2.js"],"/su/login":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/su/login-9f0c33ff7a724b80.js"],"/su/servers":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su/servers-9c5cb37918bc40b1.js"],"/su/users":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su/users-bb0e572a5ae16760.js"],"/su/users/[single]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/8717-aea4be023740276e.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/3061-4daacb81cd42c700.js","static/chunks/pages/su/users/[single]-77865aec8f94f04d.js"],"/su/users/new":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/2016-d9bbef83b5278263.js","static/chunks/pages/su/users/new-7f43159b182edbb0.js"],"/terms":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/terms-02b626fbae43ff93.js"],"/unsubscribe":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-898697981b1ca118.js","static/chunks/main-36f93e1764e6ea94.js","static/chunks/pages/unsubscribe-60eb94424d6846c1.js"]},ampFirstPages:[]},self.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"]; \ No newline at end of file +self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:[],rootMainFilesTree:{},pages:{"/":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/3298-73758aefe44233a6.js","static/css/60c48dd4b3301227.css","static/chunks/pages/index-d8f75819eb449ffc.js"],"/404":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/404-386ef30594132ecb.js"],"/500":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/500-81f6b715960091f2.js"],"/_app":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/css/40a7197d287e4ac0.css","static/chunks/pages/_app-f20525907c2f070a.js"],"/_error":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/_error-133b121cd6670ef3.js"],"/about":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/3298-73758aefe44233a6.js","static/chunks/pages/about-69331c972566352a.js"],"/admin":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/9950-e6be92fc61deb6e3.js","static/chunks/pages/admin-eaa52fa698c19034.js"],"/admin/[user_id]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/9950-e6be92fc61deb6e3.js","static/chunks/pages/admin/[user_id]-61bef31d3a4e9e7a.js"],"/admin/[user_id]/api-keys":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/pages/admin/[user_id]/api-keys-2c8109e5388827d9.js"],"/admin/[user_id]/connect":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/pages/admin/[user_id]/connect-40047d3fd5229513.js"],"/admin/[user_id]/databases":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/9950-e6be92fc61deb6e3.js","static/chunks/pages/admin/[user_id]/databases-23779acb61fbe51a.js"],"/admin/[user_id]/databases/[single]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/pages/admin/[user_id]/databases/[single]-05dbbed42a310967.js"],"/admin/[user_id]/databases/[single]/connect":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/pages/admin/[user_id]/databases/[single]/connect-3a065ea39acafd03.js"],"/admin/[user_id]/databases/[single]/edit-database":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/3867-6732c13e333b30b2.js","static/chunks/pages/admin/[user_id]/databases/[single]/edit-database-1f2bf0df5f51fa43.js"],"/admin/[user_id]/databases/[single]/schema":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/pages/admin/[user_id]/databases/[single]/schema-8b9d66b8d3cb2a1a.js"],"/admin/[user_id]/databases/[single]/shell":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/pages/admin/[user_id]/databases/[single]/shell-dff01c9e4cff1d7e.js"],"/admin/[user_id]/databases/[single]/tables":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables-48fec207563f61d7.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/9660-628b42bc1127aefa.js","static/chunks/6460-ab4ab8caec784ffc.js","static/chunks/2829-608af754738e12fc.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/8311-ae577d4bb030d416.js","static/chunks/1580-68f706d212c5eb63.js","static/chunks/6830-80ccce098977dfd6.js","static/chunks/4403-fc19b6af6ca4b3fe.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]-f34ee3fd9517cd2c.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/6460-ab4ab8caec784ffc.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/8311-ae577d4bb030d416.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table-38aa98661e043781.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/entries":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/9660-628b42bc1127aefa.js","static/chunks/2829-608af754738e12fc.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/1580-68f706d212c5eb63.js","static/chunks/6830-80ccce098977dfd6.js","static/chunks/4403-fc19b6af6ca4b3fe.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries-e611979837269e2d.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/9660-628b42bc1127aefa.js","static/chunks/2829-608af754738e12fc.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/1580-68f706d212c5eb63.js","static/chunks/6830-80ccce098977dfd6.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]-7bbd383a24ee015d.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/9660-628b42bc1127aefa.js","static/chunks/7287-dadce6acb3d43d67.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/1580-68f706d212c5eb63.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry-e609e60d52830241.js"],"/admin/[user_id]/databases/[single]/tables/[single_table]/fields":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/6460-ab4ab8caec784ffc.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/8311-ae577d4bb030d416.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields-ab177e1e5adacaef.js"],"/admin/[user_id]/databases/[single]/tables/add-table":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/94726e6d-33de6887e71ace1a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/6460-ab4ab8caec784ffc.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/8311-ae577d4bb030d416.js","static/chunks/pages/admin/[user_id]/databases/[single]/tables/add-table-e39fba476a9e1ad8.js"],"/admin/[user_id]/databases/[single]/users":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/2438-aa7e9f2130cd81f0.js","static/chunks/6383-02bec644b1a9f0a8.js","static/chunks/pages/admin/[user_id]/databases/[single]/users-5b8dd72d94432cb8.js"],"/admin/[user_id]/databases/[single]/users/[user]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]-f062b4d0b80557a7.js"],"/admin/[user_id]/databases/[single]/users/[user]/change-password":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/[user]/change-password-5c6ae113aee79d1d.js"],"/admin/[user_id]/databases/[single]/users/add-social-logins":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/add-social-logins-dcc54bfad6c4818a.js"],"/admin/[user_id]/databases/[single]/users/add-user":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/8076-c34ce8d8512255e7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/pages/admin/[user_id]/databases/[single]/users/add-user-6d9f5bb6c681b082.js"],"/admin/[user_id]/databases/add-database":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/3867-6732c13e333b30b2.js","static/chunks/pages/admin/[user_id]/databases/add-database-276c7177adf6be55.js"],"/admin/[user_id]/media":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/2480-c3f2e7fac796ce00.js","static/chunks/pages/admin/[user_id]/media-29e4886d0c31d5c3.js"],"/admin/[user_id]/media/[...folder]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/2480-c3f2e7fac796ce00.js","static/chunks/pages/admin/[user_id]/media/[...folder]-c8df7e4d1118eb40.js"],"/admin/[user_id]/schema":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/pages/admin/[user_id]/schema-2ab99d8d3c163b57.js"],"/admin/[user_id]/settings":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/6999-765fb1dc8daf2756.js","static/chunks/4060-34ac8bf5371932b9.js","static/chunks/pages/admin/[user_id]/settings-203cb6b64dc51850.js"],"/admin/[user_id]/users":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/6383-02bec644b1a9f0a8.js","static/chunks/pages/admin/[user_id]/users-52b7048018746ac0.js"],"/admin/[user_id]/users/add-user":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/pages/admin/[user_id]/users/add-user-2423cd3e4b75b0ee.js"],"/admin/[user_id]/users/databases":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/6383-02bec644b1a9f0a8.js","static/chunks/pages/admin/[user_id]/users/databases-ef511feca7c10b56.js"],"/admin/[user_id]/users/databases/[database]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/6383-02bec644b1a9f0a8.js","static/chunks/pages/admin/[user_id]/users/databases/[database]-76e13995132a5d19.js"],"/admin/[user_id]/users/databases/[database]/[user]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/8261-3c3582fc434ee275.js","static/chunks/7391-b72414be460cf0f0.js","static/chunks/pages/admin/[user_id]/users/databases/[database]/[user]-096740ae36fd55b2.js"],"/blog":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/blog-8c70d46c8352664e.js"],"/contact":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/contact-f2a4f3c2e97b25fb.js"],"/create-account":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6999-765fb1dc8daf2756.js","static/chunks/4060-34ac8bf5371932b9.js","static/chunks/pages/create-account-59f89a25241640f4.js"],"/docs":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/docs-5ec48702f4389bb8.js"],"/docs/[page]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/docs/[page]-da7ad3c132fd4976.js"],"/docs/[page]/[sub-page]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/docs/[page]/[sub-page]-73abfdd601bfe01c.js"],"/email-verification":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/email-verification-fec9fecfdcb56e8d.js"],"/login":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6999-765fb1dc8daf2756.js","static/chunks/pages/login-f10f3645e54e61fd.js"],"/logout":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/logout-60a2b37f5fe2427f.js"],"/privacy":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/privacy-3a1d5e267140271e.js"],"/redirect":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/redirect-28627072d73850c2.js"],"/reset-password":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/reset-password-404836a50d6e9e32.js"],"/send-password-reset-link":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/send-password-reset-link-01b2509dfe7be8b2.js"],"/su":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su-56e8a64a3be59f73.js"],"/su/backups":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/backups-033362c47c6541f4.js"],"/su/console":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/ed150ef9-468dbc55986083e4.js","static/chunks/2793-d85659f470ce8842.js","static/chunks/5810-7c3a3c4731750dc7.js","static/css/85fa6dafca566008.css","static/chunks/pages/su/console-c8b9bd49e5191033.js"],"/su/docs":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/6099-150cc189810f2bfd.js","static/chunks/pages/su/docs-49dc94fa2828f090.js"],"/su/docs/create-page":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/9660-628b42bc1127aefa.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/4261-1181ad7559234ce0.js","static/chunks/pages/su/docs/create-page-3b58b3bb388f340b.js"],"/su/docs/edit-page":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/9660-628b42bc1127aefa.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/4261-1181ad7559234ce0.js","static/chunks/pages/su/docs/edit-page-85a0ca0be5537063.js"],"/su/docs/pages":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/6099-150cc189810f2bfd.js","static/chunks/pages/su/docs/pages-2a88e2094d85ce52.js"],"/su/docs/pages/[id]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/9660-628b42bc1127aefa.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/9268-6ca91a807cecf2b4.js","static/chunks/4261-1181ad7559234ce0.js","static/chunks/pages/su/docs/pages/[id]-4d39f3debc44f352.js"],"/su/envar":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/envar-8c4d450d1932f9d6.js"],"/su/error-logs":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/error-logs-d4ffbb81ddac6cec.js"],"/su/load-balancing":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/load-balancing-d0b790d61a50a4ef.js"],"/su/login":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/su/login-218c9150552b8800.js"],"/su/servers":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/servers-d48477ad4489744d.js"],"/su/users":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/users-519384d02df33446.js"],"/su/users/[single]":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/6428-c106bf6efb539d8c.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/users/[single]-a95d897a2dad7f62.js"],"/su/users/new":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/5810-7c3a3c4731750dc7.js","static/chunks/pages/su/users/new-8a739402db28044b.js"],"/terms":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/terms-37fb4519d728aa13.js"],"/unsubscribe":["static/chunks/webpack-5381863dc66a9c32.js","static/chunks/framework-5f43af1a76a0211a.js","static/chunks/main-96e9b4333635008a.js","static/chunks/pages/unsubscribe-e6a608d5b8cea536.js"]},ampFirstPages:[]},self.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"]; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages-manifest.json b/dsql-app/.local_dist/server/pages-manifest.json index 58cf7df..0249b3e 100644 --- a/dsql-app/.local_dist/server/pages-manifest.json +++ b/dsql-app/.local_dist/server/pages-manifest.json @@ -1 +1 @@ -{"/_app":"pages/_app.js","/_error":"pages/_error.js","/_document":"pages/_document.js","/":"pages/index.html","/admin/[user_id]/media":"pages/admin/[user_id]/media.js","/admin/[user_id]/api-keys":"pages/admin/[user_id]/api-keys.js","/admin/[user_id]/databases":"pages/admin/[user_id]/databases.js","/404":"pages/404.html","/admin/[user_id]":"pages/admin/[user_id].js","/500":"pages/500.html","/api/acceptUserInvitation":"pages/api/acceptUserInvitation.js","/api/addAdminUserUser":"pages/api/addAdminUserUser.js","/api/addApiKey":"pages/api/addApiKey.js","/api/addDbUser":"pages/api/addDbUser.js","/api/addNewMediaFolder":"pages/api/addNewMediaFolder.js","/api/addUserTable":"pages/api/addUserTable.js","/api/addSocialLogin":"pages/api/addSocialLogin.js","/api/addUserUser":"pages/api/addUserUser.js","/api/addTableEntry":"pages/api/addTableEntry.js","/api/addUsersTableToDatabase":"pages/api/addUsersTableToDatabase.js","/api/admin/addUserBackup":"pages/api/admin/addUserBackup.js","/api/admin/clearErrorLogs":"pages/api/admin/clearErrorLogs.js","/api/admin/docs/[action]":"pages/api/admin/docs/[action].js","/api/admin/clientError":"pages/api/admin/clientError.js","/api/admin/getTablesForUserDatabase":"pages/api/admin/getTablesForUserDatabase.js","/api/admin/createNewBackup":"pages/api/admin/createNewBackup.js","/api/admin/getUserBackups":"pages/api/admin/getUserBackups.js","/api/admin/getUserData":"pages/api/admin/getUserData.js","/api/admin/grabBackups":"pages/api/admin/grabBackups.js","/api/admin/loginSuUser":"pages/api/admin/loginSuUser.js","/api/admin/grabFile":"pages/api/admin/grabFile.js","/api/admin/grabErrorLogs":"pages/api/admin/grabErrorLogs.js","/api/admin/runUserDbQuery":"pages/api/admin/runUserDbQuery.js","/api/admin/updateEnv":"pages/api/admin/updateEnv.js","/api/checkDuplicateData":"pages/api/checkDuplicateData.js","/api/changeDbUserPassword":"pages/api/changeDbUserPassword.js","/api/clientSideAuth":"pages/api/clientSideAuth.js","/api/checkExistingFolder":"pages/api/checkExistingFolder.js","/api/connect/handshake":"pages/api/connect/handshake.js","/api/connect/disconnect":"pages/api/connect/disconnect.js","/api/connect":"pages/api/connect.js","/api/connect/verify":"pages/api/connect/verify.js","/api/contact":"pages/api/contact.js","/api/createUserDatabase":"pages/api/createUserDatabase.js","/api/deleteApiKey":"pages/api/deleteApiKey.js","/api/deleteDbUser":"pages/api/deleteDbUser.js","/api/deleteInvitation":"pages/api/deleteInvitation.js","/api/deleteTableEntry":"pages/api/deleteTableEntry.js","/api/deleteUser":"pages/api/deleteUser.js","/api/deleteMediaFolder":"pages/api/deleteMediaFolder.js","/api/deleteUserDatabase":"pages/api/deleteUserDatabase.js","/api/deleteUserMedia":"pages/api/deleteUserMedia.js","/api/deleteUserTable":"pages/api/deleteUserTable.js","/api/deleteUserUser":"pages/api/deleteUserUser.js","/api/downloadDatabaseSchema":"pages/api/downloadDatabaseSchema.js","/api/exportDatabase":"pages/api/exportDatabase.js","/api/fetch-entries-basic":"pages/api/fetch-entries-basic.js","/api/get-authorized-databases":"pages/api/get-authorized-databases.js","/api/getDelegatedDatabaseToken":"pages/api/getDelegatedDatabaseToken.js","/api/getDatabaseTables":"pages/api/getDatabaseTables.js","/api/getDiskUsage":"pages/api/getDiskUsage.js","/api/getDelegatedDatabases":"pages/api/getDelegatedDatabases.js","/api/getUserDatabaseTables":"pages/api/getUserDatabaseTables.js","/api/getUserMedia":"pages/api/getUserMedia.js","/api/getUserDatabases":"pages/api/getUserDatabases.js","/api/getUserSchemaData":"pages/api/getUserSchemaData.js","/api/healthcheck":"pages/api/healthcheck.js","/api/importDatabase":"pages/api/importDatabase.js","/api/infiniteScroll":"pages/api/infiniteScroll.js","/api/loginUser":"pages/api/loginUser.js","/api/importDatabaseSchema":"pages/api/importDatabaseSchema.js","/api/logoutUser":"pages/api/logoutUser.js","/api/media/addPrivateMedia":"pages/api/media/addPrivateMedia.js","/api/media/getPrivateMedia":"pages/api/media/getPrivateMedia.js","/api/purgeDb":"pages/api/purgeDb.js","/api/query/[user_id]/get":"pages/api/query/[user_id]/get.js","/api/query/[user_id]/get-schema":"pages/api/query/[user_id]/get-schema.js","/api/query/[user_id]/update-schema-from-single-database":"pages/api/query/[user_id]/update-schema-from-single-database.js","/api/reAuthenticateUser":"pages/api/reAuthenticateUser.js","/api/refreshEntry":"pages/api/refreshEntry.js","/api/queryEntriesSearchTerm":"pages/api/queryEntriesSearchTerm.js","/api/registerUser":"pages/api/registerUser.js","/api/renameMedia":"pages/api/renameMedia.js","/api/resetDelegatedDatabaseToken":"pages/api/resetDelegatedDatabaseToken.js","/api/resetPassword":"pages/api/resetPassword.js","/api/runUserDbQuery":"pages/api/runUserDbQuery.js","/api/sendEmailVerificationLink":"pages/api/sendEmailVerificationLink.js","/api/sendPasswordResetLink":"pages/api/sendPasswordResetLink.js","/api/social-login/github-auth":"pages/api/social-login/github-auth.js","/api/social-login/facebook-auth":"pages/api/social-login/facebook-auth.js","/api/social-login/google-auth":"pages/api/social-login/google-auth.js","/api/social-login/utils/checkEmail":"pages/api/social-login/utils/checkEmail.js","/api/social-login/utils/checkSocialId":"pages/api/social-login/utils/checkSocialId.js","/api/social-login/utils/getEmailFromSocialId":"pages/api/social-login/utils/getEmailFromSocialId.js","/api/sql-users/delete":"pages/api/sql-users/delete.js","/api/sql-users/create":"pages/api/sql-users/create.js","/api/sql-users/update":"pages/api/sql-users/update.js","/api/sync-table-data":"pages/api/sync-table-data.js","/api/stream/[path]":"pages/api/stream/[path].js","/api/test/mail":"pages/api/test/mail.js","/api/test/cors":"pages/api/test/cors.js","/api/unsubscribe":"pages/api/unsubscribe.js","/api/updateAdminUserAccess":"pages/api/updateAdminUserAccess.js","/api/updateClonedTableForeignKeys":"pages/api/updateClonedTableForeignKeys.js","/api/updateDbUser":"pages/api/updateDbUser.js","/api/updateDbSchemaDataForUser":"pages/api/updateDbSchemaDataForUser.js","/api/updateUser":"pages/api/updateUser.js","/api/updateTableEntry":"pages/api/updateTableEntry.js","/api/updateUserDatabase":"pages/api/updateUserDatabase.js","/api/updateUserTable":"pages/api/updateUserTable.js","/api/updateUserUser":"pages/api/updateUserUser.js","/api/user-schema/replace-database-schema":"pages/api/user-schema/replace-database-schema.js","/api/user/[user_id]/get-user":"pages/api/user/[user_id]/get-user.js","/api/user/[user_id]/delete-user":"pages/api/user/[user_id]/delete-user.js","/api/user/[user_id]/github-login":"pages/api/user/[user_id]/github-login.js","/api/user/[user_id]/add-user":"pages/api/user/[user_id]/add-user.js","/api/user/[user_id]/google-login":"pages/api/user/[user_id]/google-login.js","/api/user/[user_id]/login-user":"pages/api/user/[user_id]/login-user.js","/api/user/[user_id]/grab-google-user-from-token":"pages/api/user/[user_id]/grab-google-user-from-token.js","/api/user/[user_id]/reauth-user":"pages/api/user/[user_id]/reauth-user.js","/api/user/[user_id]/update-user":"pages/api/user/[user_id]/update-user.js","/api/webhooks/github-push":"pages/api/webhooks/github-push.js","/api/user/[user_id]/send-email-code":"pages/api/user/[user_id]/send-email-code.js","/about":"pages/about.html","/admin/[user_id]/connect":"pages/admin/[user_id]/connect.js","/admin/[user_id]/databases/[single]/edit-database":"pages/admin/[user_id]/databases/[single]/edit-database.js","/admin/[user_id]/databases/[single]/connect":"pages/admin/[user_id]/databases/[single]/connect.js","/admin/[user_id]/databases/[single]/shell":"pages/admin/[user_id]/databases/[single]/shell.js","/admin/[user_id]/databases/[single]":"pages/admin/[user_id]/databases/[single].js","/admin/[user_id]/databases/[single]/schema":"pages/admin/[user_id]/databases/[single]/schema.js","/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js","/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js","/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js","/admin/[user_id]/databases/[single]/tables/[single_table]/fields":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js","/admin/[user_id]/databases/[single]/tables/[single_table]/entries":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js","/admin/[user_id]/databases/[single]/tables/[single_table]":"pages/admin/[user_id]/databases/[single]/tables/[single_table].js","/admin/[user_id]/databases/[single]/tables/add-table":"pages/admin/[user_id]/databases/[single]/tables/add-table.js","/admin/[user_id]/databases/[single]/users/[user]/change-password":"pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js","/admin/[user_id]/databases/[single]/tables":"pages/admin/[user_id]/databases/[single]/tables.js","/admin/[user_id]/databases/[single]/users/add-social-logins":"pages/admin/[user_id]/databases/[single]/users/add-social-logins.js","/admin/[user_id]/databases/[single]/users/add-user":"pages/admin/[user_id]/databases/[single]/users/add-user.js","/admin/[user_id]/databases/[single]/users/[user]":"pages/admin/[user_id]/databases/[single]/users/[user].js","/admin/[user_id]/databases/add-database":"pages/admin/[user_id]/databases/add-database.js","/admin/[user_id]/databases/[single]/users":"pages/admin/[user_id]/databases/[single]/users.js","/admin/[user_id]/schema":"pages/admin/[user_id]/schema.js","/admin/[user_id]/settings":"pages/admin/[user_id]/settings.js","/admin/[user_id]/users/add-user":"pages/admin/[user_id]/users/add-user.js","/admin/[user_id]/media/[...folder]":"pages/admin/[user_id]/media/[...folder].js","/admin/[user_id]/users/databases/[database]/[user]":"pages/admin/[user_id]/users/databases/[database]/[user].js","/admin/[user_id]/users/databases/[database]":"pages/admin/[user_id]/users/databases/[database].js","/admin/[user_id]/users":"pages/admin/[user_id]/users.js","/admin/[user_id]/users/databases":"pages/admin/[user_id]/users/databases.js","/admin":"pages/admin.js","/api/addUserMedia":"pages/api/addUserMedia.js","/api/exportTableData":"pages/api/exportTableData.js","/api/fetch-media":"pages/api/fetch-media.js","/api/query/[user_id]/get-private-file":"pages/api/query/[user_id]/get-private-file.js","/api/query/[user_id]/add-image":"pages/api/query/[user_id]/add-image.js","/api/query/[user_id]/delete-file":"pages/api/query/[user_id]/delete-file.js","/api/query/[user_id]/post":"pages/api/query/[user_id]/post.js","/api/query/[user_id]/add-file":"pages/api/query/[user_id]/add-file.js","/blog":"pages/blog.html","/contact":"pages/contact.html","/docs/[page]":"pages/docs/[page].js","/docs/[page]/[sub-page]":"pages/docs/[page]/[sub-page].js","/docs":"pages/docs.js","/create-account":"pages/create-account.js","/privacy":"pages/privacy.html","/redirect":"pages/redirect.html","/email-verification":"pages/email-verification.js","/send-password-reset-link":"pages/send-password-reset-link.js","/logout":"pages/logout.js","/su/backups":"pages/su/backups.js","/su/console":"pages/su/console.js","/login":"pages/login.js","/su/docs/create-page":"pages/su/docs/create-page.js","/su/docs":"pages/su/docs.js","/su/docs/pages/[id]":"pages/su/docs/pages/[id].js","/su/docs/pages":"pages/su/docs/pages.js","/reset-password":"pages/reset-password.js","/su/docs/edit-page":"pages/su/docs/edit-page.js","/su/error-logs":"pages/su/error-logs.js","/su/envar":"pages/su/envar.js","/su":"pages/su.js","/su/load-balancing":"pages/su/load-balancing.js","/su/login":"pages/su/login.js","/su/users":"pages/su/users.js","/su/users/new":"pages/su/users/new.js","/su/users/[single]":"pages/su/users/[single].js","/su/servers":"pages/su/servers.js","/terms":"pages/terms.html","/unsubscribe":"pages/unsubscribe.js"} \ No newline at end of file +{"/_error":"pages/_error.js","/500":"pages/500.html","/_document":"pages/_document.js","/404":"pages/404.html","/api/acceptUserInvitation":"pages/api/acceptUserInvitation.js","/api/addAdminUserUser":"pages/api/addAdminUserUser.js","/api/addApiKey":"pages/api/addApiKey.js","/api/addDbUser":"pages/api/addDbUser.js","/api/addNewMediaFolder":"pages/api/addNewMediaFolder.js","/api/addSocialLogin":"pages/api/addSocialLogin.js","/api/addTableEntry":"pages/api/addTableEntry.js","/api/addUserTable":"pages/api/addUserTable.js","/api/addUserUser":"pages/api/addUserUser.js","/api/addUsersTableToDatabase":"pages/api/addUsersTableToDatabase.js","/api/admin/addUserBackup":"pages/api/admin/addUserBackup.js","/api/admin/clearErrorLogs":"pages/api/admin/clearErrorLogs.js","/api/admin/clientError":"pages/api/admin/clientError.js","/api/admin/createNewBackup":"pages/api/admin/createNewBackup.js","/api/admin/getTablesForUserDatabase":"pages/api/admin/getTablesForUserDatabase.js","/api/admin/getUserBackups":"pages/api/admin/getUserBackups.js","/api/admin/grabBackups":"pages/api/admin/grabBackups.js","/api/admin/docs/[action]":"pages/api/admin/docs/[action].js","/api/admin/grabFile":"pages/api/admin/grabFile.js","/api/admin/getUserData":"pages/api/admin/getUserData.js","/api/admin/grabErrorLogs":"pages/api/admin/grabErrorLogs.js","/api/admin/loginSuUser":"pages/api/admin/loginSuUser.js","/api/admin/runUserDbQuery":"pages/api/admin/runUserDbQuery.js","/api/admin/updateEnv":"pages/api/admin/updateEnv.js","/api/changeDbUserPassword":"pages/api/changeDbUserPassword.js","/api/checkDuplicateData":"pages/api/checkDuplicateData.js","/api/clientSideAuth":"pages/api/clientSideAuth.js","/api/checkExistingFolder":"pages/api/checkExistingFolder.js","/api/connect/disconnect":"pages/api/connect/disconnect.js","/api/connect/handshake":"pages/api/connect/handshake.js","/api/connect":"pages/api/connect.js","/api/connect/verify":"pages/api/connect/verify.js","/api/contact":"pages/api/contact.js","/api/deleteApiKey":"pages/api/deleteApiKey.js","/api/createUserDatabase":"pages/api/createUserDatabase.js","/api/deleteDbUser":"pages/api/deleteDbUser.js","/api/deleteInvitation":"pages/api/deleteInvitation.js","/api/deleteMediaFolder":"pages/api/deleteMediaFolder.js","/api/deleteTableEntry":"pages/api/deleteTableEntry.js","/api/deleteUserDatabase":"pages/api/deleteUserDatabase.js","/api/deleteUser":"pages/api/deleteUser.js","/api/deleteUserMedia":"pages/api/deleteUserMedia.js","/api/deleteUserTable":"pages/api/deleteUserTable.js","/api/deleteUserUser":"pages/api/deleteUserUser.js","/api/downloadDatabaseSchema":"pages/api/downloadDatabaseSchema.js","/api/exportDatabase":"pages/api/exportDatabase.js","/api/fetch-entries-basic":"pages/api/fetch-entries-basic.js","/api/getDatabaseTables":"pages/api/getDatabaseTables.js","/api/get-authorized-databases":"pages/api/get-authorized-databases.js","/api/getDelegatedDatabaseToken":"pages/api/getDelegatedDatabaseToken.js","/api/getDelegatedDatabases":"pages/api/getDelegatedDatabases.js","/api/getUserDatabaseTables":"pages/api/getUserDatabaseTables.js","/api/getUserDatabases":"pages/api/getUserDatabases.js","/api/getUserSchemaData":"pages/api/getUserSchemaData.js","/api/getDiskUsage":"pages/api/getDiskUsage.js","/api/getUserMedia":"pages/api/getUserMedia.js","/api/healthcheck":"pages/api/healthcheck.js","/api/importDatabase":"pages/api/importDatabase.js","/api/importDatabaseSchema":"pages/api/importDatabaseSchema.js","/api/infiniteScroll":"pages/api/infiniteScroll.js","/api/loginUser":"pages/api/loginUser.js","/api/logoutUser":"pages/api/logoutUser.js","/api/media/addPrivateMedia":"pages/api/media/addPrivateMedia.js","/api/media/getPrivateMedia":"pages/api/media/getPrivateMedia.js","/api/purgeDb":"pages/api/purgeDb.js","/api/query/[user_id]/get-schema":"pages/api/query/[user_id]/get-schema.js","/api/query/[user_id]/get":"pages/api/query/[user_id]/get.js","/api/query/[user_id]/update-schema-from-single-database":"pages/api/query/[user_id]/update-schema-from-single-database.js","/api/queryEntriesSearchTerm":"pages/api/queryEntriesSearchTerm.js","/api/reAuthenticateUser":"pages/api/reAuthenticateUser.js","/api/refreshEntry":"pages/api/refreshEntry.js","/api/renameMedia":"pages/api/renameMedia.js","/api/registerUser":"pages/api/registerUser.js","/api/resetDelegatedDatabaseToken":"pages/api/resetDelegatedDatabaseToken.js","/api/resetPassword":"pages/api/resetPassword.js","/api/runUserDbQuery":"pages/api/runUserDbQuery.js","/api/sendEmailVerificationLink":"pages/api/sendEmailVerificationLink.js","/api/sendPasswordResetLink":"pages/api/sendPasswordResetLink.js","/api/social-login/facebook-auth":"pages/api/social-login/facebook-auth.js","/api/social-login/github-auth":"pages/api/social-login/github-auth.js","/api/social-login/google-auth":"pages/api/social-login/google-auth.js","/api/social-login/utils/checkEmail":"pages/api/social-login/utils/checkEmail.js","/api/social-login/utils/checkSocialId":"pages/api/social-login/utils/checkSocialId.js","/api/social-login/utils/getEmailFromSocialId":"pages/api/social-login/utils/getEmailFromSocialId.js","/api/sql-users/create":"pages/api/sql-users/create.js","/api/sql-users/delete":"pages/api/sql-users/delete.js","/api/sql-users/update":"pages/api/sql-users/update.js","/api/stream/[path]":"pages/api/stream/[path].js","/api/sync-table-data":"pages/api/sync-table-data.js","/api/test/cors":"pages/api/test/cors.js","/api/test/mail":"pages/api/test/mail.js","/api/unsubscribe":"pages/api/unsubscribe.js","/api/updateAdminUserAccess":"pages/api/updateAdminUserAccess.js","/api/updateClonedTableForeignKeys":"pages/api/updateClonedTableForeignKeys.js","/api/updateDbSchemaDataForUser":"pages/api/updateDbSchemaDataForUser.js","/api/updateDbUser":"pages/api/updateDbUser.js","/api/updateTableEntry":"pages/api/updateTableEntry.js","/api/updateUser":"pages/api/updateUser.js","/api/updateUserTable":"pages/api/updateUserTable.js","/api/updateUserDatabase":"pages/api/updateUserDatabase.js","/api/updateUserUser":"pages/api/updateUserUser.js","/api/user-schema/replace-database-schema":"pages/api/user-schema/replace-database-schema.js","/api/user/[user_id]/add-user":"pages/api/user/[user_id]/add-user.js","/api/user/[user_id]/delete-user":"pages/api/user/[user_id]/delete-user.js","/api/user/[user_id]/get-user":"pages/api/user/[user_id]/get-user.js","/api/user/[user_id]/github-login":"pages/api/user/[user_id]/github-login.js","/api/user/[user_id]/google-login":"pages/api/user/[user_id]/google-login.js","/api/user/[user_id]/grab-google-user-from-token":"pages/api/user/[user_id]/grab-google-user-from-token.js","/api/user/[user_id]/login-user":"pages/api/user/[user_id]/login-user.js","/api/user/[user_id]/reauth-user":"pages/api/user/[user_id]/reauth-user.js","/api/user/[user_id]/send-email-code":"pages/api/user/[user_id]/send-email-code.js","/api/user/[user_id]/update-user":"pages/api/user/[user_id]/update-user.js","/api/webhooks/github-push":"pages/api/webhooks/github-push.js","/_app":"pages/_app.js","/about":"pages/about.html","/admin/[user_id]/api-keys":"pages/admin/[user_id]/api-keys.js","/admin/[user_id]/connect":"pages/admin/[user_id]/connect.js","/admin/[user_id]/databases/[single]/edit-database":"pages/admin/[user_id]/databases/[single]/edit-database.js","/admin/[user_id]/databases/[single]/connect":"pages/admin/[user_id]/databases/[single]/connect.js","/admin/[user_id]/databases/[single]/schema":"pages/admin/[user_id]/databases/[single]/schema.js","/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js","/admin/[user_id]/databases/[single]/shell":"pages/admin/[user_id]/databases/[single]/shell.js","/admin/[user_id]/databases/[single]":"pages/admin/[user_id]/databases/[single].js","/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js","/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js","/admin/[user_id]/databases/[single]/tables/[single_table]/fields":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js","/admin/[user_id]/databases/[single]/tables/[single_table]/entries":"pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js","/admin/[user_id]/databases/[single]/tables/[single_table]":"pages/admin/[user_id]/databases/[single]/tables/[single_table].js","/admin/[user_id]/databases/[single]/tables/add-table":"pages/admin/[user_id]/databases/[single]/tables/add-table.js","/admin/[user_id]/databases/[single]/users/[user]/change-password":"pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js","/admin/[user_id]/databases/[single]/tables":"pages/admin/[user_id]/databases/[single]/tables.js","/admin/[user_id]/databases/[single]/users/add-social-logins":"pages/admin/[user_id]/databases/[single]/users/add-social-logins.js","/admin/[user_id]/databases/[single]/users/[user]":"pages/admin/[user_id]/databases/[single]/users/[user].js","/admin/[user_id]/databases/add-database":"pages/admin/[user_id]/databases/add-database.js","/admin/[user_id]/databases":"pages/admin/[user_id]/databases.js","/admin/[user_id]":"pages/admin/[user_id].js","/admin/[user_id]/databases/[single]/users/add-user":"pages/admin/[user_id]/databases/[single]/users/add-user.js","/admin/[user_id]/databases/[single]/users":"pages/admin/[user_id]/databases/[single]/users.js","/admin/[user_id]/media/[...folder]":"pages/admin/[user_id]/media/[...folder].js","/admin/[user_id]/media":"pages/admin/[user_id]/media.js","/admin/[user_id]/settings":"pages/admin/[user_id]/settings.js","/admin/[user_id]/schema":"pages/admin/[user_id]/schema.js","/admin/[user_id]/users/add-user":"pages/admin/[user_id]/users/add-user.js","/admin/[user_id]/users/databases/[database]/[user]":"pages/admin/[user_id]/users/databases/[database]/[user].js","/admin/[user_id]/users/databases/[database]":"pages/admin/[user_id]/users/databases/[database].js","/admin/[user_id]/users/databases":"pages/admin/[user_id]/users/databases.js","/admin/[user_id]/users":"pages/admin/[user_id]/users.js","/admin":"pages/admin.js","/api/addUserMedia":"pages/api/addUserMedia.js","/api/exportTableData":"pages/api/exportTableData.js","/api/fetch-media":"pages/api/fetch-media.js","/api/query/[user_id]/add-image":"pages/api/query/[user_id]/add-image.js","/api/query/[user_id]/add-file":"pages/api/query/[user_id]/add-file.js","/api/query/[user_id]/get-private-file":"pages/api/query/[user_id]/get-private-file.js","/api/query/[user_id]/delete-file":"pages/api/query/[user_id]/delete-file.js","/api/query/[user_id]/post":"pages/api/query/[user_id]/post.js","/blog":"pages/blog.html","/contact":"pages/contact.html","/create-account":"pages/create-account.js","/docs":"pages/docs.js","/docs/[page]":"pages/docs/[page].js","/docs/[page]/[sub-page]":"pages/docs/[page]/[sub-page].js","/email-verification":"pages/email-verification.js","/login":"pages/login.js","/privacy":"pages/privacy.html","/redirect":"pages/redirect.html","/logout":"pages/logout.js","/send-password-reset-link":"pages/send-password-reset-link.js","/reset-password":"pages/reset-password.js","/su/backups":"pages/su/backups.js","/su/console":"pages/su/console.js","/su/docs/create-page":"pages/su/docs/create-page.js","/su/docs/edit-page":"pages/su/docs/edit-page.js","/su/docs/pages/[id]":"pages/su/docs/pages/[id].js","/su/docs":"pages/su/docs.js","/su/envar":"pages/su/envar.js","/su/error-logs":"pages/su/error-logs.js","/su":"pages/su.js","/su/load-balancing":"pages/su/load-balancing.js","/su/servers":"pages/su/servers.js","/su/login":"pages/su/login.js","/su/users":"pages/su/users.js","/su/users/new":"pages/su/users/new.js","/terms":"pages/terms.html","/unsubscribe":"pages/unsubscribe.js","/":"pages/index.html","/su/docs/pages":"pages/su/docs/pages.js","/su/users/[single]":"pages/su/users/[single].js"} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/404.html b/dsql-app/.local_dist/server/pages/404.html index e021eca..e838b6b 100644 --- a/dsql-app/.local_dist/server/pages/404.html +++ b/dsql-app/.local_dist/server/pages/404.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/404.js.nft.json b/dsql-app/.local_dist/server/pages/404.js.nft.json index b0e24b8..4d801bf 100644 --- a/dsql-app/.local_dist/server/pages/404.js.nft.json +++ b/dsql-app/.local_dist/server/pages/404.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/500.html b/dsql-app/.local_dist/server/pages/500.html index 6c7da16..ab2608d 100644 --- a/dsql-app/.local_dist/server/pages/500.html +++ b/dsql-app/.local_dist/server/pages/500.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/500.js.nft.json b/dsql-app/.local_dist/server/pages/500.js.nft.json index b0e24b8..4d801bf 100644 --- a/dsql-app/.local_dist/server/pages/500.js.nft.json +++ b/dsql-app/.local_dist/server/pages/500.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/_app.js b/dsql-app/.local_dist/server/pages/_app.js index 91f4b6d..727c3bf 100644 --- a/dsql-app/.local_dist/server/pages/_app.js +++ b/dsql-app/.local_dist/server/pages/_app.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=636,e.ids=[636],e.modules={63865:(e,r,t)=>{e.exports=t(40361)},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},99929:(e,r)=>{r._=function(e){return e&&e.__esModule?e:{default:e}}}};var r=require("../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[9821,9600],()=>t(89600));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=636,e.ids=[636],e.modules={63865:(e,r,t)=>{e.exports=t(40361)},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},99929:(e,r)=>{r._=function(e){return e&&e.__esModule?e:{default:e}}}};var r=require("../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[9821,9796],()=>t(19796));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/_app.js.nft.json b/dsql-app/.local_dist/server/pages/_app.js.nft.json index 09fb00b..3d5eaad 100644 --- a/dsql-app/.local_dist/server/pages/_app.js.nft.json +++ b/dsql-app/.local_dist/server/pages/_app.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../../pages/_app.js","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../../pages/_app.tsx","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/_document.js b/dsql-app/.local_dist/server/pages/_document.js index e81cfb8..87f415d 100644 --- a/dsql-app/.local_dist/server/pages/_document.js +++ b/dsql-app/.local_dist/server/pages/_document.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3220,e.ids=[3220],e.modules={49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(8732);s(82015);var n=s(20883);function a(e){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},82015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883],()=>s(49407));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3220,e.ids=[3220],e.modules={5583:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(8732);s(82015);var n=s(20883);function a(){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},82015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883],()=>s(5583));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/_document.js.nft.json b/dsql-app/.local_dist/server/pages/_document.js.nft.json index 1b60e71..ceb31bd 100644 --- a/dsql-app/.local_dist/server/pages/_document.js.nft.json +++ b/dsql-app/.local_dist/server/pages/_document.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../../pages/_document.js","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../../pages/_document.tsx","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/_error.js b/dsql-app/.local_dist/server/pages/_error.js index c5d38fa..1a4cb5b 100644 --- a/dsql-app/.local_dist/server/pages/_error.js +++ b/dsql-app/.local_dist/server/pages/_error.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2731,e.ids=[2731,3220],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},54129:(e,t,r)=>{r.r(t),r.d(t,{config:()=>f,default:()=>d,getServerSideProps:()=>p,getStaticPaths:()=>c,getStaticProps:()=>u,reportWebVitals:()=>m,routeModule:()=>b,unstable_getServerProps:()=>x,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>h});var n=r(63865),s=r(9455),o=r(30671),a=r(49407),i=r(89600),l=r(33532);let d=(0,o.M)(l,"default"),u=(0,o.M)(l,"getStaticProps"),c=(0,o.M)(l,"getStaticPaths"),p=(0,o.M)(l,"getServerSideProps"),f=(0,o.M)(l,"config"),m=(0,o.M)(l,"reportWebVitals"),h=(0,o.M)(l,"unstable_getStaticProps"),g=(0,o.M)(l,"unstable_getStaticPaths"),y=(0,o.M)(l,"unstable_getStaticParams"),x=(0,o.M)(l,"unstable_getServerProps"),j=(0,o.M)(l,"unstable_getServerSideProps"),b=new n.PagesRouteModule({definition:{kind:s.A.PAGES,page:"/_error",pathname:"/_error",bundlePath:"",filename:""},components:{App:i.default,Document:a.default},userland:l})},33532:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let n=r(99929),s=r(8732),o=n._(r(82015)),a=n._(r(44426)),i={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(e){let{res:t,err:r}=e;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}let d={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class u extends o.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||i[e]||"An unexpected error has occurred";return(0,s.jsxs)("div",{style:d.error,children:[(0,s.jsx)(a.default,{children:(0,s.jsx)("title",{children:e?e+": "+r:"Application error: a client-side exception has occurred"})}),(0,s.jsxs)("div",{style:d.desc,children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,s.jsx)("h1",{className:"next-error-h1",style:d.h1,children:e}):null,(0,s.jsx)("div",{style:d.wrap,children:(0,s.jsxs)("h2",{style:d.h2,children:[this.props.title||e?r:(0,s.jsx)(s.Fragment,{children:"Application error: a client-side exception has occurred (see the browser console for more information)"}),"."]})})]})]})}}u.displayName="ErrorPage",u.getInitialProps=l,u.origGetInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8498:(e,t)=>{function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},44426:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return h},defaultHead:function(){return c}});let n=r(99929),s=r(24588),o=r(8732),a=s._(r(82015)),i=n._(r(13309)),l=r(39811),d=r(19241),u=r(8498);function c(e){void 0===e&&(e=!1);let t=[(0,o.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===a.default.Fragment?e.concat(a.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(99794);let f=["name","httpEquiv","charSet","itemProp"];function m(e,t){let{inAmpMode:r}=t;return e.reduce(p,[]).reverse().concat(c(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return s=>{let o=!0,a=!1;if(s.key&&"number"!=typeof s.key&&s.key.indexOf("$")>0){a=!0;let t=s.key.slice(s.key.indexOf("$")+1);e.has(t)?o=!1:e.add(t)}switch(s.type){case"title":case"base":t.has(s.type)?o=!1:t.add(s.type);break;case"meta":for(let e=0,t=f.length;e{let n=e.key||t;if(process.env.__NEXT_OPTIMIZE_FONTS&&!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,a.default.cloneElement(e,t)}return a.default.cloneElement(e,{key:n})})}let h=function(e){let{children:t}=e,r=(0,a.useContext)(l.AmpStateContext),n=(0,a.useContext)(d.HeadManagerContext);return(0,o.jsx)(i.default,{reduceComponentsToState:m,headManager:n,inAmpMode:(0,u.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13309:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(82015),s=()=>{},o=()=>{};function a(e){var t;let{headManager:r,reduceComponentsToState:a}=e;function i(){if(r&&r.mountedInstances){let t=n.Children.toArray(Array.from(r.mountedInstances).filter(Boolean));r.updateHead(a(t,e))}}return null==r||null==(t=r.mountedInstances)||t.add(e.children),i(),s(()=>{var t;return null==r||null==(t=r.mountedInstances)||t.add(e.children),()=>{var t;null==r||null==(t=r.mountedInstances)||t.delete(e.children)}}),s(()=>(r&&(r._pendingUpdate=i),()=>{r&&(r._pendingUpdate=i)})),o(()=>(r&&r._pendingUpdate&&(r._pendingUpdate(),r._pendingUpdate=null),()=>{r&&r._pendingUpdate&&(r._pendingUpdate(),r._pendingUpdate=null)})),null}},99794:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},49407:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(8732);r(82015);var s=r(20883);function o(e){return(0,n.jsxs)(s.Html,{lang:"en",children:[(0,n.jsxs)(s.Head,{children:[(0,n.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,n.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,n.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,n.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,n.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,n.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,n.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,n.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,n.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,n.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,n.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,n.jsx)("meta",{property:"og:type",content:"website"}),(0,n.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,n.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,n.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,n.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,n.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,n.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,n.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,n.jsxs)("body",{children:[(0,n.jsx)(s.Main,{}),(0,n.jsx)(s.NextScript,{})]})]})}},9455:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},39811:(e,t,r)=>{e.exports=r(63865).vendored.contexts.AmpContext},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[883,9821,9600],()=>r(54129));module.exports=n})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2731,e.ids=[2731,3220],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},54477:(e,t,r)=>{r.r(t),r.d(t,{config:()=>f,default:()=>d,getServerSideProps:()=>p,getStaticPaths:()=>c,getStaticProps:()=>u,reportWebVitals:()=>m,routeModule:()=>b,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>x,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>h});var n=r(63865),s=r(9455),o=r(30671),a=r(5583),i=r(19796),l=r(33532);let d=(0,o.M)(l,"default"),u=(0,o.M)(l,"getStaticProps"),c=(0,o.M)(l,"getStaticPaths"),p=(0,o.M)(l,"getServerSideProps"),f=(0,o.M)(l,"config"),m=(0,o.M)(l,"reportWebVitals"),h=(0,o.M)(l,"unstable_getStaticProps"),g=(0,o.M)(l,"unstable_getStaticPaths"),x=(0,o.M)(l,"unstable_getStaticParams"),y=(0,o.M)(l,"unstable_getServerProps"),j=(0,o.M)(l,"unstable_getServerSideProps"),b=new n.PagesRouteModule({definition:{kind:s.A.PAGES,page:"/_error",pathname:"/_error",bundlePath:"",filename:""},components:{App:i.default,Document:a.default},userland:l})},33532:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let n=r(99929),s=r(8732),o=n._(r(82015)),a=n._(r(44426)),i={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(e){let{res:t,err:r}=e;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}let d={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class u extends o.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||i[e]||"An unexpected error has occurred";return(0,s.jsxs)("div",{style:d.error,children:[(0,s.jsx)(a.default,{children:(0,s.jsx)("title",{children:e?e+": "+r:"Application error: a client-side exception has occurred"})}),(0,s.jsxs)("div",{style:d.desc,children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,s.jsx)("h1",{className:"next-error-h1",style:d.h1,children:e}):null,(0,s.jsx)("div",{style:d.wrap,children:(0,s.jsxs)("h2",{style:d.h2,children:[this.props.title||e?r:(0,s.jsx)(s.Fragment,{children:"Application error: a client-side exception has occurred (see the browser console for more information)"}),"."]})})]})]})}}u.displayName="ErrorPage",u.getInitialProps=l,u.origGetInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8498:(e,t)=>{function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},44426:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return h},defaultHead:function(){return c}});let n=r(99929),s=r(24588),o=r(8732),a=s._(r(82015)),i=n._(r(13309)),l=r(39811),d=r(19241),u=r(8498);function c(e){void 0===e&&(e=!1);let t=[(0,o.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===a.default.Fragment?e.concat(a.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(99794);let f=["name","httpEquiv","charSet","itemProp"];function m(e,t){let{inAmpMode:r}=t;return e.reduce(p,[]).reverse().concat(c(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return s=>{let o=!0,a=!1;if(s.key&&"number"!=typeof s.key&&s.key.indexOf("$")>0){a=!0;let t=s.key.slice(s.key.indexOf("$")+1);e.has(t)?o=!1:e.add(t)}switch(s.type){case"title":case"base":t.has(s.type)?o=!1:t.add(s.type);break;case"meta":for(let e=0,t=f.length;e{let n=e.key||t;if(process.env.__NEXT_OPTIMIZE_FONTS&&!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,a.default.cloneElement(e,t)}return a.default.cloneElement(e,{key:n})})}let h=function(e){let{children:t}=e,r=(0,a.useContext)(l.AmpStateContext),n=(0,a.useContext)(d.HeadManagerContext);return(0,o.jsx)(i.default,{reduceComponentsToState:m,headManager:n,inAmpMode:(0,u.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13309:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(82015),s=()=>{},o=()=>{};function a(e){var t;let{headManager:r,reduceComponentsToState:a}=e;function i(){if(r&&r.mountedInstances){let t=n.Children.toArray(Array.from(r.mountedInstances).filter(Boolean));r.updateHead(a(t,e))}}return null==r||null==(t=r.mountedInstances)||t.add(e.children),i(),s(()=>{var t;return null==r||null==(t=r.mountedInstances)||t.add(e.children),()=>{var t;null==r||null==(t=r.mountedInstances)||t.delete(e.children)}}),s(()=>(r&&(r._pendingUpdate=i),()=>{r&&(r._pendingUpdate=i)})),o(()=>(r&&r._pendingUpdate&&(r._pendingUpdate(),r._pendingUpdate=null),()=>{r&&r._pendingUpdate&&(r._pendingUpdate(),r._pendingUpdate=null)})),null}},99794:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},5583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(8732);r(82015);var s=r(20883);function o(){return(0,n.jsxs)(s.Html,{lang:"en",children:[(0,n.jsxs)(s.Head,{children:[(0,n.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,n.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,n.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,n.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,n.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,n.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,n.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,n.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,n.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,n.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,n.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,n.jsx)("meta",{property:"og:type",content:"website"}),(0,n.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,n.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,n.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,n.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,n.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,n.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,n.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,n.jsxs)("body",{children:[(0,n.jsx)(s.Main,{}),(0,n.jsx)(s.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},39811:(e,t,r)=>{e.exports=r(63865).vendored.contexts.AmpContext},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[883,9821,9796],()=>r(54477));module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/_error.js.nft.json b/dsql-app/.local_dist/server/pages/_error.js.nft.json index 4476f91..80c343e 100644 --- a/dsql-app/.local_dist/server/pages/_error.js.nft.json +++ b/dsql-app/.local_dist/server/pages/_error.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/about.html b/dsql-app/.local_dist/server/pages/about.html index 26faddb..dc64c78 100644 --- a/dsql-app/.local_dist/server/pages/about.html +++ b/dsql-app/.local_dist/server/pages/about.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/about.js.nft.json b/dsql-app/.local_dist/server/pages/about.js.nft.json index 1b1be12..50fbcbf 100644 --- a/dsql-app/.local_dist/server/pages/about.js.nft.json +++ b/dsql-app/.local_dist/server/pages/about.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../chunks/5212.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../chunks/6202.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin.js b/dsql-app/.local_dist/server/pages/admin.js index edb5a10..bc1012a 100644 --- a/dsql-app/.local_dist/server/pages/admin.js +++ b/dsql-app/.local_dist/server/pages/admin.js @@ -1 +1,14 @@ -"use strict";(()=>{var e={};e.id=6309,e.ids=[6309],e.modules={34313:(e,t,r)=>{r.r(t),r.d(t,{config:()=>_,default:()=>v,getServerSideProps:()=>M,getStaticPaths:()=>q,getStaticProps:()=>f,reportWebVitals:()=>j,routeModule:()=>W,unstable_getServerProps:()=>w,unstable_getServerSideProps:()=>C,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>D,unstable_getStaticProps:()=>A});var a={};r.r(a),r.d(a,{DashboardContext:()=>P,default:()=>b,getServerSideProps:()=>h});var s=r(63865),i=r(9455),n=r(30671),o=r(49407),u=r(89600),d=r(8732),l=r(82015),p=r.n(l),c=r(95222),g=r(20048),x=r.n(g),S=r(43001),m=r(34033);let P=p().createContext({});function b({user:e,databases:t,metrics:r}){let a=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[s,i]=p().useState(null);return(0,d.jsx)(c.A,{head:a,user:e,children:(0,d.jsxs)(P.Provider,{value:{user:e,databases:t,targetDatabase:s,setTargetDatabase:i,metrics:r},children:[(0,d.jsx)(S.A,{}),(0,d.jsx)(m.A,{targetDatabase:s})]})})}async function h({req:e,res:t,query:r}){let a=await x()(e,t);return a?.logged_in_status?{redirect:{destination:`/admin/${a.id}`,permanent:!1}}:{redirect:{destination:"/login",permanent:!1}}}let v=(0,n.M)(a,"default"),f=(0,n.M)(a,"getStaticProps"),q=(0,n.M)(a,"getStaticPaths"),M=(0,n.M)(a,"getServerSideProps"),_=(0,n.M)(a,"config"),j=(0,n.M)(a,"reportWebVitals"),A=(0,n.M)(a,"unstable_getStaticProps"),D=(0,n.M)(a,"unstable_getStaticPaths"),y=(0,n.M)(a,"unstable_getStaticParams"),w=(0,n.M)(a,"unstable_getServerProps"),C=(0,n.M)(a,"unstable_getServerSideProps"),W=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin",pathname:"/admin",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:a})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9600,7070,3460,3247],()=>r(34313));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6309,e.ids=[6309],e.modules={13262:(e,t,s)=>{s.r(t),s.d(t,{config:()=>A,default:()=>S,getServerSideProps:()=>C,getStaticPaths:()=>f,getStaticProps:()=>y,reportWebVitals:()=>v,routeModule:()=>k,unstable_getServerProps:()=>M,unstable_getServerSideProps:()=>D,unstable_getStaticParams:()=>P,unstable_getStaticPaths:()=>E,unstable_getStaticProps:()=>_});var a={};s.r(a),s.d(a,{DashboardContext:()=>g,default:()=>b,getServerSideProps:()=>j});var r=s(63865),i=s(9455),n=s(30671),d=s(5583),l=s(19796),o=s(8732),c=s(82015),u=s.n(c),x=s(25562),m=s(92702),p=s(71192),h=s(70355);let g=u().createContext({});function b({user:e,databases:t,metrics:s}){let a=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[r,i]=u().useState(null);return(0,o.jsx)(x.A,{head:a,user:e,children:(0,o.jsxs)(g.Provider,{value:{user:e,databases:t,targetDatabase:r,setTargetDatabase:i,metrics:s},children:[(0,o.jsx)(p.A,{}),(0,o.jsx)(h.A,{targetDatabase:r})]})})}async function j({req:e,res:t,query:s}){let a=await (0,m.default)(e,t);return a?.logged_in_status?{redirect:{destination:`/admin/${a.id}`,permanent:!1}}:{redirect:{destination:"/login",permanent:!1}}}let S=(0,n.M)(a,"default"),y=(0,n.M)(a,"getStaticProps"),f=(0,n.M)(a,"getStaticPaths"),C=(0,n.M)(a,"getServerSideProps"),A=(0,n.M)(a,"config"),v=(0,n.M)(a,"reportWebVitals"),_=(0,n.M)(a,"unstable_getStaticProps"),E=(0,n.M)(a,"unstable_getStaticPaths"),P=(0,n.M)(a,"unstable_getStaticParams"),M=(0,n.M)(a,"unstable_getServerProps"),D=(0,n.M)(a,"unstable_getServerSideProps"),k=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin",pathname:"/admin",bundlePath:"",filename:""},components:{App:l.default,Document:d.default},userland:a})},71192:(e,t,s)=>{s.d(t,{A:()=>j});var a=s(8732),r=s(82015),i=s.n(r),n=s(3530),d=s(53926),l=s(66485),o=s(56331);function c(){let{databases:e,setTargetDatabase:t,user:s}=i().useContext(n.DashboardContext);return(0,a.jsx)(i().Fragment,{children:(0,a.jsx)(o.A,{databases:e,setTargetDatabase:t,title:"Recently added Databases",more:!0,user:s})})}var u=s(67274),x=s(34637),m=s(93213),p=s(83158);let h=(0,s(82544).A)("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);function g({icon:e,metric:t,count:s,url:r}){return(0,a.jsxs)("a",{href:r,className:"card col w-full",children:[(0,a.jsx)("div",{className:"absolute top-4 right-4",children:e}),(0,a.jsxs)("div",{className:"content-block",children:[(0,a.jsx)("span",{className:"metric text-slate-800 dark:text-white",children:s}),(0,a.jsx)("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:t})]})]})}function b(){let{databases:e,setTargetDatabase:t,metrics:s,user:r}=i().useContext(n.DashboardContext);return(0,a.jsx)("section",{className:"p-0",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 w-full gap-6 items-stretch",children:[(0,a.jsx)(g,{metric:"Databases Created",count:s?.dbCount||0,icon:(0,a.jsx)(x.A,{size:20,className:"text-secondary2"}),url:`/admin/${r?.id}/databases`}),(0,a.jsx)(g,{metric:"Tables Created",count:s?.tablesCount||0,icon:(0,a.jsx)(m.A,{size:20,className:"text-primary"})}),(0,a.jsx)(g,{metric:"Media Added",count:s?.mediaCount||0,icon:(0,a.jsx)(p.A,{size:20,className:"text-slate-500"}),url:`/admin/${r?.id}/media`}),(0,a.jsx)(g,{metric:"API Keys",count:s?.apiKeysCount||0,icon:(0,a.jsx)(h,{size:20,className:"text-slate-900 dark:text-white"}),url:`/admin/${r?.id}/api-keys`})]})})}function j(){let{databases:e,user:t}=i().useContext(n.DashboardContext);return(0,a.jsxs)(i().Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Dashboard"}),(0,a.jsx)(d.A,{user:t})]}),t?.verification_status?.toString().match(/1/)?(0,a.jsxs)(i().Fragment,{children:[(0,a.jsx)(b,{}),(0,a.jsx)(c,{}),(0,a.jsx)(u.A,{user:t})]}):(0,a.jsx)(l.A,{})]})}},93213:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},3530:(e,t,s)=>{s.r(t),s.d(t,{DashboardContext:()=>u,default:()=>x,getServerSideProps:()=>m});var a=s(8732),r=s(82015),i=s.n(r),n=s(25562),d=s(92702),l=s(71192),o=s(70355),c=s(71934);let u=i().createContext({});function x({user:e,databases:t,metrics:s}){let r=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,c]=i().useState();return(0,a.jsx)(n.A,{head:r,user:e,children:(0,a.jsxs)(u.Provider,{value:{user:e,databases:t,targetDatabase:d,setTargetDatabase:c,metrics:s},children:[(0,a.jsx)(l.A,{}),(0,a.jsx)(o.A,{targetDatabase:d})]})})}async function m({req:e,res:t,query:s}){let a=await (0,d.default)(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,c.A)("SELECT * FROM user_databases WHERE user_id=? ORDER BY id DESC LIMIT 3",[a.id]),i=await (0,c.A)(` + SELECT ( + SELECT COUNT(id) FROM user_databases WHERE user_id=? + ) AS dbCount, + ( + SELECT COUNT(id) FROM user_database_tables WHERE user_id=? + ) AS tablesCount, + ( + SELECT COUNT(id) FROM user_media WHERE user_id=? + ) AS mediaCount, + ( + SELECT COUNT(id) FROM api_keys WHERE user_id=? + ) AS apiKeysCount + `,[a.id,a.id,a.id,a.id]);return{props:{user:a,databases:r,metrics:i&&i[0]?i[0]:{}}}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9796,5392,6160],()=>s(13262));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin.js.nft.json b/dsql-app/.local_dist/server/pages/admin.js.nft.json index 679446f..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/admin.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id].js b/dsql-app/.local_dist/server/pages/admin/[user_id].js index fd29dcb..ba17346 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id].js @@ -1 +1,14 @@ -"use strict";(()=>{var e={};e.id=531,e.ids=[531],e.modules={25824:(e,t,r)=>{r.r(t),r.d(t,{config:()=>g,default:()=>n,getServerSideProps:()=>c,getStaticPaths:()=>l,getStaticProps:()=>d,reportWebVitals:()=>S,routeModule:()=>M,unstable_getServerProps:()=>b,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>x,unstable_getStaticPaths:()=>m,unstable_getStaticProps:()=>P});var s=r(63865),a=r(9455),i=r(30671),u=r(49407),o=r(89600),p=r(26295);let n=(0,i.M)(p,"default"),d=(0,i.M)(p,"getStaticProps"),l=(0,i.M)(p,"getStaticPaths"),c=(0,i.M)(p,"getServerSideProps"),g=(0,i.M)(p,"config"),S=(0,i.M)(p,"reportWebVitals"),P=(0,i.M)(p,"unstable_getStaticProps"),m=(0,i.M)(p,"unstable_getStaticPaths"),x=(0,i.M)(p,"unstable_getStaticParams"),b=(0,i.M)(p,"unstable_getServerProps"),q=(0,i.M)(p,"unstable_getServerSideProps"),M=new s.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/admin/[user_id]",pathname:"/admin/[user_id]",bundlePath:"",filename:""},components:{App:o.default,Document:u.default},userland:p})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,3460,3247],()=>r(25824));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=531,e.ids=[531],e.modules={65102:(e,t,s)=>{s.r(t),s.d(t,{config:()=>m,default:()=>o,getServerSideProps:()=>x,getStaticPaths:()=>u,getStaticProps:()=>c,reportWebVitals:()=>p,routeModule:()=>y,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>g,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>h});var a=s(63865),r=s(9455),i=s(30671),n=s(5583),d=s(19796),l=s(3530);let o=(0,i.M)(l,"default"),c=(0,i.M)(l,"getStaticProps"),u=(0,i.M)(l,"getStaticPaths"),x=(0,i.M)(l,"getServerSideProps"),m=(0,i.M)(l,"config"),p=(0,i.M)(l,"reportWebVitals"),h=(0,i.M)(l,"unstable_getStaticProps"),b=(0,i.M)(l,"unstable_getStaticPaths"),g=(0,i.M)(l,"unstable_getStaticParams"),j=(0,i.M)(l,"unstable_getServerProps"),S=(0,i.M)(l,"unstable_getServerSideProps"),y=new a.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]",pathname:"/admin/[user_id]",bundlePath:"",filename:""},components:{App:d.default,Document:n.default},userland:l})},71192:(e,t,s)=>{s.d(t,{A:()=>j});var a=s(8732),r=s(82015),i=s.n(r),n=s(3530),d=s(53926),l=s(66485),o=s(56331);function c(){let{databases:e,setTargetDatabase:t,user:s}=i().useContext(n.DashboardContext);return(0,a.jsx)(i().Fragment,{children:(0,a.jsx)(o.A,{databases:e,setTargetDatabase:t,title:"Recently added Databases",more:!0,user:s})})}var u=s(67274),x=s(34637),m=s(93213),p=s(83158);let h=(0,s(82544).A)("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);function b({icon:e,metric:t,count:s,url:r}){return(0,a.jsxs)("a",{href:r,className:"card col w-full",children:[(0,a.jsx)("div",{className:"absolute top-4 right-4",children:e}),(0,a.jsxs)("div",{className:"content-block",children:[(0,a.jsx)("span",{className:"metric text-slate-800 dark:text-white",children:s}),(0,a.jsx)("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:t})]})]})}function g(){let{databases:e,setTargetDatabase:t,metrics:s,user:r}=i().useContext(n.DashboardContext);return(0,a.jsx)("section",{className:"p-0",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 w-full gap-6 items-stretch",children:[(0,a.jsx)(b,{metric:"Databases Created",count:s?.dbCount||0,icon:(0,a.jsx)(x.A,{size:20,className:"text-secondary2"}),url:`/admin/${r?.id}/databases`}),(0,a.jsx)(b,{metric:"Tables Created",count:s?.tablesCount||0,icon:(0,a.jsx)(m.A,{size:20,className:"text-primary"})}),(0,a.jsx)(b,{metric:"Media Added",count:s?.mediaCount||0,icon:(0,a.jsx)(p.A,{size:20,className:"text-slate-500"}),url:`/admin/${r?.id}/media`}),(0,a.jsx)(b,{metric:"API Keys",count:s?.apiKeysCount||0,icon:(0,a.jsx)(h,{size:20,className:"text-slate-900 dark:text-white"}),url:`/admin/${r?.id}/api-keys`})]})})}function j(){let{databases:e,user:t}=i().useContext(n.DashboardContext);return(0,a.jsxs)(i().Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Dashboard"}),(0,a.jsx)(d.A,{user:t})]}),t?.verification_status?.toString().match(/1/)?(0,a.jsxs)(i().Fragment,{children:[(0,a.jsx)(g,{}),(0,a.jsx)(c,{}),(0,a.jsx)(u.A,{user:t})]}):(0,a.jsx)(l.A,{})]})}},93213:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},3530:(e,t,s)=>{s.r(t),s.d(t,{DashboardContext:()=>u,default:()=>x,getServerSideProps:()=>m});var a=s(8732),r=s(82015),i=s.n(r),n=s(25562),d=s(92702),l=s(71192),o=s(70355),c=s(71934);let u=i().createContext({});function x({user:e,databases:t,metrics:s}){let r=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,c]=i().useState();return(0,a.jsx)(n.A,{head:r,user:e,children:(0,a.jsxs)(u.Provider,{value:{user:e,databases:t,targetDatabase:d,setTargetDatabase:c,metrics:s},children:[(0,a.jsx)(l.A,{}),(0,a.jsx)(o.A,{targetDatabase:d})]})})}async function m({req:e,res:t,query:s}){let a=await (0,d.default)(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,c.A)("SELECT * FROM user_databases WHERE user_id=? ORDER BY id DESC LIMIT 3",[a.id]),i=await (0,c.A)(` + SELECT ( + SELECT COUNT(id) FROM user_databases WHERE user_id=? + ) AS dbCount, + ( + SELECT COUNT(id) FROM user_database_tables WHERE user_id=? + ) AS tablesCount, + ( + SELECT COUNT(id) FROM user_media WHERE user_id=? + ) AS mediaCount, + ( + SELECT COUNT(id) FROM api_keys WHERE user_id=? + ) AS apiKeysCount + `,[a.id,a.id,a.id,a.id]);return{props:{user:a,databases:r,metrics:i&&i[0]?i[0]:{}}}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9796,5392,6160],()=>s(65102));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id].js.nft.json index b998a4f..817b606 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js index f77fc46..bac8a9b 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9419,e.ids=[9419],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},30284:(e,t,a)=>{a.r(t),a.d(t,{config:()=>I,default:()=>F,getServerSideProps:()=>O,getStaticPaths:()=>z,getStaticProps:()=>D,reportWebVitals:()=>G,routeModule:()=>W,unstable_getServerProps:()=>$,unstable_getServerSideProps:()=>V,unstable_getStaticParams:()=>L,unstable_getStaticPaths:()=>R,unstable_getStaticProps:()=>H});var s,l={};a.r(l),a.d(l,{ApiKeysContext:()=>q,default:()=>T,getServerSideProps:()=>E});var i=a(63865),r=a(9455),n=a(30671),c=a(49407),d=a(89600),p=a(8732),o=a(82015),u=a.n(o),x=a(95222),h=a(20048),m=a.n(h),y=a(58548),f=a(55158),g=a(24671),j=a(63715),A=a(32415),v=a(62506);function b({apiKeyObject:e,setTargetApiKey:t}){let[a,s]=u().useState(!1);return(0,p.jsxs)("div",{className:"card no-hover justify-between items-center"+(e.scope.match(/fullAccess/)?" green":""),onClick:a=>{a.target?.closest("button")||(t(e),(0,f.PB)("target-media-popup"))},children:[a&&(0,p.jsx)(A.A,{width:"20px"}),(0,p.jsxs)("div",{className:"text-sm flex-wrap",children:[(0,p.jsx)("div",{children:e.scope.match(/readOnly/)?(0,p.jsx)("span",{className:"notification"}):e.scope.match(/fullAccess/)?(0,p.jsx)("span",{className:"notification success"}):"No Scope"}),(0,p.jsx)("span",{className:"title text-xl",style:{fontSize:"16px"},children:e.name}),(0,p.jsxs)("span",{className:"text-slate-400 ",children:["Created: ",e.date_created.substring(0,24)]})]}),(0,p.jsxs)(v.A,{children:[(0,p.jsx)("button",{className:"outlined light-gray small-text",onClick:t=>{alert(e.apiKeyPayload)},children:"Reveal Api Key"}),(0,p.jsx)("button",{className:"outlined light-gray small-text",onClick:t=>{navigator.clipboard.writeText(e.apiKeyPayload).then(()=>{alert("Api Key Copied To Clipboard")})},children:"Copy Api Key"}),(0,p.jsx)("button",{className:"outlined light-gray small-text"+(a?" pointer-events-none opacity-40":""),onClick:t=>{s(!0),window.confirm("Delete this Api Key?")?(0,j.A)("/api/deleteApiKey",{method:"post",body:e},!0).then(e=>{}).finally(()=>{window.location.reload()}):s(!1)},children:"Delete Api Key"})]})]})}function k({user:e,apiKeys:t,setTargetApiKey:a}){return(0,p.jsx)(u().Fragment,{children:(0,p.jsxs)("section",{className:"p-0 items-start gap-4 overflow-visible bg-transparent border-transparent",children:[(0,p.jsx)("div",{className:"w-full flex-col items-stretch gap-4",children:t&&t[0]&&t.map((e,t)=>(0,p.jsx)(b,{apiKeyObject:e,setTargetApiKey:a},t))}),!t||!t[0]&&(0,p.jsxs)("div",{className:"button outlined gray dashed w-full p-10 flex-col",onClick:e=>{(0,f.PB)("add-new-api-key-popup")},children:[(0,p.jsx)("span",{className:"text-slate-400",children:"No Api Keys Added."}),(0,p.jsx)("span",{className:"",children:"Add Api Key"})]})]})})}function _(e){let{user:t,apiKeys:a,setApiKeys:s,setTargetApiKey:l}=u().useContext(q);return(0,p.jsxs)(u().Fragment,{children:[(0,p.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,p.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,p.jsx)("h1",{className:"text-3xl m-0",children:"Api Keys"}),(0,p.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,f.PB)("add-new-api-key-popup")},children:[(0,p.jsx)("span",{className:"symbol",children:"+"}),(0,p.jsx)("span",{children:"Add New Api Key"})]})]}),(0,p.jsx)(y.A,{user:t})]}),t?.verification_status?.toString().match(/1/)?(0,p.jsx)(k,{apiKeys:a,setTargetApiKey:l,user:t}):(0,p.jsx)(g.A,{})]})}function w({targetApiKey:e}){let[t,a]=u().useState(!1);return(0,p.jsxs)(f.Ay,{title:"target-api-key-preview-popup",noContainer:!0,fullPage:!0,children:[t&&(0,p.jsx)(A.A,{}),e&&(0,p.jsx)(u().Fragment,{children:(0,p.jsx)("span",{children:"Target Api Key"})})]})}var N=a(27462);function S({targetApiKey:e}){async function t(e){return await (0,N.A)({tableName:"api_keys",columnName:"slug",value:e})}let[a,l]=u().useState(!1),[i,r]=u().useState(null);return(0,p.jsxs)(f.Ay,{title:"add-new-api-key-popup",children:[a&&(0,p.jsx)(A.A,{}),(0,p.jsx)("h4",{className:"m-0",children:"Add New Api Key"}),(0,p.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-2",onSubmit:e=>{e.preventDefault(),l(!0);let t=e.target,a={api_key_name:t.api_key_name.value,api_key_slug:t.api_key_slug.value,api_key_scope:t.api_key_scope.value,target_database:t.target_database?.value||void 0,target_table:t.target_table?.value||void 0};(0,j.A)("/api/addApiKey",{method:"post",body:a},!0).then(e=>{e.success?window.location.reload():setTimeout(()=>{l(!1)},2e3)})},children:[i&&(0,p.jsx)("div",{children:(0,p.jsx)("span",{children:i})}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"api_key_name",children:"Api Key Name"}),(0,p.jsx)("input",{type:"text",name:"api_key_name",id:"api_key_name",placeholder:"Api Key Name",onInput:e=>{let t=e.target;t&&(t.closest("form").api_key_slug.value=t.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,""))},required:!0})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"api_key_slug",children:"Api Key Slug"}),(0,p.jsx)("input",{type:"text",name:"api_key_slug",id:"api_key_slug",placeholder:"Api Key Slug",onInput:e=>{let a=e.target;a?.value.match(/./)?(a?.classList.remove("warning"),r(null)):a?.classList.add("warning"),window.clearTimeout(s),s=setTimeout(()=>{t(a.value).then(e=>{e.result?(a?.classList.add("warning"),r("Duplicate Table Name")):(a?.classList.remove("warning"),r(null))})},300)},required:!0})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsxs)("div",{className:"",children:[(0,p.jsx)("label",{htmlFor:"api_key_scope",children:"Api Scope"}),(0,p.jsxs)("div",{className:"dropdown-wrapper reversed",children:[(0,p.jsx)("span",{className:"px-2 py-1 bg-slate-100 rounded-full text-xs font-semibold",children:"Info"}),(0,p.jsx)("div",{className:"dropdown always left-aligned -ml-10 -mb-2",style:{minWidth:"300px"},children:(0,p.jsxs)("div",{className:"flex-col items-start gap-2 text-sm leading-snug",children:[(0,p.jsx)("span",{children:"Scope is the range of access the API Key can have"}),(0,p.jsxs)("ul",{className:"ml-0 pl-4 flex flex-col gap-2",children:[(0,p.jsx)("li",{children:(0,p.jsxs)("span",{children:[(0,p.jsx)("b",{children:"Read Only:"})," Can only read from databases"]})}),(0,p.jsx)("li",{children:(0,p.jsxs)("span",{children:[(0,p.jsx)("b",{children:"Full Access:"})," Can read and Write to databases"]})})]})]})})]})]}),(0,p.jsxs)("select",{name:"api_key_scope",id:"api_key_scope",children:[(0,p.jsx)("option",{value:"readOnly",children:"Read Only"}),(0,p.jsx)("option",{value:"fullAccess",children:"Full Access"})]})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"target_database",children:"Target Databases"}),(0,p.jsx)("input",{type:"text",name:"target_database",id:"target_database",placeholder:"Target Databases (optional). Comma Separated"})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"target_table",children:"Target Tables"}),(0,p.jsx)("input",{type:"text",name:"target_table",id:"target_table",placeholder:"Target Tables (optional). Comma Separated"})]}),(0,p.jsx)("button",{type:"submit",className:a?" pointer-events-none opacity-40":"",children:"Create New Api Key"})]})]})}var P=a(67216),M=a.n(P),C=a(77463),K=a.n(C);let q=u().createContext({});function T({user:e,fetchedApiKeys:t}){let a=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("title",{children:"Api Keys | Datasquirel"}),(0,p.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[s,l]=u().useState(t),[i,r]=u().useState(null),[n,c]=u().useState(null);return(0,p.jsx)(q.Provider,{value:{user:e,apiKeys:s,setApiKeys:l,targetApiKey:n,setTargetApiKey:c,newApiKey:i,setNewApiKey:r},children:(0,p.jsxs)(u().Fragment,{children:[(0,p.jsx)(x.A,{head:a,user:e,children:(0,p.jsx)(_,{})}),n&&(0,p.jsx)(w,{targetApiKey:n}),(0,p.jsx)(S,{})]})})}async function E({req:e,res:t,query:a}){let s=await m()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let l=await M()(`SELECT * FROM api_keys WHERE user_id='${s.id}'`),i=[];if(l&&l[0])for(let e=0;e{a.d(t,{Ay:()=>n,PB:()=>c,fs:()=>d});var s=a(8732),l=a(58150),i=a(82015),r=a.n(i);function n({children:e,title:t,data:a,fullPage:i,wrapperClasses:n,closePopupDispatch:c,wrapperStyle:p,noContainer:o}){return i?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(n||""),"data-popupid":t||null,style:p,children:[o?(0,s.jsx)(r().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{d(),c&&c()},children:(0,s.jsx)(l.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[o?(0,s.jsx)(r().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),o&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]})}function c(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t&&t(a))}function d(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},24671:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732);function l(e){return(0,s.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,s.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}a(82015)},62506:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732),l=a(82015),i=a.n(l);function r({children:e,column:t,className:a}){let l=i().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:l,children:e})}},27462:(e,t,a)=>{a.d(t,{A:()=>l}),a(22326);var s=a(63715);async function l({tableName:e,columnName:t,value:a,dbFullName:l,dispatch:i,userId:r,dbId:n}){return await (0,s.A)(`/api/checkDuplicateData?tableName=${e}&type=${t}&value=${a}${l?"&dbFullName="+l:""}${r?"&userId="+r:""}${n?"&dbId="+n:""}`)}},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070],()=>a(30284));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9419,e.ids=[9419],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},50665:(e,t,a)=>{a.r(t),a.d(t,{config:()=>D,default:()=>q,getServerSideProps:()=>F,getStaticPaths:()=>E,getStaticProps:()=>T,reportWebVitals:()=>z,routeModule:()=>L,unstable_getServerProps:()=>H,unstable_getServerSideProps:()=>R,unstable_getStaticParams:()=>G,unstable_getStaticPaths:()=>I,unstable_getStaticProps:()=>O});var s,l={};a.r(l),a.d(l,{ApiKeysContext:()=>M,default:()=>C,getServerSideProps:()=>K});var i=a(63865),r=a(9455),n=a(30671),c=a(5583),d=a(19796),p=a(8732),o=a(82015),u=a.n(o),x=a(25562),h=a(92702),m=a(53926),y=a(66485),f=a(91140),g=a(46169),j=a(16757),A=a(55904);function v({apiKeyObject:e,setTargetApiKey:t}){let[a,s]=u().useState(!1);return(0,p.jsxs)("div",{className:"card no-hover justify-between items-center"+(e.scope.match(/fullAccess/)?" green":""),onClick:a=>{a.target?.closest("button")||(t(e),(0,f.PB)("target-media-popup"))},children:[a&&(0,p.jsx)(j.A,{width:"20px"}),(0,p.jsxs)("div",{className:"text-sm flex-wrap",children:[(0,p.jsx)("div",{children:e.scope.match(/readOnly/)?(0,p.jsx)("span",{className:"notification"}):e.scope.match(/fullAccess/)?(0,p.jsx)("span",{className:"notification success"}):"No Scope"}),(0,p.jsx)("span",{className:"title text-xl",style:{fontSize:"16px"},children:e.name}),(0,p.jsxs)("span",{className:"text-slate-400 ",children:["Created: ",e.date_created.substring(0,24)]})]}),(0,p.jsxs)(A.A,{children:[(0,p.jsx)("button",{className:"outlined light-gray small-text",onClick:t=>{alert(e.apiKeyPayload)},children:"Reveal Api Key"}),(0,p.jsx)("button",{className:"outlined light-gray small-text",onClick:t=>{navigator.clipboard.writeText(e.apiKeyPayload).then(()=>{alert("Api Key Copied To Clipboard")})},children:"Copy Api Key"}),(0,p.jsx)("button",{className:"outlined light-gray small-text"+(a?" pointer-events-none opacity-40":""),onClick:t=>{s(!0),window.confirm("Delete this Api Key?")?(0,g.A)("/api/deleteApiKey",{method:"post",body:e},!0).then(e=>{}).finally(()=>{window.location.reload()}):s(!1)},children:"Delete Api Key"})]})]})}function b({user:e,apiKeys:t,setTargetApiKey:a}){return(0,p.jsx)(u().Fragment,{children:(0,p.jsxs)("section",{className:"p-0 items-start gap-4 overflow-visible bg-transparent border-transparent",children:[(0,p.jsx)("div",{className:"w-full flex-col items-stretch gap-4",children:t&&a&&t[0]&&t.map((e,t)=>(0,p.jsx)(v,{apiKeyObject:e,setTargetApiKey:a},t))}),!t||!t[0]&&(0,p.jsxs)("div",{className:"button outlined gray dashed w-full p-10 flex-col",onClick:e=>{(0,f.PB)("add-new-api-key-popup")},children:[(0,p.jsx)("span",{className:"text-slate-400",children:"No Api Keys Added."}),(0,p.jsx)("span",{className:"",children:"Add Api Key"})]})]})})}function k(){let{user:e,apiKeys:t,setApiKeys:a,setTargetApiKey:s}=u().useContext(M);return(0,p.jsxs)(u().Fragment,{children:[(0,p.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,p.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,p.jsx)("h1",{className:"text-3xl m-0",children:"Api Keys"}),(0,p.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,f.PB)("add-new-api-key-popup")},children:[(0,p.jsx)("span",{className:"symbol",children:"+"}),(0,p.jsx)("span",{children:"Add New Api Key"})]})]}),(0,p.jsx)(m.A,{user:e})]}),e?.verification_status?.toString().match(/1/)?(0,p.jsx)(b,{apiKeys:t,setTargetApiKey:s,user:e}):(0,p.jsx)(y.A,{})]})}function _({targetApiKey:e}){let[t,a]=u().useState(!1);return(0,p.jsxs)(f.Ay,{title:"target-api-key-preview-popup",noContainer:!0,fullPage:!0,children:[t&&(0,p.jsx)(j.A,{}),e&&(0,p.jsx)(u().Fragment,{children:(0,p.jsx)("span",{children:"Target Api Key"})})]})}var w=a(24872);function N(){async function e(e){return await (0,w.A)({tableName:"api_keys",columnName:"slug",value:e})}let[t,a]=u().useState(!1),[l,i]=u().useState(null);return(0,p.jsxs)(f.Ay,{title:"add-new-api-key-popup",children:[t&&(0,p.jsx)(j.A,{}),(0,p.jsx)("h4",{className:"m-0",children:"Add New Api Key"}),(0,p.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-2",onSubmit:e=>{e.preventDefault(),a(!0);let t=e.target,s={api_key_name:t.api_key_name.value,api_key_slug:t.api_key_slug.value,api_key_scope:t.api_key_scope.value,target_database:t.target_database?.value||void 0,target_table:t.target_table?.value||void 0};(0,g.A)("/api/addApiKey",{method:"post",body:s},!0).then(e=>{e.success?window.location.reload():setTimeout(()=>{a(!1)},2e3)})},children:[l&&(0,p.jsx)("div",{children:(0,p.jsx)("span",{children:l})}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"api_key_name",children:"Api Key Name"}),(0,p.jsx)("input",{type:"text",name:"api_key_name",id:"api_key_name",placeholder:"Api Key Name",onInput:e=>{let t=e.target;t&&(t.closest("form").api_key_slug.value=t.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,""))},required:!0})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"api_key_slug",children:"Api Key Slug"}),(0,p.jsx)("input",{type:"text",name:"api_key_slug",id:"api_key_slug",placeholder:"Api Key Slug",onInput:t=>{let a=t.target;a?.value.match(/./)?(a?.classList.remove("warning"),i(null)):a?.classList.add("warning"),window.clearTimeout(s),s=setTimeout(()=>{e(a.value).then(e=>{e.result?(a?.classList.add("warning"),i("Duplicate Table Name")):(a?.classList.remove("warning"),i(null))})},300)},required:!0})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsxs)("div",{className:"",children:[(0,p.jsx)("label",{htmlFor:"api_key_scope",children:"Api Scope"}),(0,p.jsxs)("div",{className:"dropdown-wrapper reversed",children:[(0,p.jsx)("span",{className:"px-2 py-1 bg-slate-100 rounded-full text-xs font-semibold",children:"Info"}),(0,p.jsx)("div",{className:"dropdown always left-aligned -ml-10 -mb-2",style:{minWidth:"300px"},children:(0,p.jsxs)("div",{className:"flex-col items-start gap-2 text-sm leading-snug",children:[(0,p.jsx)("span",{children:"Scope is the range of access the API Key can have"}),(0,p.jsxs)("ul",{className:"ml-0 pl-4 flex flex-col gap-2",children:[(0,p.jsx)("li",{children:(0,p.jsxs)("span",{children:[(0,p.jsx)("b",{children:"Read Only:"})," Can only read from databases"]})}),(0,p.jsx)("li",{children:(0,p.jsxs)("span",{children:[(0,p.jsx)("b",{children:"Full Access:"})," Can read and Write to databases"]})})]})]})})]})]}),(0,p.jsxs)("select",{name:"api_key_scope",id:"api_key_scope",children:[(0,p.jsx)("option",{value:"readOnly",children:"Read Only"}),(0,p.jsx)("option",{value:"fullAccess",children:"Full Access"})]})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"target_database",children:"Target Databases"}),(0,p.jsx)("input",{type:"text",name:"target_database",id:"target_database",placeholder:"Target Databases (optional). Comma Separated"})]}),(0,p.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,p.jsx)("label",{htmlFor:"target_table",children:"Target Tables"}),(0,p.jsx)("input",{type:"text",name:"target_table",id:"target_table",placeholder:"Target Tables (optional). Comma Separated"})]}),(0,p.jsx)("button",{type:"submit",className:t?" pointer-events-none opacity-40":"",children:"Create New Api Key"})]})]})}var S=a(71934),P=a(71205);let M=u().createContext({});function C({user:e,fetchedApiKeys:t}){let a=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("title",{children:"Api Keys | Datasquirel"}),(0,p.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[s,l]=u().useState(t),[i,r]=u().useState(null),[n,c]=u().useState(null);return(0,p.jsx)(M.Provider,{value:{user:e,apiKeys:s,setApiKeys:l,targetApiKey:n,setTargetApiKey:c,newApiKey:i,setNewApiKey:r},children:(0,p.jsxs)(u().Fragment,{children:[(0,p.jsx)(x.A,{head:a,user:e,children:(0,p.jsx)(k,{})}),n&&(0,p.jsx)(_,{targetApiKey:n}),(0,p.jsx)(N,{})]})})}async function K({req:e,res:t,query:a}){let s=await (0,h.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let l=await (0,S.A)(`SELECT * FROM api_keys WHERE user_id='${s.id}'`),i=[];if(l&&l[0])for(let e=0;e{a.d(t,{Ay:()=>n,PB:()=>c,fs:()=>d});var s=a(8732),l=a(58150),i=a(82015),r=a.n(i);function n({children:e,title:t,data:a,fullPage:i,wrapperClasses:n,closePopupDispatch:c,wrapperStyle:p,noContainer:o}){return i?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(n||""),"data-popupid":t||null,style:p,children:[o?(0,s.jsx)(r().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{d(),c&&c()},children:(0,s.jsx)(l.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[o?(0,s.jsx)(r().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),o&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{d(),c&&c()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{d(),c&&c()}})]})}function c(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t?.(a))}function d(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},66485:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732);function l(){return(0,s.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,s.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}a(82015)},55904:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732),l=a(82015),i=a.n(l);function r({children:e,column:t,className:a}){let l=i().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:l,children:e})}},24872:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(46169);async function l({tableName:e,columnName:t,value:a,dbFullName:l,dispatch:i,userId:r,dbId:n}){return await (0,s.A)(`/api/checkDuplicateData?tableName=${e}&type=${t}&value=${a}${l?"&dbFullName="+l:""}${r?"&userId="+r:""}${n?"&dbId="+n:""}`)}},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392],()=>a(50665));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js.nft.json index 21d1675..b068359 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/api-keys.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js index 2e17cb5..ff71706 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2504,e.ids=[2504],e.modules={30671:(e,s)=>{Object.defineProperty(s,"M",{enumerable:!0,get:function(){return function e(s,t){return t in s?s[t]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,t)):"function"==typeof s&&"default"===t?s:void 0}}})},88297:(e,s,t)=>{t.r(s),t.d(s,{config:()=>F,default:()=>U,getServerSideProps:()=>D,getStaticPaths:()=>V,getStaticProps:()=>O,reportWebVitals:()=>z,routeModule:()=>Y,unstable_getServerProps:()=>Q,unstable_getServerSideProps:()=>X,unstable_getStaticParams:()=>W,unstable_getStaticPaths:()=>B,unstable_getStaticProps:()=>H});var a={};t.r(a),t.d(a,{ConnectContext:()=>T,default:()=>q,getServerSideProps:()=>G});var l=t(63865),r=t(9455),n=t(30671),i=t(49407),d=t(89600),c=t(8732),o=t(82015),u=t.n(o),h=t(95222),p=t(20048),x=t.n(p),m=t(67216),j=t.n(m),y=t(58548),f=t(96089),b=t(25088);function g(e){let{user:s,query:t,mariadbUserCred:a}=u().useContext(T);return(0,c.jsx)("section",{className:"paper",children:(0,c.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,c.jsx)("span",{children:"You can connect to your database remotely using any MySQL/Mariadb client. Use these credentials to connect:"}),(0,c.jsx)("hr",{}),(0,c.jsxs)("ul",{className:"m-0",children:[(0,c.jsxs)("li",{children:["Server:"," ",(0,c.jsx)("b",{children:"172.72.0.24"})]}),(0,c.jsxs)("li",{children:["Username: ",(0,c.jsx)("b",{children:a.mariadb_user})]}),(0,c.jsxs)("li",{children:["Host: ",(0,c.jsx)("b",{children:a.mariadb_host})]}),(0,c.jsxs)("li",{children:["Password: ",(0,c.jsx)("b",{children:"*****************"}),(0,c.jsx)("button",{className:"ghost inline-block -my-4",onClick:e=>{navigator.clipboard.writeText(a.mariadb_pass||"").then(()=>{window.alert("Copied Password!")})},children:(0,c.jsx)(f.A,{})})]}),(0,c.jsx)("li",{children:(0,c.jsxs)("div",{className:"flex",children:["SSL Certificate:"," ",(0,c.jsx)("b",{children:(0,c.jsx)("span",{className:"flex items-center gap-2",children:(0,c.jsxs)("a",{href:"https://datasquirel.com/documents/ssl/ca-cert.pem",className:"flex items-center gap-2 border-none hover:opacity-60",target:"_blank",children:[(0,c.jsx)(b.A,{}),"Download"]})})})]})})]})]})})}var v=t(55158),A=t(32415),E=t(63715),S=t(11717),N=t(96725);function w({mariadbUser:e}){let{setTargetMariadbUser:s}=u().useContext(T),t=!!String(e.primary)?.match(/1/),[a,l]=u().useState(!1);return(0,c.jsxs)("div",{className:"card w-full col"+(t?" green":""),children:[a&&(0,c.jsx)(A.A,{width:"25px"}),(0,c.jsxs)("div",{className:"w-full justify-between h-auto md:h-8 flex-wrap",children:[(0,c.jsxs)("span",{className:"title",children:[e.username,"@",e.host]}),(0,c.jsxs)("div",{children:[t&&(0,c.jsx)("span",{className:"info small w-auto",children:"Primary User"}),(0,c.jsx)("button",{className:"ghost",title:"Edit User",onClick:t=>{s(e),(0,v.PB)("edit-mariadb-user-popup")},children:(0,c.jsx)(S.A,{size:20})}),!t&&(0,c.jsx)("button",{className:"ghost -ml-6",title:"Edit User",onClick:s=>{window.confirm("Are you sure you want to delete this User?")&&(l(!0),(0,E.A)("/api/sql-users/delete",{method:"POST",body:{id:e.id}},!0).then(e=>{e.success?window.location.reload():e.msg&&window.alert(e.msg)}).finally(()=>{setTimeout(()=>{l(!1)},1e3)}))},children:(0,c.jsx)(N.A,{})})]})]}),(0,c.jsx)("hr",{}),(0,c.jsxs)("ul",{className:"m-0",children:[(0,c.jsxs)("li",{children:["Username: ",(0,c.jsx)("b",{children:e.username})]}),(0,c.jsxs)("li",{children:["Host: ",(0,c.jsx)("b",{children:e.host}),(0,c.jsx)("span",{className:"info gray font-normal",children:"% is a wildcard. Example: 192.168.1.%"})]}),(0,c.jsxs)("li",{children:["Password: ",(0,c.jsx)("b",{children:"*****************"}),(0,c.jsx)("button",{className:"ghost inline-block -my-4",onClick:s=>{navigator.clipboard.writeText(e.password||"").then(()=>{window.alert("Copied Password!")})},children:(0,c.jsx)(f.A,{size:20})})]})]})]})}function k(e){let{mariadbUsers:s}=u().useContext(T);return(0,c.jsxs)("section",{className:"paper",children:[(0,c.jsxs)("div",{className:"w-full justify-between",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"SQL Users"}),(0,c.jsx)("div",{children:(0,c.jsx)("button",{onClick:e=>{(0,v.PB)("new-mariadb-user-popup")},children:"Add SQL User"})})]}),(0,c.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,c.jsx)("span",{children:"You can customize your SQL users and permissions here. You can add up to 10 hosts/IP addresses (including your primary host)"}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"grid w-full grid-cols-1 xl:grid-cols-2 gap-6",children:s.map((e,s)=>(0,c.jsx)(w,{mariadbUser:e},s+1))})]})]})}function P(e){let{user:s,query:t,mariadbUserCred:a}=u().useContext(T);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsx)("div",{className:"",children:(0,c.jsx)("h1",{className:"text-3xl m-0",children:"Connect"})}),(0,c.jsx)(y.A,{user:s})]}),(0,c.jsx)(g,{}),(0,c.jsx)(k,{})]})}function L({grants:e,setGrants:s,edit:t}){let{user:a,targetMariadbUser:l}=u().useContext(T),r=!!String(l?.primary).match(/1/)&&t,n=!!e.find(e=>"*"==e.database),i=!!e.find(e=>"*"==e.table),d=!!e.find(e=>e.privileges.includes("ALL PRIVILEGES")),[o,h]=u().useState([]),[p,x]=u().useState({}),[m,j]=u().useState([]),[y,f]=u().useState({}),[b,g]=u().useState(["ALL PRIVILEGES"]),[v,A]=u().useState("ALL PRIVILEGES"),[E,S]=u().useState(!1);return(0,c.jsxs)("div",{id:"grant-select-block",className:"flex flex-col items-stretch w-full p-6 border border-slate-200 border-solid rounded",children:[(0,c.jsx)("h4",{className:"m-0 text-lg",children:"Grants"}),(0,c.jsx)("span",{children:"This section determines fine grained access of this user to databases and tables"}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"flex-wrap",children:e?.[0]?e.map((t,a)=>(0,c.jsxs)("div",{className:"text-sm pr-10 bg-secondary text-white px-3 py-2 rounded flex-wrap relative",children:[(0,c.jsx)("span",{children:t.privileges}),(0,c.jsx)("span",{children:"="}),(0,c.jsxs)("span",{children:[" ",t.database.replace(/datasquirel_user_\d+_/,"")]}),(0,c.jsx)("span",{children:"."}),(0,c.jsx)("span",{children:t.table}),!r&&(0,c.jsx)("div",{className:"button white absolute top-1.5 right-1.5 p-2 w-6 h-6",onClick:t=>{let l=[...e];l.splice(a,1),s(l)},children:"x"})]})):(0,c.jsx)("span",{className:"text-slate-400 px-4 py-2 bg-slate-100 w-full flex items-center justify-center",children:"No Grants"})}),(0,c.jsx)("hr",{}),n&&i&&d?(0,c.jsx)("span",{className:"text-sm text-slate-500",children:'All Privileges have been granted! Delete "ALL PRIVILEGES on *.*" to add fine-grained privileges'}):E?(0,c.jsx)(c.Fragment,{children:r?(0,c.jsx)("span",{className:"text-slate-400",children:"Primary users have full control over all databases."}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:"grants-database",children:"Database"}),(0,c.jsxs)("select",{name:"grants-database",id:"grants-database",className:"text-sm",onChange:e=>{let s=e.target.value;if("NULL"==s)return;let t=o.find(e=>e.db_full_name==s);t&&x(t)},children:[(0,c.jsx)("option",{value:"*",children:"--ALL-DATABASES--"}),o.map((e,s)=>(0,c.jsx)("option",{value:e.db_full_name,children:e.db_name},s+1))]})]}),(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:"grants-table",children:"Table"}),(0,c.jsxs)("select",{name:"grants-table",id:"grants-table",className:"text-sm",onChange:e=>{let s=e.target.value;if("NULL"==s)return;let t=m.find(e=>e.table_slug==s);t&&f(t)},children:[(0,c.jsx)("option",{value:"*",children:"--ALL-TABLES--"}),m?.[0]&&m.map((e,s)=>(0,c.jsx)("option",{value:e.table_slug,children:e.table_name},s+1))]})]}),(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:"grants-databases",children:"Permissions"}),(0,c.jsx)("div",{className:"flex-wrap gap-y-2 mb-1",children:b?.[0]?b.map((e,s)=>(0,c.jsxs)("span",{className:"text-xs px-2 py-1 border border-solid border-slate-200 rounded",children:[e,(0,c.jsx)("span",{className:"cursor-pointer p-2 hover:opacity-50",onClick:e=>{let t=[...b];t.splice(s,1),g(t)},children:"x"})]})):(0,c.jsx)("span",{className:"text-xs px-3 py-1 bg-slate-100 text-slate-400",children:"No Permissions Selected"})}),(0,c.jsxs)("div",{className:"w-full items-stretch",children:[(0,c.jsx)("select",{name:"grants-databases",id:"grants-databases",className:"text-sm",onChange:e=>{A(e.target.value)},children:["ALL PRIVILEGES","ALTER","ALTER ROUTINE","CREATE","CREATE ROUTINE","CREATE TEMPORARY TABLES","CREATE VIEW","DELETE","DROP","EVENT","EXECUTE","FILE","INDEX","INSERT","LOCK TABLES","PROCESS","REFERENCES","RELOAD","REPLICATION CLIENT","REPLICATION SLAVE","SELECT","SHOW VIEW","SUPER","TRIGGER","UPDATE","USAGE"].map((e,s)=>(0,c.jsx)("option",{value:e,children:e},s))}),(0,c.jsx)("div",{className:"button outlined gray text-2xl",onClick:e=>{if(!b.includes(v)){if(b.includes("ALL PRIVILEGES")){alert("ALL PRIVILEGES already covers for the rest. Remove ALL PRIVILEGES permission to add others");return}g([...b,v])}},children:"+"})]})]}),!r&&(0,c.jsxs)("div",{className:"button outlined secondary",onClick:t=>{if(!b?.[0]){alert("Please select atleast 1 permission. *REMEMBER to click the + button to add the permission to the list");return}s([...e,{database:p.db_full_name||"*",privileges:b,table:y.table_slug||"*"}]),S(!1)},children:[(0,c.jsx)("span",{className:"text-2xl h-6 flex items-center justify-center",children:"+"}),"\xa0Add Grant"]}),(0,c.jsx)("div",{className:"button outlined gray",onClick:()=>{S(!1)},children:"Cancel"})]})}):r?(0,c.jsx)("span",{className:"text-slate-400",children:"Primary users have full control over all databases."}):(0,c.jsxs)("div",{className:"button outlined gray",onClick:e=>{S(!0)},children:[(0,c.jsx)("span",{className:"text-2xl h-6 flex items-center justify-center",children:"+"}),"\xa0Add Grant"]})]})}function C({mariaDBUser:e,edit:s,username:t}){let{user:a}=u().useContext(T),l=e?Object.keys(e):["username","host","password"],r=/username|host|password/,n=/username/,i=/host/,d=(()=>{try{if(s&&e?.grants)return JSON.parse(e.grants);return null}catch(e){return null}})(),[o,h]=u().useState(d||[{database:"*",table:"*",privileges:["ALL PRIVILEGES"]}]),[p,x]=u().useState(!1);return(0,c.jsxs)("form",{onSubmit:t=>{t.preventDefault(),console.log("form clicked");let a=Array.from(t.target),l={};if(a.forEach(e=>{"INPUT"==e.nodeName&&(l[e.name]=e.value)}),s&&delete l.username,!o?.[0]){alert("Please add at least one grant");return}x(!0),(0,E.A)(s?"/api/sql-users/update":"/api/sql-users/create",{method:"POST",body:{data:l,edit:!!s,prev:e,grants:o}},!0).then(e=>{e.success?window.location.reload():e.msg&&(window.alert(e.msg),x(!1))})},className:"w-full gap-4 flex flex-col",children:[p&&(0,c.jsx)(A.A,{width:"25px"}),l.map((s,t)=>{let l=e?e[s]:"username"==s?`dsql_user_${a.id}`:null,d=n.test(s),o=i.test(s);return s.match(r)?(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:s,children:s}),(0,c.jsx)("input",{type:s.match("password")?"password":"text",name:s,id:s,defaultValue:l||void 0,readOnly:d,className:d?"bg-slate-100 opacity-50 pointer-events-none":"",placeholder:s,required:o})]},t+1):null}),(0,c.jsx)(L,{grants:o,setGrants:h,edit:s}),(0,c.jsx)("button",{type:"submit",children:s?"Update User":"Create SQL User"})]})}function M(e){let{targetMariadbUser:s}=u().useContext(T),[t,a]=u().useState(!1);return(0,c.jsx)(v.Ay,{title:"edit-mariadb-user-popup",children:t&&s?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:(0,c.jsxs)("div",{className:"flex",children:[(0,c.jsx)("span",{children:"Edit"}),(0,c.jsxs)("span",{className:"info inline w-auto text-xl green",children:[s.username,"@",s.host]})]})}),(0,c.jsx)("hr",{}),(0,c.jsx)(C,{mariaDBUser:s,edit:!0})]}):(0,c.jsx)("div",{className:"p-20",children:(0,c.jsx)(A.A,{width:"25px"})})})}function _(e){return(0,c.jsxs)(v.Ay,{title:"new-mariadb-user-popup",children:[(0,c.jsx)("h3",{children:"New MariaDB User"}),(0,c.jsx)("hr",{}),(0,c.jsx)(C,{})]})}var R=t(77463),I=t.n(R);let T=u().createContext({});function q({user:e,query:s,mariadbUserCred:t,mariadbUsers:a}){let l=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"SQL Connect | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Connect to your database remotely"})]}),[r,n]=u().useState(null),[i,d]=u().useState(null);return(0,c.jsx)(T.Provider,{value:{user:e,query:s,mariadbUserCred:t,mariadbUsers:a,targetMariadbUser:r,setTargetMariadbUser:n,refresh:i,setRefresh:d},children:(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)(h.A,{head:l,user:e,aceEditor:!0,children:(0,c.jsx)(P,{})}),(0,c.jsx)(M,{}),(0,c.jsx)(_,{})]})})}async function G({req:e,res:s,query:t}){let a=await x()(e,s);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let l=await j()("SELECT mariadb_user, mariadb_host, mariadb_pass FROM users WHERE id = ?",[a.id]),r=l?.[0]||{};r?.mariadb_pass&&(r.mariadb_pass=I()({encryptedString:r.mariadb_pass}));let n=await j()("SELECT * FROM mariadb_users WHERE user_id = ?",[a.id]);if(n?.[0])for(let e=0;e{t.d(s,{Ay:()=>i,PB:()=>d,fs:()=>c});var a=t(8732),l=t(58150),r=t(82015),n=t.n(r);function i({children:e,title:s,data:t,fullPage:r,wrapperClasses:i,closePopupDispatch:d,wrapperStyle:o,noContainer:u}){return r?(0,a.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":s||null,style:o,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,a.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),d&&d()},children:(0,a.jsx)(l.A,{color:"white",size:20})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]}):(0,a.jsxs)("div",{className:"popup-bg","data-popupid":s||null,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,a.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,a.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]})}function d(e,s){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",s&&s(t))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},23293:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96725:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},96089:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},29743:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},11717:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]])},25294:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,s)=>{var t;Object.defineProperty(s,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var s=require("../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),a=s.X(0,[883,9821,9600,7070],()=>t(88297));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2504,e.ids=[2504],e.modules={30671:(e,s)=>{Object.defineProperty(s,"M",{enumerable:!0,get:function(){return function e(s,t){return t in s?s[t]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,t)):"function"==typeof s&&"default"===t?s:void 0}}})},35987:(e,s,t)=>{t.r(s),t.d(s,{config:()=>O,default:()=>T,getServerSideProps:()=>G,getStaticPaths:()=>U,getStaticProps:()=>q,reportWebVitals:()=>V,routeModule:()=>W,unstable_getServerProps:()=>H,unstable_getServerSideProps:()=>B,unstable_getStaticParams:()=>z,unstable_getStaticPaths:()=>F,unstable_getStaticProps:()=>D});var a={};t.r(a),t.d(a,{ConnectContext:()=>_,default:()=>R,getServerSideProps:()=>I});var r=t(63865),l=t(9455),n=t(30671),i=t(5583),d=t(19796),c=t(8732),o=t(82015),u=t.n(o),h=t(25562),p=t(92702),x=t(71934),m=t(53926),j=t(96089),y=t(25088);function f(){let{user:e,query:s,mariadbUserCred:t}=u().useContext(_);return(0,c.jsx)("section",{className:"paper",children:(0,c.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,c.jsx)("span",{children:"You can connect to your database remotely using any MySQL/Mariadb client. Use these credentials to connect:"}),(0,c.jsx)("hr",{}),(0,c.jsxs)("ul",{className:"m-0",children:[(0,c.jsxs)("li",{children:["Server:"," ",(0,c.jsx)("b",{children:"172.72.0.24"})]}),(0,c.jsxs)("li",{children:["Username: ",(0,c.jsx)("b",{children:t?.mariadb_user})]}),(0,c.jsxs)("li",{children:["Host: ",(0,c.jsx)("b",{children:t?.mariadb_host})]}),(0,c.jsxs)("li",{children:["Password: ",(0,c.jsx)("b",{children:"*****************"}),(0,c.jsx)("button",{className:"ghost inline-block -my-4",onClick:e=>{navigator.clipboard.writeText(t?.mariadb_pass||"").then(()=>{window.alert("Copied Password!")})},children:(0,c.jsx)(j.A,{})})]}),(0,c.jsx)("li",{children:(0,c.jsxs)("div",{className:"flex",children:["SSL Certificate:"," ",(0,c.jsx)("b",{children:(0,c.jsx)("span",{className:"flex items-center gap-2",children:(0,c.jsxs)("a",{href:"https://datasquirel.com/documents/ssl/ca-cert.pem",className:"flex items-center gap-2 border-none hover:opacity-60",target:"_blank",children:[(0,c.jsx)(y.A,{}),"Download"]})})})]})})]})]})})}var b=t(91140),g=t(16757),v=t(46169),A=t(11717),E=t(96725);function S({mariadbUser:e}){let{setTargetMariadbUser:s}=u().useContext(_),t=!!String(e.primary)?.match(/1/),[a,r]=u().useState(!1);return(0,c.jsxs)("div",{className:"card w-full col"+(t?" green":""),children:[a&&(0,c.jsx)(g.A,{width:"25px"}),(0,c.jsxs)("div",{className:"w-full justify-between h-auto md:h-8 flex-wrap",children:[(0,c.jsxs)("span",{className:"title",children:[e.username,"@",e.host]}),(0,c.jsxs)("div",{children:[t&&(0,c.jsx)("span",{className:"info small w-auto",children:"Primary User"}),(0,c.jsx)("button",{className:"ghost",title:"Edit User",onClick:t=>{s?.(e),(0,b.PB)("edit-mariadb-user-popup")},children:(0,c.jsx)(A.A,{size:20})}),!t&&(0,c.jsx)("button",{className:"ghost -ml-6",title:"Edit User",onClick:s=>{window.confirm("Are you sure you want to delete this User?")&&(r(!0),(0,v.A)("/api/sql-users/delete",{method:"POST",body:{id:e.id}},!0).then(e=>{e.success?window.location.reload():e.msg&&window.alert(e.msg)}).finally(()=>{setTimeout(()=>{r(!1)},1e3)}))},children:(0,c.jsx)(E.A,{})})]})]}),(0,c.jsx)("hr",{}),(0,c.jsxs)("ul",{className:"m-0",children:[(0,c.jsxs)("li",{children:["Username: ",(0,c.jsx)("b",{children:e.username})]}),(0,c.jsxs)("li",{children:["Host: ",(0,c.jsx)("b",{children:e.host}),(0,c.jsx)("span",{className:"info gray font-normal",children:"% is a wildcard. Example: 192.168.1.%"})]}),(0,c.jsxs)("li",{children:["Password: ",(0,c.jsx)("b",{children:"*****************"}),(0,c.jsx)("button",{className:"ghost inline-block -my-4",onClick:s=>{navigator.clipboard.writeText(e.password||"").then(()=>{window.alert("Copied Password!")})},children:(0,c.jsx)(j.A,{size:20})})]})]})]})}function N(){let{mariadbUsers:e}=u().useContext(_);return(0,c.jsxs)("section",{className:"paper",children:[(0,c.jsxs)("div",{className:"w-full justify-between",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"SQL Users"}),(0,c.jsx)("div",{children:(0,c.jsx)("button",{onClick:e=>{(0,b.PB)("new-mariadb-user-popup")},children:"Add SQL User"})})]}),(0,c.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,c.jsx)("span",{children:"You can customize your SQL users and permissions here. You can add up to 10 hosts/IP addresses (including your primary host)"}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"grid w-full grid-cols-1 xl:grid-cols-2 gap-6",children:e?.map((e,s)=>c.jsx(S,{mariadbUser:e},s+1))})]})]})}function w(){let{user:e,query:s,mariadbUserCred:t}=u().useContext(_);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsx)("div",{className:"",children:(0,c.jsx)("h1",{className:"text-3xl m-0",children:"Connect"})}),(0,c.jsx)(m.A,{user:e})]}),(0,c.jsx)(f,{}),(0,c.jsx)(N,{})]})}function k({grants:e,setGrants:s,edit:t}){let{user:a,targetMariadbUser:r}=u().useContext(_),l=!!String(r?.primary).match(/1/)&&t,n=!!e.find(e=>"*"==e.database),i=!!e.find(e=>"*"==e.table),d=!!e.find(e=>e.privileges.includes("ALL PRIVILEGES")),[o,h]=u().useState([]),[p,x]=u().useState(),[m,j]=u().useState([]),[y,f]=u().useState(),[b,g]=u().useState(["ALL PRIVILEGES"]),[v,A]=u().useState("ALL PRIVILEGES"),[E,S]=u().useState(!1);return(0,c.jsxs)("div",{id:"grant-select-block",className:"flex flex-col items-stretch w-full p-6 border border-slate-200 border-solid rounded",children:[(0,c.jsx)("h4",{className:"m-0 text-lg",children:"Grants"}),(0,c.jsx)("span",{children:"This section determines fine grained access of this user to databases and tables"}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"flex-wrap",children:e?.[0]?e.map((t,a)=>(0,c.jsxs)("div",{className:"text-sm pr-10 bg-secondary text-white px-3 py-2 rounded flex-wrap relative",children:[(0,c.jsx)("span",{children:t.privileges}),(0,c.jsx)("span",{children:"="}),(0,c.jsxs)("span",{children:[" ",t.database.replace(/datasquirel_user_\d+_/,"")]}),(0,c.jsx)("span",{children:"."}),(0,c.jsx)("span",{children:t.table}),!l&&(0,c.jsx)("div",{className:"button white absolute top-1.5 right-1.5 p-2 w-6 h-6",onClick:t=>{let r=[...e];r.splice(a,1),s(r)},children:"x"})]},a)):(0,c.jsx)("span",{className:"text-slate-400 px-4 py-2 bg-slate-100 w-full flex items-center justify-center",children:"No Grants"})}),(0,c.jsx)("hr",{}),n&&i&&d?(0,c.jsx)("span",{className:"text-sm text-slate-500",children:'All Privileges have been granted! Delete "ALL PRIVILEGES on *.*" to add fine-grained privileges'}):E?(0,c.jsx)(c.Fragment,{children:l?(0,c.jsx)("span",{className:"text-slate-400",children:"Primary users have full control over all databases."}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:"grants-database",children:"Database"}),(0,c.jsxs)("select",{name:"grants-database",id:"grants-database",className:"text-sm",onChange:e=>{let s=e.target.value;if("NULL"==s)return;let t=o.find(e=>e.db_full_name==s);t&&x(t)},children:[(0,c.jsx)("option",{value:"*",children:"--ALL-DATABASES--"}),o.map((e,s)=>(0,c.jsx)("option",{value:e.db_full_name,children:e.db_name},s+1))]})]}),(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:"grants-table",children:"Table"}),(0,c.jsxs)("select",{name:"grants-table",id:"grants-table",className:"text-sm",onChange:e=>{let s=e.target.value;if("NULL"==s)return;let t=m.find(e=>e.table_slug==s);t&&f(t)},children:[(0,c.jsx)("option",{value:"*",children:"--ALL-TABLES--"}),m?.[0]&&m.map((e,s)=>(0,c.jsx)("option",{value:e.table_slug,children:e.table_name},s+1))]})]}),(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:"grants-databases",children:"Permissions"}),(0,c.jsx)("div",{className:"flex-wrap gap-y-2 mb-1",children:b?.[0]?b.map((e,s)=>(0,c.jsxs)("span",{className:"text-xs px-2 py-1 border border-solid border-slate-200 rounded",children:[e,(0,c.jsx)("span",{className:"cursor-pointer p-2 hover:opacity-50",onClick:e=>{let t=[...b];t.splice(s,1),g(t)},children:"x"})]},s)):(0,c.jsx)("span",{className:"text-xs px-3 py-1 bg-slate-100 text-slate-400",children:"No Permissions Selected"})}),(0,c.jsxs)("div",{className:"w-full items-stretch",children:[(0,c.jsx)("select",{name:"grants-databases",id:"grants-databases",className:"text-sm",onChange:e=>{A(e.target.value)},children:["ALL PRIVILEGES","ALTER","ALTER ROUTINE","CREATE","CREATE ROUTINE","CREATE TEMPORARY TABLES","CREATE VIEW","DELETE","DROP","EVENT","EXECUTE","FILE","INDEX","INSERT","LOCK TABLES","PROCESS","REFERENCES","RELOAD","REPLICATION CLIENT","REPLICATION SLAVE","SELECT","SHOW VIEW","SUPER","TRIGGER","UPDATE","USAGE"].map((e,s)=>(0,c.jsx)("option",{value:e,children:e},s))}),(0,c.jsx)("div",{className:"button outlined gray text-2xl",onClick:e=>{if(!b.includes(v)){if(b.includes("ALL PRIVILEGES")){alert("ALL PRIVILEGES already covers for the rest. Remove ALL PRIVILEGES permission to add others");return}g([...b,v])}},children:"+"})]})]}),!l&&(0,c.jsx)("div",{className:"button outlined secondary",onClick:t=>{if(!b?.[0]){alert("Please select atleast 1 permission. *REMEMBER to click the + button to add the permission to the list");return}s([...e,{database:p?.db_full_name||"*",privileges:b,table:y?.table_slug||"*"}]),S(!1)},children:"Add"}),(0,c.jsx)("div",{className:"button outlined gray",onClick:()=>{S(!1)},children:"Cancel"})]})}):l?(0,c.jsx)("span",{className:"text-slate-400",children:"Primary users have full control over all databases."}):(0,c.jsxs)("div",{className:"button outlined gray",onClick:e=>{S(!0)},children:[(0,c.jsx)("span",{className:"text-2xl h-6 flex items-center justify-center",children:"+"}),"\xa0Add Grant"]})]})}function P({mariaDBUser:e,edit:s,username:t}){let{user:a}=u().useContext(_),r=a?.id==Number("1"),l=e?Object.keys(e):["username","host","password"],n=/username|host|password/,i=r?void 0:/username/,d=/host/,o=(()=>{try{if(s&&e?.grants)return JSON.parse(e.grants);return null}catch(e){return null}})(),[h,p]=u().useState(o||[{database:"*",table:"*",privileges:["ALL PRIVILEGES"]}]),[x,m]=u().useState(!1);return(0,c.jsxs)("form",{onSubmit:t=>{if(t.preventDefault(),!window.confirm(s?"Update this user?":"Create this new User?"))return;let a=Array.from(t.target),l={};if(a.forEach(e=>{"INPUT"==e.nodeName&&(l[e.name]=e.value)}),s&&!r&&delete l.username,!h?.[0]){alert("Please add at least one grant");return}m(!0),(0,v.A)(s?"/api/sql-users/update":"/api/sql-users/create",{method:"POST",body:{data:l,edit:!!s,prev:e,grants:h}},!0).then(e=>{e.success?window.location.reload():e.msg&&(window.alert(e.msg),m(!1))})},className:"w-full gap-4 flex flex-col",children:[x&&(0,c.jsx)(g.A,{width:"25px"}),l.map((s,t)=>{let r=e?e[s]:"username"==s?`dsql_user_${a?.id}`:null,l=i?.test(s),o=d.test(s);return s.match(n)?(0,c.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,c.jsx)("label",{htmlFor:s,children:s}),(0,c.jsx)("input",{type:s.match("password")?"password":"text",name:s,id:s,defaultValue:r||void 0,readOnly:l,className:l?"bg-slate-100 opacity-50 pointer-events-none":"",placeholder:s,required:o})]},t+1):null}),(0,c.jsx)(k,{grants:h,setGrants:p,edit:s}),(0,c.jsx)("button",{type:"submit",children:s?"Update User":"Create SQL User"})]})}function L(){let{targetMariadbUser:e}=u().useContext(_),[s,t]=u().useState(!1);return(0,c.jsx)(b.Ay,{title:"edit-mariadb-user-popup",children:s&&e?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:(0,c.jsxs)("div",{className:"flex",children:[(0,c.jsx)("span",{children:"Edit"}),(0,c.jsxs)("span",{className:"info inline w-auto text-xl green",children:[e.username,"@",e.host]})]})}),(0,c.jsx)("hr",{}),(0,c.jsx)(P,{mariaDBUser:e,edit:!0})]}):(0,c.jsx)("div",{className:"p-20",children:(0,c.jsx)(g.A,{width:"25px"})})})}function C(){return(0,c.jsxs)(b.Ay,{title:"new-mariadb-user-popup",children:[(0,c.jsx)("h3",{children:"New MariaDB User"}),(0,c.jsx)("hr",{}),(0,c.jsx)(P,{})]})}var M=t(71205);let _=u().createContext({});function R({user:e,query:s,mariadbUserCred:t,mariadbUsers:a}){let r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"SQL Connect | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Connect to your database remotely"})]}),[l,n]=u().useState(null),[i,d]=u().useState(0);return(0,c.jsx)(_.Provider,{value:{user:e,query:s,mariadbUserCred:t,mariadbUsers:a,targetMariadbUser:l,setTargetMariadbUser:n,refresh:i,setRefresh:d},children:(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)(h.A,{head:r,user:e,aceEditor:!0,children:(0,c.jsx)(w,{})}),(0,c.jsx)(L,{}),(0,c.jsx)(C,{})]})})}async function I({req:e,res:s,query:t}){let a=await (0,p.default)(e,s);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,x.A)("SELECT mariadb_user, mariadb_host, mariadb_pass FROM users WHERE id = ?",[a.id]),l=r?.[0]||{};l?.mariadb_pass&&(l.mariadb_pass=(0,M.A)({encryptedString:l.mariadb_pass}));let n=await (0,x.A)("SELECT * FROM mariadb_users WHERE user_id = ?",[a.id]);if(n?.[0])for(let e=0;e{t.d(s,{Ay:()=>i,PB:()=>d,fs:()=>c});var a=t(8732),r=t(58150),l=t(82015),n=t.n(l);function i({children:e,title:s,data:t,fullPage:l,wrapperClasses:i,closePopupDispatch:d,wrapperStyle:o,noContainer:u}){return l?(0,a.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":s||null,style:o,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,a.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),d&&d()},children:(0,a.jsx)(r.A,{color:"white",size:20})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]}):(0,a.jsxs)("div",{className:"popup-bg","data-popupid":s||null,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,a.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,a.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]})}function d(e,s){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",s?.(t))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},23293:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96725:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},96089:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},29743:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},11717:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]])},25294:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,s)=>{Object.defineProperty(s,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var s=require("../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),a=s.X(0,[883,9821,9796,5392],()=>t(35987));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js.nft.json index 21d1675..b068359 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js index 14b3a56..865f016 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2564,e.ids=[2564],e.modules={86482:(e,t,r)=>{r.r(t),r.d(t,{config:()=>g,default:()=>n,getServerSideProps:()=>c,getStaticPaths:()=>l,getStaticProps:()=>d,reportWebVitals:()=>S,routeModule:()=>M,unstable_getServerProps:()=>x,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>m,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>P});var s=r(63865),a=r(9455),i=r(30671),u=r(49407),o=r(89600),p=r(86176);let n=(0,i.M)(p,"default"),d=(0,i.M)(p,"getStaticProps"),l=(0,i.M)(p,"getStaticPaths"),c=(0,i.M)(p,"getServerSideProps"),g=(0,i.M)(p,"config"),S=(0,i.M)(p,"reportWebVitals"),P=(0,i.M)(p,"unstable_getStaticProps"),b=(0,i.M)(p,"unstable_getStaticPaths"),m=(0,i.M)(p,"unstable_getStaticParams"),x=(0,i.M)(p,"unstable_getServerProps"),q=(0,i.M)(p,"unstable_getServerSideProps"),M=new s.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/admin/[user_id]/databases",pathname:"/admin/[user_id]/databases",bundlePath:"",filename:""},components:{App:o.default,Document:u.default},userland:p})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,3460],()=>r(86482));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2564,e.ids=[2564],e.modules={25316:(e,t,a)=>{a.r(t),a.d(t,{config:()=>w,default:()=>M,getServerSideProps:()=>D,getStaticPaths:()=>A,getStaticProps:()=>q,reportWebVitals:()=>E,routeModule:()=>W,unstable_getServerProps:()=>N,unstable_getServerSideProps:()=>R,unstable_getStaticParams:()=>F,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>C});var s={};a.r(s),a.d(s,{DatabasesContext:()=>P,default:()=>v,getServerSideProps:()=>_});var r=a(63865),i=a(9455),n=a(30671),d=a(5583),u=a(19796),l=a(8732),o=a(82015),c=a.n(o),p=a(25562),x=a(92702),m=a(53926),g=a(66485),b=a(56331),S=a(67274);function f(){let{databases:e,setTargetDatabase:t,user:a}=c().useContext(P);return(0,l.jsxs)(c().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h1",{className:"text-3xl m-0",children:"Databases"}),(0,l.jsxs)("a",{href:`/admin/${a?.id}/databases/add-database`,className:"button flex items-center gap-2",children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Database"})]})]}),(0,l.jsx)(m.A,{user:a})]}),a?.verification_status?.toString().match(/1/)?(0,l.jsxs)(c().Fragment,{children:[(0,l.jsx)(b.A,{databases:e,setTargetDatabase:t,user:a}),(0,l.jsx)(S.A,{user:a})]}):(0,l.jsx)(g.A,{})]})}var h=a(70355),j=a(71934);let P=c().createContext({});function v({user:e,databases:t}){let a=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Databases | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[s,r]=c().useState();return(0,l.jsx)(P.Provider,{value:{user:e,databases:t,targetDatabase:s,setTargetDatabase:r},children:(0,l.jsxs)(c().Fragment,{children:[(0,l.jsx)(p.A,{head:a,user:e,children:(0,l.jsx)(f,{})}),(0,l.jsx)(h.A,{targetDatabase:s})]})})}async function _({req:e,res:t,query:a}){let s=await (0,x.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,j.A)("SELECT * FROM user_databases WHERE user_id=? ORDER BY id DESC",[s.id]);return{props:{user:s,databases:r}}}let M=(0,n.M)(s,"default"),q=(0,n.M)(s,"getStaticProps"),A=(0,n.M)(s,"getStaticPaths"),D=(0,n.M)(s,"getServerSideProps"),w=(0,n.M)(s,"config"),E=(0,n.M)(s,"reportWebVitals"),C=(0,n.M)(s,"unstable_getStaticProps"),y=(0,n.M)(s,"unstable_getStaticPaths"),F=(0,n.M)(s,"unstable_getStaticParams"),N=(0,n.M)(s,"unstable_getServerProps"),R=(0,n.M)(s,"unstable_getServerSideProps"),W=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases",pathname:"/admin/[user_id]/databases",bundlePath:"",filename:""},components:{App:u.default,Document:d.default},userland:s})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,6160],()=>a(25316));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js.nft.json index 21d1675..b068359 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js index d84edf7..9cc2511 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js @@ -1,8 +1,8 @@ -"use strict";(()=>{var e={};e.id=4123,e.ids=[4123],e.modules={87560:(e,a,s)=>{s.a(e,async(e,t)=>{try{s.r(a),s.d(a,{config:()=>p,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>b,reportWebVitals:()=>g,routeModule:()=>S,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>j,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>h});var r=s(63865),l=s(9455),d=s(30671),n=s(49407),i=s(89600),o=s(97311),c=e([o]);o=(c.then?(await c)():c)[0];let u=(0,d.M)(o,"default"),b=(0,d.M)(o,"getStaticProps"),m=(0,d.M)(o,"getStaticPaths"),x=(0,d.M)(o,"getServerSideProps"),p=(0,d.M)(o,"config"),g=(0,d.M)(o,"reportWebVitals"),h=(0,d.M)(o,"unstable_getStaticProps"),_=(0,d.M)(o,"unstable_getStaticPaths"),j=(0,d.M)(o,"unstable_getStaticParams"),f=(0,d.M)(o,"unstable_getServerProps"),N=(0,d.M)(o,"unstable_getServerSideProps"),S=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]",pathname:"/admin/[user_id]/databases/[single]",bundlePath:"",filename:""},components:{App:i.default,Document:n.default},userland:o});t()}catch(e){t(e)}})},34033:(e,a,s)=>{s.d(a,{A:()=>o});var t=s(8732),r=s(82015),l=s.n(r),d=s(63715),n=s(55158),i=s(32415);function o({targetDatabase:e}){let[a,s]=l().useState(!1);return(0,t.jsxs)(n.Ay,{title:"delete-database-confirmation",children:[a&&(0,t.jsx)(i.A,{width:"20px"}),(0,t.jsxs)("h4",{className:"m-0",children:["Delete '",e?.db_name?e.db_name:"This Database","' database?"]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{className:"outlined"+(a?" pointer-events-none opacity-40":""),onClick:a=>{if(!e){alert("No Target Database Selected!");return}s(!0),window.confirm("Note that you will loose all data in this database. Continue?")?(0,d.A)("/api/deleteUserDatabase",{method:"post",body:e},!0).then(e=>{e.success&&window.location.reload()}):s(!1)},children:(0,t.jsx)("span",{children:"Yes"})}),(0,t.jsx)("button",{onClick:e=>{(0,n.fs)()},children:(0,t.jsx)("span",{children:"Cancel"})})]})]})}},73972:(e,a,s)=>{s.d(a,{A:()=>o});var t=s(8732),r=s(82015),l=s.n(r),d=s(63715);s(58548);var n=s(55158),i=s(32415);function o({targetTable:e,database:a}){let[s,r]=l().useState(!1);return(0,t.jsxs)(n.Ay,{title:"delete-table-confirmation",children:[s&&(0,t.jsx)(i.A,{width:"20px"}),(0,t.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{className:"outlined"+(s?" pointer-events-none opacity-40":""),onClick:s=>{r(!0),(0,d.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,t.jsx)("span",{children:"Yes"})}),(0,t.jsx)("button",{onClick:e=>{(0,n.fs)()},children:(0,t.jsx)("span",{children:"Cancel"})})]})]})}},26647:(e,a,s)=>{s.a(e,async(e,t)=>{try{s.d(a,{A:()=>_});var r=s(8732),l=s(82015),d=s.n(l),n=s(58548),i=s(97311),o=s(55158),c=s(59621),u=s(46437),b=s(86173),m=s(62506),x=s(32415),p=s(22603),g=s(71296),h=e([i,c]);function _(e){let{database:a,tables:s,setTargetTable:t,confirmedDelegetedUser:l,query:h,user:_}=d().useContext(i.SingleDatabaseContext),j=l?.delegated;l?.priviledges?.match(/Edit Tables/i),l?.priviledges?.match(/Delete Tables/i);let{active_clone:f,active_clone_parent_db:N,remote_connected:S}=a,[w,v]=d().useState(!1);return(0,r.jsxs)(d().Fragment,{children:[w&&(0,r.jsx)(x.A,{}),(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,r.jsxs)("div",{className:"flex-wrap",children:[(0,r.jsx)(u.A,{}),(0,r.jsxs)("div",{className:"flex-wrap gap-y-0",children:[(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[a.db_name.replace(/ database$/i,"")," ","Database"]}),(0,r.jsx)(b.A,{slugText:a.db_slug,outlined:!0}),!j&&(0,r.jsxs)("button",{className:"button small-text outlined gray",onClick:e=>{(0,p.A)({url:`/api/exportDatabase?dbName=${a.db_full_name}`,fileName:`${a.db_full_name}.sql`,setLoading:v})},children:[(0,r.jsx)(g.A,{}),(0,r.jsx)("span",{children:"Export"})]})]})]}),(0,r.jsx)("div",{className:"flex-wrap flex-col md:flex-row items-stretch md:items-center w-full md:w-auto",children:(0,r.jsxs)(m.A,{children:[!j&&!N&&!S&&(0,r.jsxs)("a",{href:`/admin/${_?.id}/databases/${a.db_slug}/tables/add-table`,className:"button flex items-center gap-2",children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Table"})]}),(0,r.jsx)("a",{href:`/admin/${_?.id}/databases/${a.db_slug}/tables`,className:"button secondary",children:(0,r.jsx)("span",{children:"All Tables"})}),!j&&(0,r.jsx)("a",{href:`/admin/${_?.id}/databases/${a.db_slug}/users`,className:"button dark",children:(0,r.jsx)("span",{children:"Users"})}),!j&&(0,r.jsxs)("div",{className:"dropdown-wrapper my-4 xl:my-0",children:[(0,r.jsx)("span",{className:"hidden xl:flex button outlined gray",children:"More"}),(0,r.jsx)("div",{className:"dropdown mobile-transform right-aligned mt-0 xl:-mt-2 gap-2 items-stretch",children:(0,r.jsxs)(m.A,{column:!0,children:[(0,r.jsx)("a",{href:`/admin/${_?.id}/databases/${a.db_slug}/edit-database`,className:"button outlined gray more-padding",children:(0,r.jsx)("span",{children:"Edit Database"})}),!N&&!S&&(0,r.jsx)("button",{className:"outlined gray more-padding",onClick:e=>{(0,o.PB)("delete-database-confirmation")},children:(0,r.jsx)("span",{children:"Delete Database"})}),!j&&(0,r.jsx)("button",{className:"outlined gray more-padding",onClick:e=>{(0,p.A)({url:`/api/exportDatabase?dbName=${a.db_full_name}`,fileName:`${a.db_full_name}.sql`,setLoading:v})},children:(0,r.jsx)("span",{children:"Export Database"})}),(0,r.jsxs)("a",{href:`/admin/${_?.id}/users/add-user?db=${a.db_slug}`,className:"button outlined secondary more-padding",children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add User"})]})]})})]})]})})]}),(0,r.jsx)(n.A,{confirmedDelegetedUser:h.delegated,user:_})]}),(0,r.jsx)(c.A,{database:a,tables:s,setTargetTable:t,confirmedDelegetedUser:l,query:h,user:_}),(0,r.jsxs)("section",{className:"paper green",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Triggers"}),(0,r.jsx)("hr",{}),(0,r.jsx)("span",{className:"text-slate-400",children:"Coming Soon ..."})]}),(0,r.jsxs)("section",{className:"paper primary",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Stored Proceedures"}),(0,r.jsx)("hr",{}),(0,r.jsx)("span",{className:"text-slate-400",children:"Coming Soon ..."})]})]})}[i,c]=h.then?(await h)():h,t()}catch(e){t(e)}})},86173:(e,a,s)=>{s.d(a,{A:()=>l});var t=s(8732),r=s(96089);function l({slugText:e,smaller:a,outlined:s,full:l}){return(0,t.jsxs)("span",{className:"button break-words text-wrap cancel-link "+(s?" outlined gray":"light-gray")+(a?" small-text":""),onClick:a=>{navigator.clipboard.writeText(e).then(()=>{alert(`${l?"Database Full name":"Database Slug"} "${e}" Copied to Clipboard. Use this as the database name when querying data`)})},style:{wordWrap:"break-word",wordBreak:"break-all"},children:[(0,t.jsx)(r.A,{}),(0,t.jsx)("span",{children:e})]})}s(82015)},31651:(e,a,s)=>{s(81630);let t=s(77463);e.exports=async function({request:e,databaseSlug:a,user:s,query:r}){try{let l=s.id,d=null;if(!r?.delegated)return{dbUserId:l};let n=r.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${n}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let s=t({encryptedString:e.cookies[o]});if(!s)throw Error("Invalid Token");if((d=JSON.parse(s)).databaseSlug===a)return{dbUserId:l=d.rootUserId,rootUserId:d.rootUserId,rootUserName:d.rootUserName,rootUserEmail:d.rootUserEmail,rootUserImage:d.rootUserImage,databaseFullName:d.databaseFullName,databaseSlug:d.databaseSlug,allowedTables:d.allowedTables,priviledges:d.priviledges,database:d.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},97311:(e,a,s)=>{s.a(e,async(e,t)=>{try{s.r(a),s.d(a,{SingleDatabaseContext:()=>N,default:()=>j,getServerSideProps:()=>f});var r=s(8732),l=s(82015),d=s.n(l),n=s(95222),i=s(20048),o=s.n(i),c=s(34033),u=s(26647),b=s(73972),m=s(64098),x=s(31651),p=s.n(x),g=s(67216),h=s.n(g),_=e([u,m]);[u,m]=_.then?(await _)():_;let N=d().createContext({});function j({user:e,database:a,tables:s,query:t,confirmedDelegetedUser:l}){let i=`${a.db_name} Database | Datasquirel`,o=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:i}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[x,p]=d().useState(null);return(0,r.jsx)(N.Provider,{value:{user:e,database:a,tables:s,targetTable:x,setTargetTable:p,query:t,confirmedDelegetedUser:l},children:(0,r.jsxs)(d().Fragment,{children:[(0,r.jsx)(n.A,{head:o,user:e,extraHeaderContent:(0,r.jsx)(m.A,{database:a,query:t,confirmedDelegetedUser:l,user:e}),children:(0,r.jsx)(u.A,{})}),!l?.delegated&&(0,r.jsx)(c.A,{targetDatabase:a}),(!l?.delegated||l?.delegated&&l?.priviledges?.match(/Delete Tables/i))&&(0,r.jsx)(b.A,{targetTable:x,database:a})]})})}async function f({req:e,res:a,query:s}){let t=await o()(e,a);if(!t?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await p()({request:e,user:t,databaseSlug:s.single||[],query:s});if(!r)return{redirect:{destination:"/admin",permanent:!1}};let{dbUserId:l,rootUserId:d}=r,n=await h()(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${s.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${t?.id}/databases`,permanent:!1}};let i=d?await h()(` +"use strict";(()=>{var e={};e.id=4123,e.ids=[4123],e.modules={47398:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.r(a),t.d(a,{config:()=>p,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>b,reportWebVitals:()=>g,routeModule:()=>S,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>j,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>h});var r=t(63865),l=t(9455),d=t(30671),n=t(5583),i=t(19796),o=t(65301),c=e([o]);o=(c.then?(await c)():c)[0];let u=(0,d.M)(o,"default"),b=(0,d.M)(o,"getStaticProps"),m=(0,d.M)(o,"getStaticPaths"),x=(0,d.M)(o,"getServerSideProps"),p=(0,d.M)(o,"config"),g=(0,d.M)(o,"reportWebVitals"),h=(0,d.M)(o,"unstable_getStaticProps"),_=(0,d.M)(o,"unstable_getStaticPaths"),j=(0,d.M)(o,"unstable_getStaticParams"),f=(0,d.M)(o,"unstable_getServerProps"),N=(0,d.M)(o,"unstable_getServerSideProps"),S=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]",pathname:"/admin/[user_id]/databases/[single]",bundlePath:"",filename:""},components:{App:i.default,Document:n.default},userland:o});s()}catch(e){s(e)}})},70355:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(8732),r=t(82015),l=t.n(r),d=t(46169),n=t(91140),i=t(16757);function o({targetDatabase:e}){let[a,t]=l().useState(!1);return(0,s.jsxs)(n.Ay,{title:"delete-database-confirmation",children:[a&&(0,s.jsx)(i.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.db_name?e.db_name:"This Database","' database?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(a?" pointer-events-none opacity-40":""),onClick:a=>{if(!e){alert("No Target Database Selected!");return}t(!0),window.confirm("Note that you will loose all data in this database. Continue?")?(0,d.A)("/api/deleteUserDatabase",{method:"post",body:e},!0).then(e=>{e.success&&window.location.reload()}):t(!1)},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,n.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},57414:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(8732),r=t(82015),l=t.n(r),d=t(46169),n=t(91140),i=t(16757);function o({targetTable:e,database:a}){let[t,r]=l().useState(!1);return(0,s.jsxs)(n.Ay,{title:"delete-table-confirmation",children:[t&&(0,s.jsx)(i.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(t?" pointer-events-none opacity-40":""),onClick:t=>{r(!0),(0,d.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,n.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},97853:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>_});var r=t(8732),l=t(82015),d=t.n(l),n=t(53926),i=t(65301),o=t(91140),c=t(23791),u=t(59023),b=t(88791),m=t(55904),x=t(16757),p=t(63025),g=t(71296),h=e([i,c]);function _(){let{database:e,tables:a,setTargetTable:t,confirmedDelegetedUser:s,query:l,user:h}=d().useContext(i.SingleDatabaseContext),_=s?.delegated;s?.priviledges?.match(/Edit Tables/i),s?.priviledges?.match(/Delete Tables/i);let{active_clone:j,active_clone_parent_db:f,remote_connected:N}=e,[S,A]=d().useState(!1);return(0,r.jsxs)(d().Fragment,{children:[S&&(0,r.jsx)(x.A,{}),(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,r.jsxs)("div",{className:"flex-wrap",children:[(0,r.jsx)(u.A,{}),(0,r.jsxs)("div",{className:"flex-wrap gap-y-0",children:[(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[e.db_name.replace(/ database$/i,"")," ","Database"]}),(0,r.jsx)(b.A,{slugText:e.db_slug,outlined:!0}),!_&&(0,r.jsxs)("button",{className:"button small-text outlined gray",onClick:a=>{(0,p.A)({url:`/api/exportDatabase?dbName=${e.db_full_name}`,fileName:`${e.db_full_name}.sql`,setLoading:A})},children:[(0,r.jsx)(g.A,{}),(0,r.jsx)("span",{children:"Export"})]})]})]}),(0,r.jsx)("div",{className:"flex-wrap flex-col md:flex-row items-stretch md:items-center w-full md:w-auto",children:(0,r.jsxs)(m.A,{children:[!_&&!f&&!N&&(0,r.jsxs)("a",{href:`/admin/${h?.id}/databases/${e.db_slug}/tables/add-table`,className:"button flex items-center gap-2",children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Table"})]}),(0,r.jsx)("a",{href:`/admin/${h?.id}/databases/${e.db_slug}/tables`,className:"button secondary",children:(0,r.jsx)("span",{children:"All Tables"})}),!_&&(0,r.jsx)("a",{href:`/admin/${h?.id}/databases/${e.db_slug}/users`,className:"button dark",children:(0,r.jsx)("span",{children:"Users"})}),!_&&(0,r.jsxs)("div",{className:"dropdown-wrapper my-4 xl:my-0",children:[(0,r.jsx)("span",{className:"hidden xl:flex button outlined gray",children:"More"}),(0,r.jsx)("div",{className:"dropdown mobile-transform right-aligned mt-0 xl:-mt-2 gap-2 items-stretch",children:(0,r.jsxs)(m.A,{column:!0,children:[(0,r.jsx)("a",{href:`/admin/${h?.id}/databases/${e.db_slug}/edit-database`,className:"button outlined gray more-padding",children:(0,r.jsx)("span",{children:"Edit Database"})}),!f&&!N&&(0,r.jsx)("button",{className:"outlined gray more-padding",onClick:e=>{(0,o.PB)("delete-database-confirmation")},children:(0,r.jsx)("span",{children:"Delete Database"})}),!_&&(0,r.jsx)("button",{className:"outlined gray more-padding",onClick:a=>{(0,p.A)({url:`/api/exportDatabase?dbName=${e.db_full_name}`,fileName:`${e.db_full_name}.sql`,setLoading:A})},children:(0,r.jsx)("span",{children:"Export Database"})}),(0,r.jsxs)("a",{href:`/admin/${h?.id}/users/add-user?db=${e.db_slug}`,className:"button outlined secondary more-padding",children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add User"})]})]})})]})]})})]}),(0,r.jsx)(n.A,{confirmedDelegetedUser:l.delegated,user:h})]}),(0,r.jsx)(c.A,{database:e,tables:a,setTargetTable:t,confirmedDelegetedUser:s,query:l,user:h}),(0,r.jsxs)("section",{className:"paper green",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Triggers"}),(0,r.jsx)("hr",{}),(0,r.jsx)("span",{className:"text-slate-400",children:"Coming Soon ..."})]}),(0,r.jsxs)("section",{className:"paper primary",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Stored Proceedures"}),(0,r.jsx)("hr",{}),(0,r.jsx)("span",{className:"text-slate-400",children:"Coming Soon ..."})]})]})}[i,c]=h.then?(await h)():h,s()}catch(e){s(e)}})},88791:(e,a,t)=>{t.d(a,{A:()=>l});var s=t(8732),r=t(96089);function l({slugText:e,smaller:a,outlined:t,full:l}){return(0,s.jsxs)("span",{className:"button break-words text-wrap cancel-link "+(t?" outlined gray":"light-gray")+(a?" small-text":""),onClick:a=>{navigator.clipboard.writeText(e).then(()=>{alert(`${l?"Database Full name":"Database Slug"} "${e}" Copied to Clipboard. Use this as the database name when querying data`)})},style:{wordWrap:"break-word",wordBreak:"break-all"},children:[(0,s.jsx)(r.A,{}),(0,s.jsx)("span",{children:e})]})}t(82015)},22873:(e,a,t)=>{t.d(a,{A:()=>r});var s=t(71205);async function r({request:e,databaseSlug:a,user:t,query:r}){try{let l=t.id,d=null;if(!r?.delegated)return{dbUserId:l};let n=r.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${n}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let t=(0,s.A)({encryptedString:e.cookies[o]});if(!t)throw Error("Invalid Token");if((d=JSON.parse(t)).databaseSlug===a)return{dbUserId:l=d.rootUserId,rootUserId:d.rootUserId,rootUserName:d.rootUserName,rootUserEmail:d.rootUserEmail,rootUserImage:d.rootUserImage,databaseFullName:d.databaseFullName,databaseSlug:d.databaseSlug,allowedTables:d.allowedTables,priviledges:d.priviledges,database:d.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},65301:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.r(a),t.d(a,{SingleDatabaseContext:()=>_,default:()=>g,getServerSideProps:()=>h});var r=t(8732),l=t(82015),d=t.n(l),n=t(25562),i=t(92702),o=t(70355),c=t(97853),u=t(57414),b=t(55880),m=t(22873),x=t(71934),p=e([c,b]);[c,b]=p.then?(await p)():p;let _=d().createContext({});function g({user:e,database:a,tables:t,query:s,confirmedDelegetedUser:l}){let i=`${a.db_name} Database | Datasquirel`,m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:i}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[x,p]=d().useState(null);return(0,r.jsx)(_.Provider,{value:{user:e,database:a,tables:t,targetTable:x,setTargetTable:p,query:s,confirmedDelegetedUser:l},children:(0,r.jsxs)(d().Fragment,{children:[(0,r.jsx)(n.A,{head:m,user:e,extraHeaderContent:(0,r.jsx)(b.A,{database:a,query:s,confirmedDelegetedUser:l,user:e}),children:(0,r.jsx)(c.A,{})}),!l?.delegated&&(0,r.jsx)(o.A,{targetDatabase:a}),(!l?.delegated||l?.delegated&&l?.priviledges?.match(/Delete Tables/i))&&(0,r.jsx)(u.A,{targetTable:x,database:a})]})})}async function h({req:e,res:a,query:t}){let s=await (0,i.default)(e,a);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,m.A)({request:e,user:s,databaseSlug:t.single||[],query:t});if(!r)return{redirect:{destination:"/admin",permanent:!1}};let{dbUserId:l,rootUserId:d}=r,n=await (0,x.A)(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${t.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let o=d?await (0,x.A)(` SELECT delegated_user_tables.database,delegated_user_tables.table,user_database_tables.* FROM delegated_user_tables INNER JOIN user_database_tables ON delegated_user_tables.root_user_id=user_database_tables.user_id AND delegated_user_tables.table=user_database_tables.table_slug AND delegated_user_tables.database=user_database_tables.db_slug WHERE - delegated_user_tables.delegated_user_id='${t.id}' AND delegated_user_tables.root_user_id='${d}' AND delegated_user_tables.database='${n[0].db_slug}' - `):await h()(`SELECT * FROM user_database_tables WHERE user_id='${t.id}' AND db_id='${n[0].id}'`);return{props:{user:t,database:n[0]?n[0]:null,tables:i,query:s,confirmedDelegetedUser:r}}}t()}catch(e){t(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../webpack-runtime.js");a.C(e);var s=e=>a(a.s=e),t=a.X(0,[883,9821,6521,9600,7070,5134,9621],()=>s(87560));module.exports=t})(); \ No newline at end of file + delegated_user_tables.delegated_user_id='${s.id}' AND delegated_user_tables.root_user_id='${d}' AND delegated_user_tables.database='${n[0].db_slug}' + `):await (0,x.A)(`SELECT * FROM user_database_tables WHERE user_id='${s.id}' AND db_id='${n[0].id}'`);return{props:{user:s,database:n[0]?n[0]:null,tables:o,query:t,confirmedDelegetedUser:r}}}s()}catch(e){s(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),s=a.X(0,[883,9821,6521,9796,5392,3634,3791],()=>t(47398));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js.nft.json index 9ddb13b..3e755d3 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../node_modules/tailwind-merge/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../node_modules/tailwind-merge/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js index ebab5cb..8ef1cb1 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=7552,e.ids=[7552],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},78725:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{config:()=>y,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>p,getStaticProps:()=>h,reportWebVitals:()=>x,routeModule:()=>A,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>b,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>f});var r=a(63865),n=a(9455),l=a(30671),i=a(49407),o=a(89600),c=a(16905),d=e([c]);c=(d.then?(await d)():d)[0];let u=(0,l.M)(c,"default"),h=(0,l.M)(c,"getStaticProps"),p=(0,l.M)(c,"getStaticPaths"),m=(0,l.M)(c,"getServerSideProps"),y=(0,l.M)(c,"config"),x=(0,l.M)(c,"reportWebVitals"),f=(0,l.M)(c,"unstable_getStaticProps"),g=(0,l.M)(c,"unstable_getStaticPaths"),b=(0,l.M)(c,"unstable_getStaticParams"),S=(0,l.M)(c,"unstable_getServerProps"),v=(0,l.M)(c,"unstable_getServerSideProps"),A=new r.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/connect",pathname:"/admin/[user_id]/databases/[single]/connect",bundlePath:"",filename:""},components:{App:o.default,Document:i.default},userland:c});s()}catch(e){s(e)}})},85019:(e,t,a)=>{a.d(t,{A:()=>u});var s=a(8732),r=a(82015),n=a.n(r),l=a(13737),i=a(32415),o=a(43656),c=a(63715),d=a(51548);function u({database:e,targetDbSchema:t,user:a}){let[r,d]=n().useState(!1),[u,p]=n().useState(!1),[m,y]=n().useState("pull"),[x,f]=n().useState(null);return r&&x?(0,s.jsx)(h,{payload:x,setConnectPayload:f,setIsValid:d,user:a}):(0,s.jsxs)("form",{onSubmit:a=>{(function({e,setLoading:t,database:a,type:s,targetDbSchema:r,setIsValid:n,setConnectPayload:l}){e.preventDefault();let i=e.target;t(!0);let o={url:i["remote-address"].value,key:i["remote-key"].value,database:a,dbSchema:r,type:s};(0,c.A)("/api/connect/verify",{method:"POST",body:o},!0).then(e=>{e.success?(n(!0),l({...o,remoteDbs:e.payload})):(console.log(e),setTimeout(()=>{t(!1)},2e3))}).finally(()=>{setTimeout(()=>{t(!1)},2e3)})})({e:a,setLoading:p,database:e,type:m,targetDbSchema:t,setIsValid:d,setConnectPayload:f})},className:"w-full flex flex-col items-start justify-start gap-4 static",children:[u&&(0,s.jsx)(i.A,{}),m?.match(/pull/)?(0,s.jsx)("div",{className:"info warning",children:"NOTE: This will override your current Database Schema"}):(0,s.jsx)("div",{className:"info green",children:"NOTE: The remote database will be updated with this Database Info"}),(0,s.jsx)("span",{children:"This Feature links this current database to a remote database schema"}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2 justify-start p-6 bg-slate-100 w-full rounded",children:[(0,s.jsx)("span",{className:"font-bold",children:"Select the connection type"}),(0,s.jsx)(o.A,{radioValues:[{title:"Pull",payload:"pull",default:!0},{title:"Push",payload:"push",default:!1}],flexRow:!0,onChangeHandler:e=>{y(e.target.value)},name:"type-radio"}),(0,s.jsxs)("div",{children:[m.match(/pull/i)&&(0,s.jsx)("span",{children:"A pull connection imposes the remote database on your current database"}),m.match(/push/i)&&(0,s.jsx)("span",{children:"A push connection imposes your current database to the remote"})]})]}),(0,s.jsx)(l.A,{placeholder:"Eg. https://domain.com",title:"Remote Origin Address",name:"remote-address",required:!0}),(0,s.jsx)(l.A,{placeholder:"Eg. ab81XFogyWe4yc51Agjve52cUQ5XW75m2hLFVzGeoDZT2ob6hC",title:"Remote API key (Full Access)",name:"remote-key",required:!0}),(0,s.jsx)("button",{className:"w-full",children:"Verify Remote"})]})}function h({payload:e,setConnectPayload:t,setIsValid:a,user:r}){let[l,o]=n().useState(!1);if(!e?.remoteDbs?.[0])return(0,s.jsx)("span",{children:"No Databases Available on this Remote server."});let u=e.remoteDbs;if(!u?.[0])return(0,s.jsx)("span",{children:"The only Database Available here is this current Database"});let[h,p]=n().useState(u[0]);return(0,s.jsxs)("form",{onSubmit:t=>{t.preventDefault(),window.confirm("Connect these Databases?")&&(o(!0),(0,c.A)("/api/connect/handshake",{method:"POST",body:{...e,targetDb:h}},!0).then(t=>{t.success?window.location.pathname=`/admin/${r?.id}/databases/${e.database.db_slug}`:(console.log(t),alert(t?.msg||"Something Went Wrong"))}).finally(()=>{setTimeout(()=>{o(!1)},1e3)}))},className:"w-full gap-4 flex flex-col items-start justify-start",children:[l&&(0,s.jsx)(i.A,{}),(0,s.jsxs)("h2",{className:"text-xl font-normal",children:["Select Database from"," ",(0,s.jsx)("b",{className:"text-black dark:text-white",children:e.url})," ","Remote Server"]}),(0,s.jsx)(d.A,{selectOptions:u.map(e=>({payload:e.dbFullName,title:e.dbName})),onChangeHandler:e=>{let t=e.target.value;if(t){let e=u.find(e=>e.dbFullName==t);e?p(e):alert("Failed to Select Target Database. Please reload the page and try again.")}}}),(0,s.jsxs)("span",{children:["Connection type:"," ",(0,s.jsx)("b",{className:"info inline small "+(e.type?.match(/pull/i)?"warning":"green"),children:e.type})]}),(0,s.jsx)("button",{className:"w-full",children:"Connect Database"}),(0,s.jsx)("div",{className:"button outlined gray w-full",onClick:e=>{a(!1),t(null)},children:"Reset"})]})}},52497:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>h});var r=a(8732),n=a(82015),l=a.n(n),i=a(46437),o=a(58548);a(63715);var c=a(16905),d=a(85019),u=e([c]);function h(e){let{database:t,user:a,targetDbSchema:s,query:n}=l().useContext(c.DatabaseConnectContext);if(!a)return null;try{return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(i.A,{}),(0,r.jsx)("h1",{className:"text-3xl m-0",children:(0,r.jsxs)("span",{children:[t?.db_name," Database Connect"]})})]}),(0,r.jsx)(o.A,{user:a})]}),(0,r.jsx)("div",{className:"paper w-full",children:(0,r.jsxs)("div",{className:"flex max-w-5xl w-full flex-col items-start gap-4",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Connect External Database Schema"}),(0,r.jsx)(d.A,{database:t,targetDbSchema:s,user:a})]})})]})}catch(e){return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(i.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[(0,r.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t?.db_name}),"\xa0",(0,r.jsx)("span",{children:"Database Connect"})]})]}),(0,r.jsx)(o.A,{user:a})]}),(0,r.jsx)("section",{className:"card",children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Db connect unavailable at this time."})})]})}}c=(u.then?(await u)():u)[0],s()}catch(e){s(e)}})},43656:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732);function r({radioValues:e,name:t,onChangeHandler:a,setAlert:r,flexRow:n,labelColor:l,baseText:i,smallText:o,className:c}){try{return(0,s.jsx)("div",{className:"flex items-start gap-4 flex-wrap "+(n?"":" flex-col ")+(c||""),children:e.map((e,n)=>{let{payload:c,title:d,jsx:u}=e,h=!1===c?c:c||d||null;return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{className:"m-0"+(i?" w-5 h-5":o?" w-4 h-4":" w-6 h-6"),type:"radio",defaultChecked:!!e.default,name:t,id:t+"_"+h,onChange:t=>{r&&r(null),e.onChangeHandler?e.onChangeHandler(t):a&&a(t)},value:"string"==typeof h?h:void 0}),u||(0,s.jsx)("label",{htmlFor:t+"_"+h,className:"text-lg m-0 "+(l||"text-slate-800")+(i?" text-base":o?" text-sm":" text-lg"),children:d})]},n+1)})})}catch(e){return console.log("ERROR in FormRadio =>",e),(0,s.jsx)("div",{children:"Form Radio Error"})}}a(82015)},51548:(e,t,a)=>{a.d(t,{A:()=>n});var s=a(8732),r=a(58526);function n({selectOptions:e,name:t,onChangeHandler:a,required:n,setAlert:l,title:i,defaultValue:o,info:c,id:d}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[i&&(0,s.jsxs)("label",{htmlFor:t,children:[i,n?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:n,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:o||void 0,children:e.map((e,t)=>{let{payload:a,title:r}=e;return(0,s.jsx)("option",{value:a,selected:!!e.default,children:r},t+1)})}),(0,s.jsx)(r.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,s.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,s.jsx)("span",{children:c})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}a(82015)},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},93342:(e,t,a)=>{let s=a(22373),r=a(29021),n=a(33873);e.exports=function({userId:e}){try{let t=n.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(r.readFileSync(t,"utf-8"))}catch(e){return s({component:"grabUserSchemaData",message:e.message}),null}}},89545:(e,t,a)=>{let s=a(77463),r=a(68743);e.exports=async function({unparsedResults:e,tableSchema:t}){let a=[];try{for(let n=0;n",t.message),e}}},22373:(e,t,a)=>{let s=a(29021),{IncomingMessage:r}=a(81630);e.exports=async function({user:e,message:t,component:a,noMail:r,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],a=n.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],r=a||s||t||n.socket.remoteAddress;if(!r)return null;return String(r)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=7552,e.ids=[7552],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},2083:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>y,default:()=>u,getServerSideProps:()=>p,getStaticPaths:()=>m,getStaticProps:()=>h,reportWebVitals:()=>x,routeModule:()=>S,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>b,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>f});var s=a(63865),n=a(9455),l=a(30671),i=a(5583),o=a(19796),c=a(99867),d=e([c]);c=(d.then?(await d)():d)[0];let u=(0,l.M)(c,"default"),h=(0,l.M)(c,"getStaticProps"),m=(0,l.M)(c,"getStaticPaths"),p=(0,l.M)(c,"getServerSideProps"),y=(0,l.M)(c,"config"),x=(0,l.M)(c,"reportWebVitals"),f=(0,l.M)(c,"unstable_getStaticProps"),g=(0,l.M)(c,"unstable_getStaticPaths"),b=(0,l.M)(c,"unstable_getStaticParams"),A=(0,l.M)(c,"unstable_getServerProps"),v=(0,l.M)(c,"unstable_getServerSideProps"),S=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/connect",pathname:"/admin/[user_id]/databases/[single]/connect",bundlePath:"",filename:""},components:{App:o.default,Document:i.default},userland:c});r()}catch(e){r(e)}})},2057:(e,t,a)=>{a.d(t,{A:()=>u});var r=a(8732),s=a(82015),n=a.n(s),l=a(83155),i=a(16757),o=a(1346),c=a(46169),d=a(80830);function u({database:e,targetDbSchema:t,user:a}){let[s,d]=n().useState(!1),[u,m]=n().useState(!1),[p,y]=n().useState("pull"),[x,f]=n().useState(null);return s&&x?(0,r.jsx)(h,{payload:x,setConnectPayload:f,setIsValid:d,user:a}):(0,r.jsxs)("form",{onSubmit:a=>{(function({e,setLoading:t,database:a,type:r,targetDbSchema:s,setIsValid:n,setConnectPayload:l}){e.preventDefault();let i=e.target;t(!0);let o={url:i["remote-address"].value,key:i["remote-key"].value,database:a,dbSchema:s,type:r};(0,c.A)("/api/connect/verify",{method:"POST",body:o},!0).then(e=>{e.success?(n(!0),l({...o,remoteDbs:e.payload})):(console.log(e),setTimeout(()=>{t(!1)},2e3))}).finally(()=>{setTimeout(()=>{t(!1)},2e3)})})({e:a,setLoading:m,database:e,type:p,targetDbSchema:t,setIsValid:d,setConnectPayload:f})},className:"w-full flex flex-col items-start justify-start gap-4 static",children:[u&&(0,r.jsx)(i.A,{}),p?.match(/pull/)?(0,r.jsx)("div",{className:"info warning",children:"NOTE: This will override your current Database Schema"}):(0,r.jsx)("div",{className:"info green",children:"NOTE: The remote database will be updated with this Database Info"}),(0,r.jsx)("span",{children:"This Feature links this current database to a remote database schema"}),(0,r.jsxs)("div",{className:"flex flex-col items-start gap-2 justify-start p-6 bg-slate-100 w-full rounded",children:[(0,r.jsx)("span",{className:"font-bold",children:"Select the connection type"}),(0,r.jsx)(o.A,{radioValues:[{title:"Pull",payload:"pull",default:!0},{title:"Push",payload:"push",default:!1}],flexRow:!0,onChangeHandler:e=>{y(e.target.value)},name:"type-radio"}),(0,r.jsxs)("div",{children:[p.match(/pull/i)&&(0,r.jsx)("span",{children:"A pull connection imposes the remote database on your current database"}),p.match(/push/i)&&(0,r.jsx)("span",{children:"A push connection imposes your current database to the remote"})]})]}),(0,r.jsx)(l.A,{placeholder:"Eg. https://domain.com",title:"Remote Origin Address",name:"remote-address",required:!0}),(0,r.jsx)(l.A,{placeholder:"Eg. ab81XFogyWe4yc51Agjve52cUQ5XW75m2hLFVzGeoDZT2ob6hC",title:"Remote API key (Full Access)",name:"remote-key",required:!0}),(0,r.jsx)("button",{className:"w-full",children:"Verify Remote"})]})}function h({payload:e,setConnectPayload:t,setIsValid:a,user:s}){let[l,o]=n().useState(!1);if(!e?.remoteDbs?.[0])return(0,r.jsx)("span",{children:"No Databases Available on this Remote server."});let u=e.remoteDbs;if(!u?.[0])return(0,r.jsx)("span",{children:"The only Database Available here is this current Database"});let[h,m]=n().useState(u[0]);return(0,r.jsxs)("form",{onSubmit:t=>{t.preventDefault(),window.confirm("Connect these Databases?")&&(o(!0),(0,c.A)("/api/connect/handshake",{method:"POST",body:{...e,targetDb:h}},!0).then(t=>{t.success?window.location.pathname=`/admin/${s?.id}/databases/${e.database.db_slug}`:(console.log(t),alert(t?.msg||"Something Went Wrong"))}).finally(()=>{setTimeout(()=>{o(!1)},1e3)}))},className:"w-full gap-4 flex flex-col items-start justify-start",children:[l&&(0,r.jsx)(i.A,{}),(0,r.jsxs)("h2",{className:"text-xl font-normal",children:["Select Database from"," ",(0,r.jsx)("b",{className:"text-black dark:text-white",children:e.url})," ","Remote Server"]}),(0,r.jsx)(d.A,{selectOptions:u.map(e=>({payload:e.dbFullName,title:e.dbName})),onChangeHandler:e=>{let t=e.target.value;if(t){let e=u.find(e=>e.dbFullName==t);e?m(e):alert("Failed to Select Target Database. Please reload the page and try again.")}}}),(0,r.jsxs)("span",{children:["Connection type:"," ",(0,r.jsx)("b",{className:"info inline small "+(e.type?.match(/pull/i)?"warning":"green"),children:e.type})]}),(0,r.jsx)("button",{className:"w-full",children:"Connect Database"}),(0,r.jsx)("div",{className:"button outlined gray w-full",onClick:e=>{a(!1),t(null)},children:"Reset"})]})}},88819:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>h});var s=a(8732),n=a(82015),l=a.n(n),i=a(59023),o=a(53926);a(46169);var c=a(99867),d=a(2057),u=e([c]);function h(){let{database:e,user:t,targetDbSchema:a,query:r}=l().useContext(c.DatabaseConnectContext);if(!t)return null;try{return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsx)("h1",{className:"text-3xl m-0",children:(0,s.jsxs)("span",{children:[e?.db_name," Database Connect"]})})]}),(0,s.jsx)(o.A,{user:t})]}),(0,s.jsx)("div",{className:"paper w-full",children:(0,s.jsxs)("div",{className:"flex max-w-5xl w-full flex-col items-start gap-4",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Connect External Database Schema"}),(0,s.jsx)(d.A,{database:e,targetDbSchema:a,user:t})]})})]})}catch(a){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:e?.db_name}),"\xa0",(0,s.jsx)("span",{children:"Database Connect"})]})]}),(0,s.jsx)(o.A,{user:t})]}),(0,s.jsx)("section",{className:"card",children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Db connect unavailable at this time."})})]})}}c=(u.then?(await u)():u)[0],r()}catch(e){r(e)}})},1346:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s({radioValues:e,name:t,onChangeHandler:a,setAlert:s,flexRow:n,labelColor:l,baseText:i,smallText:o,className:c}){try{return(0,r.jsx)("div",{className:"flex items-start gap-4 flex-wrap "+(n?"":" flex-col ")+(c||""),children:e.map((e,n)=>{let{payload:c,title:d,jsx:u}=e,h=!1===c?c:c||d||null;return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{className:"m-0"+(i?" w-5 h-5":o?" w-4 h-4":" w-6 h-6"),type:"radio",defaultChecked:!!e.default,name:t,id:t+"_"+h,onChange:t=>{s&&s(null),e.onChangeHandler?e.onChangeHandler(t):a&&a(t)},value:"string"==typeof h?h:void 0}),u||(0,r.jsx)("label",{htmlFor:t+"_"+h,className:"text-lg m-0 "+(l||"text-slate-800")+(i?" text-base":o?" text-sm":" text-lg"),children:d})]},n+1)})})}catch(e){return console.log("ERROR in FormRadio =>",e),(0,r.jsx)("div",{children:"Form Radio Error"})}}a(82015)},80830:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(8732),s=a(58526);function n({selectOptions:e,name:t,onChangeHandler:a,required:n,setAlert:l,title:i,defaultValue:o,info:c,id:d}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,r.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[i&&(0,r.jsxs)("label",{htmlFor:t,children:[i,n?"":" (optional)"]}),(0,r.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,r.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:n,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:o||void 0,children:e.map((e,t)=>{let{payload:a,title:s}=e;return(0,r.jsx)("option",{value:a,selected:!!e.default,children:s},t+1)})}),(0,r.jsx)(s.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,r.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,r.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,r.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,r.jsx)("span",{children:c})}),(0,r.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,r.jsx)("div",{children:"Form Select Error"})}}a(82015)},23293:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},72272:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(77047),s=a(29021),n=a.n(s),l=a(33873),i=a.n(l);function o({userId:e}){try{let t=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(n().readFileSync(t,"utf-8"))}catch(e){return(0,r.A)({component:"grabUserSchemaData",message:e.message}),null}}},77047:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(29021),s=a.n(r);async function n({user:e,message:t,component:a,noMail:r,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],a=n.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],s=a||r||t||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== Error Message: ${t} Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${n.url}`),n?.body&&(r+=` Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(r+=` IP: ${i}`),r+=` Date: ${l.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let o=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",r),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let o=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",r),s().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},90378:(e,t,a)=>{a(29021);let s=a(89545),r=a(22373),n=a(67216),l=a(1231),i=a(88896);e.exports=async function({queryString:e,queryValuesArray:t,database:a,tableSchema:o,useLocal:c}){let d;let u=!!c||!!a?.match(/^datasquirel$/),h=c?i:u?n:l;try{d=e&&t&&Array.isArray(t)&&t[0]?u?await h(e,t):await h({paradigm:"Full Access",database:a,queryString:e,queryValues:t}):u?await h(e):await h({paradigm:"Full Access",database:a,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(d&&o)try{let e=d;return await s({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(d)return d;else return null}},1231:(e,t,a)=>{let s=a(29021);a(33873);let r=a(9973),n=a(31976),l=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:t,queryString:a,queryValues:i}){try{return new Promise((o,c)=>{let d=!!e?.match(/full.access|^fa$/i);try{function u(e){l.end(),o(JSON.parse(JSON.stringify(e)))}function h(e){l.end(),o({error:e.message,queryStringGenerated:a,queryValuesGenerated:i,sql:e.sql})}l=d?r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:n()}}):r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:n()}}),i&&Array.isArray(i)&&i[0]?l.query(a,i).then(u).catch(h):l.query(a).then(u).catch(h)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),o({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,t,a)=>{let s=a(9973),r=a(31976);async function n(...e){let t=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},16905:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{DatabaseConnectContext:()=>v,default:()=>b,getServerSideProps:()=>S});var r=a(8732),n=a(82015),l=a.n(n),i=a(95222),o=a(20048),c=a.n(o),d=a(64098),u=a(52497),h=a(93342),p=a.n(h),m=a(67216),y=a.n(m),x=a(90378),f=a.n(x),g=e([d,u]);[d,u]=g.then?(await g)():g;let v=l().createContext({});function b({user:e,database:t,query:a,targetDbSchema:s}){let n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"Database Shell | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Database Shell"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/shell-page.css"})]});return(0,r.jsx)(i.A,{head:n,user:e,extraHeaderContent:(0,r.jsx)(d.A,{database:t,query:a,user:e}),aceEditor:!0,children:(0,r.jsx)(v.Provider,{value:{user:e,database:t,targetDbSchema:s,query:a},children:(0,r.jsx)(u.A,{})})})}async function S({req:e,res:t,query:a}){let s=await c()(e,t);if(!s?.logged_in_status||!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await y()(`SELECT * FROM user_databases WHERE user_id='${s.id}' AND db_slug='${a.single}'`);if(!r?.[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};if(1==Number(r[0].remote_connected))return{redirect:{destination:`/admin/${s?.id}/databases/${a.single}`,permanent:!1}};await f()({queryString:"SHOW TABLES",database:r[0].db_full_name});let n=p()({userId:String(s.id)});if(!n?.[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let l=n.find(e=>e.dbFullName==r[0].db_full_name);return l?{props:{user:s,database:r[0],query:a,targetDbSchema:l}}:{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}}}s()}catch(e){s(e)}})},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,5134,3737],()=>a(78725));module.exports=s})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,t,a)=>{a.d(t,{A:()=>d});var r=a(71205);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:t}){let a=[];try{for(let n=0;n",t.message),e}}var l=a(77047),i=a(71934),o=a(43651),c=a(16175);async function d({queryString:e,queryValuesArray:t,database:a,tableSchema:r,useLocal:s}){let d;let u=!!s||!!a?.match(/^datasquirel$/),h=s?c.A:u?i.A:o.A;try{d=e&&t&&Array.isArray(t)&&t[0]?u?await h(e,t):await h({paradigm:"Full Access",queryString:e,queryValues:t}):u?await h(e):await h({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,l.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(d&&r)try{let e=d;return await n({unparsedResults:e,tableSchema:r})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),(0,l.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(d)return d;else return null}},43651:(e,t,a)=>{async function r(e,t,a){try{if("string"==typeof t){let r=await e.query(s(t),a);return JSON.parse(JSON.stringify(r))}if("object"!=typeof t)return null;{let a=[];for(let r=0;rn})},16175:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(9973),s=a.n(r),n=a(29021),l=a.n(n);async function i(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!l().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},99867:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{DatabaseConnectContext:()=>f,default:()=>y,getServerSideProps:()=>x});var s=a(8732),n=a(82015),l=a.n(n),i=a(25562),o=a(92702),c=a(55880),d=a(88819),u=a(72272),h=a(71934),m=a(52854),p=e([c,d]);[c,d]=p.then?(await p)():p;let f=l().createContext({});function y({user:e,database:t,query:a,targetDbSchema:r}){let n=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Database Shell | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Database Shell"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/shell-page.css"})]});return(0,s.jsx)(i.A,{head:n,user:e,extraHeaderContent:(0,s.jsx)(c.A,{database:t,query:a,user:e}),aceEditor:!0,children:(0,s.jsx)(f.Provider,{value:{user:e,database:t,targetDbSchema:r,query:a},children:(0,s.jsx)(d.A,{})})})}async function x({req:e,res:t,query:a}){let r=await (0,o.default)(e,t);if(!r?.logged_in_status||!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await (0,h.A)(`SELECT * FROM user_databases WHERE user_id='${r.id}' AND db_slug='${a.single}'`);if(!s?.[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};if(1==Number(s[0].remote_connected))return{redirect:{destination:`/admin/${r?.id}/databases/${a.single}`,permanent:!1}};await (0,m.A)({queryString:`SHOW TABLES FROM ${s[0].db_full_name}`});let n=(0,u.A)({userId:String(r.id)});if(!n?.[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let l=n.find(e=>e.dbFullName==s[0].db_full_name);return l?{props:{user:r,database:s[0],query:a,targetDbSchema:l}}:{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}}}r()}catch(e){r(e)}})},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,9796,5392,3634,3155],()=>a(2083));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js.nft.json index fb19ddf..438fe1b 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/connect.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1614.js","../../../../../chunks/2414.js","../../../../../chunks/2451.js","../../../../../chunks/2996.js","../../../../../chunks/3247.js","../../../../../chunks/3460.js","../../../../../chunks/3737.js","../../../../../chunks/3932.js","../../../../../chunks/4050.js","../../../../../chunks/4312.js","../../../../../chunks/4333.js","../../../../../chunks/4385.js","../../../../../chunks/45.js","../../../../../chunks/5134.js","../../../../../chunks/5212.js","../../../../../chunks/5264.js","../../../../../chunks/5421.js","../../../../../chunks/5664.js","../../../../../chunks/5674.js","../../../../../chunks/6521.js","../../../../../chunks/7070.js","../../../../../chunks/7640.js","../../../../../chunks/8540.js","../../../../../chunks/8613.js","../../../../../chunks/883.js","../../../../../chunks/8842.js","../../../../../chunks/9600.js","../../../../../chunks/9621.js","../../../../../chunks/9732.js","../../../../../chunks/9821.js","../../../../../chunks/9914.js","../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1251.js","../../../../../chunks/1579.js","../../../../../chunks/194.js","../../../../../chunks/2282.js","../../../../../chunks/3155.js","../../../../../chunks/3474.js","../../../../../chunks/3496.js","../../../../../chunks/3634.js","../../../../../chunks/3704.js","../../../../../chunks/3791.js","../../../../../chunks/4627.js","../../../../../chunks/5392.js","../../../../../chunks/5839.js","../../../../../chunks/5954.js","../../../../../chunks/6160.js","../../../../../chunks/6202.js","../../../../../chunks/6521.js","../../../../../chunks/6622.js","../../../../../chunks/6903.js","../../../../../chunks/725.js","../../../../../chunks/7713.js","../../../../../chunks/8704.js","../../../../../chunks/8760.js","../../../../../chunks/883.js","../../../../../chunks/9796.js","../../../../../chunks/9821.js","../../../../../chunks/9901.js","../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js index 5fe449a..0d34aa3 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4076,e.ids=[4076],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},52973:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>y,default:()=>p,getServerSideProps:()=>x,getStaticPaths:()=>h,getStaticProps:()=>u,reportWebVitals:()=>m,routeModule:()=>v,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>k,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>b});var s=a(63865),n=a(9455),l=a(30671),d=a(49407),i=a(89600),c=a(74157),o=e([c]);c=(o.then?(await o)():o)[0];let p=(0,l.M)(c,"default"),u=(0,l.M)(c,"getStaticProps"),h=(0,l.M)(c,"getStaticPaths"),x=(0,l.M)(c,"getServerSideProps"),y=(0,l.M)(c,"config"),m=(0,l.M)(c,"reportWebVitals"),b=(0,l.M)(c,"unstable_getStaticProps"),g=(0,l.M)(c,"unstable_getStaticPaths"),A=(0,l.M)(c,"unstable_getStaticParams"),f=(0,l.M)(c,"unstable_getServerProps"),k=(0,l.M)(c,"unstable_getServerSideProps"),v=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/edit-database",pathname:"/admin/[user_id]/databases/[single]/edit-database",bundlePath:"",filename:""},components:{App:i.default,Document:d.default},userland:c});r()}catch(e){r(e)}})},22622:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>h});var s=a(8732),n=a(82015),l=a.n(n),d=a(74157),i=a(46437),c=a(58548);a(55312);var o=a(14591),p=a(86571),u=e([d,o]);function h(e){let{database:t,user:a}=l().useContext(d.EditDatabaseContext);return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:["Edit"," ",(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t?.db_name})]})]}),(0,s.jsx)(c.A,{user:a})]}),t?.active_clone&&a?(0,s.jsx)(p.A,{database:t,user:a}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(o.A,{})]})}[d,o]=u.then?(await u)():u,r()}catch(e){r(e)}})},14591:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>u});var s=a(8732),n=a(82015),l=a.n(n),d=a(32415),i=a(74157),c=a(56987),o=a(12042),p=e([i]);function u(e){let{user:t,dbImage:a,setDbImage:r,database:n}=l().useContext(i.EditDatabaseContext),[p,u]=l().useState(!1);return l().useRef(),(0,s.jsx)("section",{className:"paper",children:(0,s.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[p&&(0,s.jsx)(d.A,{}),(0,s.jsxs)("div",{className:"flex-col items-start w-full xl:w-auto",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Update Database Information"}),t&&a?(0,s.jsx)(c.A,{user:t,dbImage:a,setDbImage:r,database:n,setLoading:u}):(0,s.jsx)("span",{children:"No User and Database Image present"})]}),t&&a&&r?(0,s.jsx)(o.A,{user:t,dbImage:a,setDbImage:r,database:n}):(0,s.jsx)("span",{children:"Database Image could not be rendered"})]})})}i=(p.then?(await p)():p)[0],r()}catch(e){r(e)}})},86571:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s({database:e,user:t}){let a=e.active_clone_parent_db?.replace(/datasquirel_user_\d+_/,""),s=`/admin/${t?.id}/databases/${a}`;return(0,r.jsx)("div",{className:"info green",children:(0,r.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,r.jsx)("b",{children:(0,r.jsx)("a",{href:s,target:"_blank",className:"query-url",children:a})})]})})}a(82015)},55158:(e,t,a)=>{a.d(t,{Ay:()=>d,PB:()=>i,fs:()=>c});var r=a(8732),s=a(58150),n=a(82015),l=a.n(n);function d({children:e,title:t,data:a,fullPage:n,wrapperClasses:d,closePopupDispatch:i,wrapperStyle:o,noContainer:p}){return n?(0,r.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":t||null,style:o,children:[p?(0,r.jsx)(l().Fragment,{children:e}):(0,r.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,r.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),i&&i()},children:(0,r.jsx)(s.A,{color:"white",size:20})}),(0,r.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]}):(0,r.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[p?(0,r.jsx)(l().Fragment,{children:e}):(0,r.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,r.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,r.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,r.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,r.jsx)("span",{className:"font-normal",children:"✖"})}),(0,r.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]})}function i(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t&&t(a))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},62506:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(8732),s=a(82015),n=a.n(s);function l({children:e,column:t,className:a}){let s=n().useRef();return(0,r.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:s,children:e})}},23293:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},74157:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{EditDatabaseContext:()=>g,default:()=>m,getServerSideProps:()=>b});var s=a(8732),n=a(82015),l=a.n(n),d=a(95222),i=a(20048),c=a.n(i),o=a(42105),p=a(22622),u=a(64098),h=a(67216),x=a.n(h),y=e([p,u]);[p,u]=y.then?(await y)():y;let g=l().createContext({});function m({user:e,database:t,query:a}){let r=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[n,i]=l().useState(t.db_image);return(0,s.jsx)(g.Provider,{value:{user:e,database:t,dbImage:n,setDbImage:i},children:(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)(d.A,{head:r,user:e,extraHeaderContent:(0,s.jsx)(u.A,{database:t,query:a,user:e}),children:(0,s.jsx)(p.A,{})}),(0,s.jsx)(o.A,{setDbImage:i})]})})}async function b({req:e,res:t,query:a}){let r=await c()(e,t);if(!r?.logged_in_status||!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await x()(`SELECT * FROM user_databases WHERE user_id='${r.id}' AND db_slug='${a.single}'`);return s&&s[0]?{props:{user:r,database:s[0],query:a}}:{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}}}r()}catch(e){r(e)}})},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,9600,7070,5134,3737,8613,2996],()=>a(52973));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4076,e.ids=[4076],e.modules={27579:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{config:()=>m,default:()=>u,getServerSideProps:()=>h,getStaticPaths:()=>x,getStaticProps:()=>p,reportWebVitals:()=>g,routeModule:()=>A,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>b});var r=a(63865),d=a(9455),i=a(30671),n=a(5583),l=a(19796),c=a(38471),o=e([c]);c=(o.then?(await o)():o)[0];let u=(0,i.M)(c,"default"),p=(0,i.M)(c,"getStaticProps"),x=(0,i.M)(c,"getStaticPaths"),h=(0,i.M)(c,"getServerSideProps"),m=(0,i.M)(c,"config"),g=(0,i.M)(c,"reportWebVitals"),b=(0,i.M)(c,"unstable_getStaticProps"),j=(0,i.M)(c,"unstable_getStaticPaths"),y=(0,i.M)(c,"unstable_getStaticParams"),f=(0,i.M)(c,"unstable_getServerProps"),v=(0,i.M)(c,"unstable_getServerSideProps"),A=new r.PagesRouteModule({definition:{kind:d.A.PAGES,page:"/admin/[user_id]/databases/[single]/edit-database",pathname:"/admin/[user_id]/databases/[single]/edit-database",bundlePath:"",filename:""},components:{App:l.default,Document:n.default},userland:c});s()}catch(e){s(e)}})},93340:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>x});var r=a(8732),d=a(82015),i=a.n(d),n=a(38471),l=a(59023),c=a(53926),o=a(82581),u=a(537),p=e([n,o]);function x(){let{database:e,user:t}=i().useContext(n.EditDatabaseContext);return(0,r.jsxs)(i().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(l.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Edit"," ",(0,r.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:e?.db_name})]})]}),(0,r.jsx)(c.A,{user:t})]}),e?.active_clone&&t?(0,r.jsx)(u.A,{database:e,user:t}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)(o.A,{})]})}[n,o]=p.then?(await p)():p,s()}catch(e){s(e)}})},82581:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>p});var r=a(8732),d=a(82015),i=a.n(d),n=a(16757),l=a(38471),c=a(61347),o=a(89088),u=e([l]);function p(){let{user:e,dbImage:t,setDbImage:a,database:s}=i().useContext(l.EditDatabaseContext),[d,u]=i().useState(!1);return i().useRef(),(0,r.jsx)("section",{className:"paper",children:(0,r.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[d&&(0,r.jsx)(n.A,{}),(0,r.jsxs)("div",{className:"flex-col items-start w-full xl:w-auto",children:[(0,r.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Update Database Information"}),e&&t?(0,r.jsx)(c.A,{user:e,dbImage:t,setDbImage:a,database:s,setLoading:u}):(0,r.jsx)("span",{children:"No User and Database Image present"})]}),e&&t&&a?(0,r.jsx)(o.A,{user:e,dbImage:t,setDbImage:a,database:s}):(0,r.jsx)("span",{children:"Database Image could not be rendered"})]})})}l=(u.then?(await u)():u)[0],s()}catch(e){s(e)}})},537:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732);function r({database:e,user:t}){let a=e.active_clone_parent_db?.replace(/datasquirel_user_\d+_/,""),r=`/admin/${t?.id}/databases/${a}`;return(0,s.jsx)("div",{className:"info green",children:(0,s.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,s.jsx)("b",{children:(0,s.jsx)("a",{href:r,target:"_blank",className:"query-url",children:a})})]})})}a(82015)},96089:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},38471:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{EditDatabaseContext:()=>g,default:()=>h,getServerSideProps:()=>m});var r=a(8732),d=a(82015),i=a.n(d),n=a(25562),l=a(92702),c=a(37195),o=a(93340),u=a(55880),p=a(71934),x=e([o,u]);[o,u]=x.then?(await x)():x;let g=i().createContext({});function h({user:e,database:t,query:a}){let s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"Add Database | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Add a database"})]}),[d,l]=i().useState(t.db_image);return(0,r.jsx)(g.Provider,{value:{user:e,database:t,dbImage:d,setDbImage:l},children:(0,r.jsxs)(i().Fragment,{children:[(0,r.jsx)(n.A,{head:s,user:e,extraHeaderContent:(0,r.jsx)(u.A,{database:t,query:a,user:e}),children:(0,r.jsx)(o.A,{})}),(0,r.jsx)(c.A,{setDbImage:l})]})})}async function m({req:e,res:t,query:a}){let s=await (0,l.default)(e,t);if(!s?.logged_in_status||!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,p.A)(`SELECT * FROM user_databases WHERE user_id='${s.id}' AND db_slug='${a.single}'`);return r&&r[0]?{props:{user:s,database:r[0],query:a}}:{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}}}s()}catch(e){s(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,3634,1579,194],()=>a(27579));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js.nft.json index 32b248e..2315424 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/edit-database.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/client.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package-shared/data/dataTypes.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1614.js","../../../../../chunks/2414.js","../../../../../chunks/2451.js","../../../../../chunks/2996.js","../../../../../chunks/3247.js","../../../../../chunks/3460.js","../../../../../chunks/3737.js","../../../../../chunks/3932.js","../../../../../chunks/4050.js","../../../../../chunks/4312.js","../../../../../chunks/4333.js","../../../../../chunks/4385.js","../../../../../chunks/45.js","../../../../../chunks/5134.js","../../../../../chunks/5212.js","../../../../../chunks/5264.js","../../../../../chunks/5421.js","../../../../../chunks/5664.js","../../../../../chunks/5674.js","../../../../../chunks/6521.js","../../../../../chunks/7070.js","../../../../../chunks/7640.js","../../../../../chunks/8540.js","../../../../../chunks/8613.js","../../../../../chunks/883.js","../../../../../chunks/8842.js","../../../../../chunks/9600.js","../../../../../chunks/9621.js","../../../../../chunks/9732.js","../../../../../chunks/9821.js","../../../../../chunks/9914.js","../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1251.js","../../../../../chunks/1579.js","../../../../../chunks/194.js","../../../../../chunks/2282.js","../../../../../chunks/3155.js","../../../../../chunks/3474.js","../../../../../chunks/3496.js","../../../../../chunks/3634.js","../../../../../chunks/3704.js","../../../../../chunks/3791.js","../../../../../chunks/4627.js","../../../../../chunks/5392.js","../../../../../chunks/5839.js","../../../../../chunks/5954.js","../../../../../chunks/6160.js","../../../../../chunks/6202.js","../../../../../chunks/6521.js","../../../../../chunks/6622.js","../../../../../chunks/6903.js","../../../../../chunks/725.js","../../../../../chunks/7713.js","../../../../../chunks/8704.js","../../../../../chunks/8760.js","../../../../../chunks/883.js","../../../../../chunks/9796.js","../../../../../chunks/9821.js","../../../../../chunks/9901.js","../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js index c0f12ba..3183db4 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js @@ -1 +1,16 @@ -"use strict";(()=>{var e={};e.id=8295,e.ids=[8295],e.modules={91489:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{config:()=>x,default:()=>u,getServerSideProps:()=>p,getStaticPaths:()=>h,getStaticProps:()=>m,reportWebVitals:()=>g,routeModule:()=>y,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>j,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>b});var r=a(63865),n=a(9455),l=a(30671),i=a(49407),c=a(89600),d=a(14454),o=e([d]);d=(o.then?(await o)():o)[0];let u=(0,l.M)(d,"default"),m=(0,l.M)(d,"getStaticProps"),h=(0,l.M)(d,"getStaticPaths"),p=(0,l.M)(d,"getServerSideProps"),x=(0,l.M)(d,"config"),g=(0,l.M)(d,"reportWebVitals"),b=(0,l.M)(d,"unstable_getStaticProps"),f=(0,l.M)(d,"unstable_getStaticPaths"),j=(0,l.M)(d,"unstable_getStaticParams"),S=(0,l.M)(d,"unstable_getServerProps"),v=(0,l.M)(d,"unstable_getServerSideProps"),y=new r.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/schema",pathname:"/admin/[user_id]/databases/[single]/schema",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:d});s()}catch(e){s(e)}})},28545:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>S});var r=a(8732),n=a(82015),l=a.n(n),i=a(46437),c=a(58548),d=a(14591),o=a(14454);a(58403);var u=a(51548),m=a(61430),h=a(220);a(63715);var p=a(89788),x=a(86571);a(34844);var g=a(59621),b=a(56248),f=a.n(b),j=e([d,o,m,h,p,g]);function S(e){let{database:t,dbSchemaData:a,tables:s,user:n}=l().useContext(o.DatabaseSchemaContext);try{if(!a)return(0,r.jsx)("span",{children:"No Database Schema Found!"});let e=a.filter(e=>e.dbFullName===t?.db_full_name)[0],[s,d]=l().useState(e.tables),[o,h]=l().useState(null),[b,j]=l().useState(e);if(!t)return(0,r.jsx)("span",{children:"No Database Record Found"});return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(i.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[(0,r.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t.db_name}),"\xa0",(0,r.jsx)("span",{children:"Database Schema"})]})]}),(0,r.jsx)(c.A,{user:n})]}),t.active_clone?(0,r.jsx)(x.A,{database:t,user:n}):(0,r.jsx)(r.Fragment,{}),t.remote_connected?(0,r.jsx)(g.p,{database:t}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)("section",{className:"paper",children:(0,r.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,r.jsxs)("div",{className:"w-full justify-between",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Database SCHEMA JSON"}),(0,r.jsx)("div",{children:s&&s[0]&&(0,r.jsx)(u.A,{required:!0,selectOptions:[{title:"All Tables",payload:"none"},...s.map((e,t)=>({title:e.tableFullName,payload:e.tableName,name:e.tableName}))],name:"database_tables",onChangeHandler:e=>{e.target.value?.match(/^none$/)?h(null):h(e.target.value)}})})]}),(0,r.jsx)(p.A,{content:f().stringify(b,null,4),readOnly:!0,options:{wrap:!0},wrapperProps:{className:"h-[60vh]"}})]})}),(0,r.jsx)(m.A,{})]})}catch(e){return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(i.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[(0,r.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t?.db_name||null}),"\xa0",(0,r.jsx)("span",{children:"Database Schema"})]})]}),(0,r.jsx)(c.A,{user:n})]}),(0,r.jsx)("section",{children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Error in generating Preview"})})]})}}[d,o,m,h,p,g]=j.then?(await j)():j,s()}catch(e){s(e)}})},220:(e,t,a)=>{a.a(e,async(e,t)=>{try{a(8732),a(82015);var s=a(14454),r=e([s]);s=(r.then?(await r)():r)[0],t()}catch(e){t(e)}})},61430:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>m});var r=a(8732),n=a(82015),l=a.n(n),i=a(46437),c=a(58548),d=a(14591),o=a(14454);a(58403),a(51548),a(63715);var u=e([d,o]);function m(e){let{database:t,dbSchemaData:a,tables:s,user:n}=l().useContext(o.DatabaseSchemaContext);try{return(0,r.jsx)("section",{className:"card",children:(0,r.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Database Tables"}),s&&s[0]&&s.map((e,t)=>(0,r.jsx)("div",{className:"card light-gray w-full",children:(0,r.jsx)("span",{children:e.tableSlug})},t+1))]})})}catch(e){return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(i.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[(0,r.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t?.db_name}),"\xa0",(0,r.jsx)("span",{children:"Database Schema"})]})]}),(0,r.jsx)(c.A,{user:n})]}),(0,r.jsx)("section",{className:"card",children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Error in generating Tables Table"})})]})}}[d,o]=u.then?(await u)():u,s()}catch(e){s(e)}})},22622:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>h});var r=a(8732),n=a(82015),l=a.n(n),i=a(74157),c=a(46437),d=a(58548);a(55312);var o=a(14591),u=a(86571),m=e([i,o]);function h(e){let{database:t,user:a}=l().useContext(i.EditDatabaseContext);return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)(c.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Edit"," ",(0,r.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t?.db_name})]})]}),(0,r.jsx)(d.A,{user:a})]}),t?.active_clone&&a?(0,r.jsx)(u.A,{database:t,user:a}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)(o.A,{})]})}[i,o]=m.then?(await m)():m,s()}catch(e){s(e)}})},14591:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>m});var r=a(8732),n=a(82015),l=a.n(n),i=a(32415),c=a(74157),d=a(56987),o=a(12042),u=e([c]);function m(e){let{user:t,dbImage:a,setDbImage:s,database:n}=l().useContext(c.EditDatabaseContext),[u,m]=l().useState(!1);return l().useRef(),(0,r.jsx)("section",{className:"paper",children:(0,r.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[u&&(0,r.jsx)(i.A,{}),(0,r.jsxs)("div",{className:"flex-col items-start w-full xl:w-auto",children:[(0,r.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Update Database Information"}),t&&a?(0,r.jsx)(d.A,{user:t,dbImage:a,setDbImage:s,database:n,setLoading:m}):(0,r.jsx)("span",{children:"No User and Database Image present"})]}),t&&a&&s?(0,r.jsx)(o.A,{user:t,dbImage:a,setDbImage:s,database:n}):(0,r.jsx)("span",{children:"Database Image could not be rendered"})]})})}c=(u.then?(await u)():u)[0],s()}catch(e){s(e)}})},84759:(e,t,a)=>{a.d(t,{A:()=>s});function s({editorHTMLElementRef:e,fieldObject:t,setRefresh:a,language:s="javascript",entry:r,jsonTextEditors:n,editorRef:l,readOnly:i,initialContent:c,options:d}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{a?.(e=>e+1)},1e3);return}let o=ace.edit(e.current);o.setOptions({mode:"ace/mode/"+s,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&r?.[t.fieldName]?(()=>{if("json"!==s)return r[t.fieldName];try{return JSON.stringify(JSON.parse(r[t.fieldName]),null,4)}catch(e){return r[t.fieldName]}})():""),placeholder:"json"==s?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...d}),l&&t?.fieldName&&(n?.current.push({fieldName:t.fieldName,ref:l}),l.current=o);try{ace.require("ace/ext/beautify").beautify(o.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},51548:(e,t,a)=>{a.d(t,{A:()=>n});var s=a(8732),r=a(58526);function n({selectOptions:e,name:t,onChangeHandler:a,required:n,setAlert:l,title:i,defaultValue:c,info:d,id:o}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(d?" pr-8":""),children:[i&&(0,s.jsxs)("label",{htmlFor:t,children:[i,n?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:o||t,className:"w-full bg-white",required:n,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:a,title:r}=e;return(0,s.jsx)("option",{value:a,selected:!!e.default,children:r},t+1)})}),(0,s.jsx)(r.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),d&&(0,s.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,s.jsx)("span",{children:d})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}a(82015)},89788:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>d});var r=a(8732);a(63715);var n=a(82015),l=a.n(n);a(84759);var i=a(75979),c=e([i]);function d({editorRef:e,content:t,readOnly:a,language:s="javascript",options:n,wrapperProps:c}){try{let e=l().useRef(),[t,a]=l().useState(0);return(0,r.jsx)("div",{...c,ref:e,className:(0,i.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,r.jsx)(l().Fragment,{children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}i=(c.then?(await c)():c)[0],s()}catch(e){s(e)}})},34844:(e,t,a)=>{a.d(t,{A:()=>i});var s=a(8732),r=a(82015),n=a.n(r),l=a(96089);function i({content:e,language:t,style:a,showCopy:r}){let[i,c]=n().useState(!1),d=()=>{c(!0)},o={};return(0,s.jsxs)("pre",{className:`language-${t||"javascript"} w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center`,style:a?{...a,...o}:o,children:[(0,s.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:e}),(0,s.jsx)("button",{className:"outlined copy-code "+(r?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:t=>{navigator.clipboard.writeText(e).then(()=>{d()})},children:(0,s.jsx)(l.A,{className:"text-white",size:20})})]})}},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},93342:(e,t,a)=>{let s=a(22373),r=a(29021),n=a(33873);e.exports=function({userId:e}){try{let t=n.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(r.readFileSync(t,"utf-8"))}catch(e){return s({component:"grabUserSchemaData",message:e.message}),null}}},89545:(e,t,a)=>{let s=a(77463),r=a(68743);e.exports=async function({unparsedResults:e,tableSchema:t}){let a=[];try{for(let n=0;n",t.message),e}}},90378:(e,t,a)=>{a(29021);let s=a(89545),r=a(22373),n=a(67216),l=a(1231),i=a(88896);e.exports=async function({queryString:e,queryValuesArray:t,database:a,tableSchema:c,useLocal:d}){let o;let u=!!d||!!a?.match(/^datasquirel$/),m=d?i:u?n:l;try{o=e&&t&&Array.isArray(t)&&t[0]?u?await m(e,t):await m({paradigm:"Full Access",database:a,queryString:e,queryValues:t}):u?await m(e):await m({paradigm:"Full Access",database:a,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(o&&c)try{let e=o;return await s({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(o)return o;else return null}},1231:(e,t,a)=>{let s=a(29021);a(33873);let r=a(9973),n=a(31976),l=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:t,queryString:a,queryValues:i}){try{return new Promise((c,d)=>{let o=!!e?.match(/full.access|^fa$/i);try{function u(e){l.end(),c(JSON.parse(JSON.stringify(e)))}function m(e){l.end(),c({error:e.message,queryStringGenerated:a,queryValuesGenerated:i,sql:e.sql})}l=o?r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:n()}}):r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:n()}}),i&&Array.isArray(i)&&i[0]?l.query(a,i).then(u).catch(m):l.query(a).then(u).catch(m)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,t,a)=>{let s=a(9973),r=a(31976);async function n(...e){let t=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},56248:e=>{e.exports={parse:function(e,t){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,t)}catch(e){return}}},stringify:function(e,t,a){try{return JSON.stringify(e,t,a)}catch(e){return}}}},74157:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{EditDatabaseContext:()=>f,default:()=>g,getServerSideProps:()=>b});var r=a(8732),n=a(82015),l=a.n(n),i=a(95222),c=a(20048),d=a.n(c),o=a(42105),u=a(22622),m=a(64098),h=a(67216),p=a.n(h),x=e([u,m]);[u,m]=x.then?(await x)():x;let f=l().createContext({});function g({user:e,database:t,query:a}){let s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"Add Database | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Add a database"})]}),[n,c]=l().useState(t.db_image);return(0,r.jsx)(f.Provider,{value:{user:e,database:t,dbImage:n,setDbImage:c},children:(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)(i.A,{head:s,user:e,extraHeaderContent:(0,r.jsx)(m.A,{database:t,query:a,user:e}),children:(0,r.jsx)(u.A,{})}),(0,r.jsx)(o.A,{setDbImage:c})]})})}async function b({req:e,res:t,query:a}){let s=await d()(e,t);if(!s?.logged_in_status||!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await p()(`SELECT * FROM user_databases WHERE user_id='${s.id}' AND db_slug='${a.single}'`);return r&&r[0]?{props:{user:s,database:r[0],query:a}}:{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}}}s()}catch(e){s(e)}})},14454:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{DatabaseSchemaContext:()=>v,default:()=>j,getServerSideProps:()=>S});var r=a(8732),n=a(82015),l=a.n(n),i=a(95222),c=a(20048),d=a.n(c),o=a(64098),u=a(28545),m=a(90378),h=a.n(m),p=a(67216),x=a.n(p),g=a(93342),b=a.n(g),f=e([o,u]);[o,u]=f.then?(await f)():f;let v=l().createContext({});function j({user:e,database:t,query:a,dbSchemaData:s,tables:n}){let c=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"Add Database | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Add a database"})]}),[d,m]=l().useState(t.db_image);return(0,r.jsx)(i.A,{head:c,user:e,extraHeaderContent:(0,r.jsx)(o.A,{database:t,query:a,user:e}),aceEditor:!0,children:(0,r.jsx)(v.Provider,{value:{user:e,database:t,dbImage:d,setDbImage:m,dbSchemaData:s,tables:n},children:(0,r.jsx)(u.A,{})})})}async function S({req:e,res:t,query:a}){try{let s=await d()(e,t);if(!s?.logged_in_status||!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await x()(`SELECT * FROM user_databases WHERE user_id='${s.id}' AND db_slug='${a.single}'`);if(!r||!r[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let n=await h()({queryString:"SHOW TABLES",database:r[0].db_full_name}),l=b()({userId:s.id});if(!l)throw Error("User schema data not found!");return{props:{user:s,database:r[0],query:a,dbSchemaData:l||[],tables:n&&n[0]?n.map(e=>{let t=Object.keys(e)[0];return{tableSlug:e[t]}}):[]}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}s()}catch(e){s(e)}})},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,6521,9600,7070,5134,3737,9621,8613,2996],()=>a(91489));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8295,e.ids=[8295],e.modules={7463:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>f,default:()=>u,getServerSideProps:()=>h,getStaticPaths:()=>p,getStaticProps:()=>m,reportWebVitals:()=>g,routeModule:()=>v,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>x});var s=r(63865),n=r(9455),l=r(30671),i=r(5583),c=r(19796),o=r(50436),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,l.M)(o,"default"),m=(0,l.M)(o,"getStaticProps"),p=(0,l.M)(o,"getStaticPaths"),h=(0,l.M)(o,"getServerSideProps"),f=(0,l.M)(o,"config"),g=(0,l.M)(o,"reportWebVitals"),x=(0,l.M)(o,"unstable_getStaticProps"),b=(0,l.M)(o,"unstable_getStaticPaths"),y=(0,l.M)(o,"unstable_getStaticParams"),S=(0,l.M)(o,"unstable_getServerProps"),j=(0,l.M)(o,"unstable_getServerSideProps"),v=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/schema",pathname:"/admin/[user_id]/databases/[single]/schema",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:o});a()}catch(e){a(e)}})},44387:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>x});var s=r(8732),n=r(82015),l=r.n(n),i=r(59023),c=r(53926),o=r(50436),d=r(80830),u=r(97412);r(46169);var m=r(84894),p=r(537),h=r(23791),f=r(60374),g=e([o,u,m,h]);function x(){let{database:e,dbSchemaData:t,tables:r,user:a}=l().useContext(o.DatabaseSchemaContext);try{if(!t)return(0,s.jsx)("span",{children:"No Database Schema Found!"});let r=t.filter(t=>t.dbFullName===e?.db_full_name)[0],[n,o]=l().useState(r.tables),[g,x]=l().useState(null),[b,y]=l().useState(r);if(!e)return(0,s.jsx)("span",{children:"No Database Record Found"});return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:e.db_name}),"\xa0",(0,s.jsx)("span",{children:"Database Schema"})]})]}),(0,s.jsx)(c.A,{user:a})]}),e.active_clone&&a?(0,s.jsx)(p.A,{database:e,user:a}):(0,s.jsx)(s.Fragment,{}),e.remote_connected?(0,s.jsx)(h.p,{database:e}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)("section",{className:"paper",children:(0,s.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Database SCHEMA JSON"}),(0,s.jsx)("div",{children:n&&n[0]&&(0,s.jsx)(d.A,{required:!0,selectOptions:[{title:"All Tables",payload:"none"},...n.map((e,t)=>({title:e.tableFullName,payload:e.tableName,name:e.tableName}))],name:"database_tables",onChangeHandler:e=>{e.target.value?.match(/^none$/)?x(null):x(e.target.value)}})})]}),(0,s.jsx)(m.A,{content:f.A.stringify(b,null,4),readOnly:!0,options:{wrap:!0},wrapperProps:{className:"h-[60vh]"}})]})}),(0,s.jsx)(u.A,{})]})}catch(t){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:e?.db_name||null}),"\xa0",(0,s.jsx)("span",{children:"Database Schema"})]})]}),(0,s.jsx)(c.A,{user:a})]}),(0,s.jsx)("section",{children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Error in generating Preview"})})]})}}[o,u,m,h]=g.then?(await g)():g,a()}catch(e){a(e)}})},97412:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>u});var s=r(8732),n=r(82015),l=r.n(n),i=r(59023),c=r(53926),o=r(50436);r(46169);var d=e([o]);function u(e){let{database:t,dbSchemaData:r,tables:a,user:n}=l().useContext(o.DatabaseSchemaContext);try{return(0,s.jsx)("section",{className:"card",children:(0,s.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Database Tables"}),a&&a[0]&&a.map((e,t)=>(0,s.jsx)("div",{className:"card light-gray w-full",children:(0,s.jsx)("span",{children:e.tableSlug})},t+1))]})})}catch(e){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t?.db_name}),"\xa0",(0,s.jsx)("span",{children:"Database Schema"})]})]}),(0,s.jsx)(c.A,{user:n})]}),(0,s.jsx)("section",{className:"card",children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Error in generating Tables Table"})})]})}}o=(d.then?(await d)():d)[0],a()}catch(e){a(e)}})},6789:(e,t,r)=>{r.d(t,{A:()=>a});function a({editorHTMLElementRef:e,fieldObject:t,setRefresh:r,language:a="javascript",entry:s,jsonTextEditors:n,editorRef:l,readOnly:i,initialContent:c,options:o}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{r?.(e=>e+1)},1e3);return}let d=ace.edit(e.current);d.setOptions({mode:"ace/mode/"+a,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&s?.[t.fieldName]?(()=>{if("json"!==a)return s[t.fieldName];try{return JSON.stringify(JSON.parse(s[t.fieldName]),null,4)}catch(e){return s[t.fieldName]}})():""),placeholder:"json"==a?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...o}),l&&t?.fieldName&&(n?.current.push({fieldName:t.fieldName,ref:l}),l.current=d);try{ace.require("ace/ext/beautify").beautify(d.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},80830:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(8732),s=r(58526);function n({selectOptions:e,name:t,onChangeHandler:r,required:n,setAlert:l,title:i,defaultValue:c,info:o,id:d}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),r=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!r.classList.contains("hidden")){r.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&r.classList.contains("hidden"))){if(!t){r.classList.add("hidden");return}if(r.classList.contains("hidden")){r.classList.remove("hidden");return}r.classList.add("hidden")}}return(0,a.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[i&&(0,a.jsxs)("label",{htmlFor:t,children:[i,n?"":" (optional)"]}),(0,a.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,a.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:n,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),r&&r(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:r,title:s}=e;return(0,a.jsx)("option",{value:r,selected:!!e.default,children:s},t+1)})}),(0,a.jsx)(s.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,a.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,a.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,a.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,a.jsx)("span",{children:o})}),(0,a.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,a.jsx)("div",{children:"Form Select Error"})}}r(82015)},84894:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>o});var s=r(8732);r(46169);var n=r(82015),l=r.n(n);r(6789);var i=r(75979),c=e([i]);function o({editorRef:e,content:t,readOnly:r,language:a="javascript",options:n,wrapperProps:c}){try{let e=l().useRef(),[t,r]=l().useState(0);return(0,s.jsx)("div",{...c,ref:e,className:(0,i.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}i=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},72272:(e,t,r)=>{r.d(t,{A:()=>c});var a=r(77047),s=r(29021),n=r.n(s),l=r(33873),i=r.n(l);function c({userId:e}){try{let t=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(n().readFileSync(t,"utf-8"))}catch(e){return(0,a.A)({component:"grabUserSchemaData",message:e.message}),null}}},77047:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(29021),s=r.n(a);async function n({user:e,message:t,component:r,noMail:a,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],r=n.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||a||t||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +Error Message: ${t} +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),n?.url&&(a+=` +URL: ${n.url}`),n?.body&&(a+=` +Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(a+=` +IP: ${i}`),a+=` +Date: ${l.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let c=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` + + + + +${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,t,r)=>{r.d(t,{A:()=>d});var a=r(71205);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:t}){let r=[];try{for(let n=0;n",t.message),e}}var l=r(77047),i=r(71934),c=r(43651),o=r(16175);async function d({queryString:e,queryValuesArray:t,database:r,tableSchema:a,useLocal:s}){let d;let u=!!s||!!r?.match(/^datasquirel$/),m=s?o.A:u?i.A:c.A;try{d=e&&t&&Array.isArray(t)&&t[0]?u?await m(e,t):await m({paradigm:"Full Access",queryString:e,queryValues:t}):u?await m(e):await m({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,l.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(d&&a)try{let e=d;return await n({unparsedResults:e,tableSchema:a})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",r,e),(0,l.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(d)return d;else return null}},43651:(e,t,r)=>{async function a(e,t,r){try{if("string"==typeof t){let a=await e.query(s(t),r);return JSON.parse(JSON.stringify(a))}if("object"!=typeof t)return null;{let r=[];for(let a=0;an})},16175:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(9973),s=r.n(a),n=r(29021),l=r.n(n);async function i(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!l().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},60374:(e,t,r)=>{r.d(t,{A:()=>a});let a={parse:function(e,t){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,t)}catch(e){return}}},stringify:function(e,t,r){try{return JSON.stringify(e,t||void 0,r)}catch(e){return}}}},50436:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{DatabaseSchemaContext:()=>x,default:()=>f,getServerSideProps:()=>g});var s=r(8732),n=r(82015),l=r.n(n),i=r(25562),c=r(92702),o=r(55880),d=r(44387),u=r(52854),m=r(71934),p=r(72272),h=e([o,d]);[o,d]=h.then?(await h)():h;let x=l().createContext({});function f({user:e,database:t,query:r,dbSchemaData:a,tables:n}){let c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[u,m]=l().useState(t.db_image);return(0,s.jsx)(i.A,{head:c,user:e,extraHeaderContent:(0,s.jsx)(o.A,{database:t,query:r,user:e}),aceEditor:!0,children:(0,s.jsx)(x.Provider,{value:{user:e,database:t,dbImage:u,setDbImage:m,dbSchemaData:a,tables:n},children:(0,s.jsx)(d.A,{})})})}async function g({req:e,res:t,query:r}){try{let a=await (0,c.default)(e,t);if(!a?.logged_in_status||!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await (0,m.A)(`SELECT * FROM user_databases WHERE user_id='${a.id}' AND db_slug='${r.single}'`);if(!s||!s[0])return{redirect:{destination:`/admin/${a?.id}/databases`,permanent:!1}};let n=await (0,u.A)({queryString:`SHOW TABLES FROM ${s[0].db_full_name}`}),l=(0,p.A)({userId:a.id});if(!l)throw Error("User schema data not found!");return{props:{user:a,database:s[0],query:r,dbSchemaData:l||[],tables:n&&n[0]?n.map(e=>{let t=Object.keys(e)[0];return{tableSlug:e[t]}}):[]}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}a()}catch(e){a(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,6521,9796,5392,3634,3791],()=>r(7463));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js.nft.json index db595cf..438fe1b 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/schema.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/client.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package-shared/data/dataTypes.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1614.js","../../../../../chunks/2414.js","../../../../../chunks/2451.js","../../../../../chunks/2996.js","../../../../../chunks/3247.js","../../../../../chunks/3460.js","../../../../../chunks/3737.js","../../../../../chunks/3932.js","../../../../../chunks/4050.js","../../../../../chunks/4312.js","../../../../../chunks/4333.js","../../../../../chunks/4385.js","../../../../../chunks/45.js","../../../../../chunks/5134.js","../../../../../chunks/5212.js","../../../../../chunks/5264.js","../../../../../chunks/5421.js","../../../../../chunks/5664.js","../../../../../chunks/5674.js","../../../../../chunks/6521.js","../../../../../chunks/7070.js","../../../../../chunks/7640.js","../../../../../chunks/8540.js","../../../../../chunks/8613.js","../../../../../chunks/883.js","../../../../../chunks/8842.js","../../../../../chunks/9600.js","../../../../../chunks/9621.js","../../../../../chunks/9732.js","../../../../../chunks/9821.js","../../../../../chunks/9914.js","../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1251.js","../../../../../chunks/1579.js","../../../../../chunks/194.js","../../../../../chunks/2282.js","../../../../../chunks/3155.js","../../../../../chunks/3474.js","../../../../../chunks/3496.js","../../../../../chunks/3634.js","../../../../../chunks/3704.js","../../../../../chunks/3791.js","../../../../../chunks/4627.js","../../../../../chunks/5392.js","../../../../../chunks/5839.js","../../../../../chunks/5954.js","../../../../../chunks/6160.js","../../../../../chunks/6202.js","../../../../../chunks/6521.js","../../../../../chunks/6622.js","../../../../../chunks/6903.js","../../../../../chunks/725.js","../../../../../chunks/7713.js","../../../../../chunks/8704.js","../../../../../chunks/8760.js","../../../../../chunks/883.js","../../../../../chunks/9796.js","../../../../../chunks/9821.js","../../../../../chunks/9901.js","../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js index c58765b..41c6202 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=204,e.ids=[204],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},12009:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>m,default:()=>u,getServerSideProps:()=>y,getStaticPaths:()=>h,getStaticProps:()=>p,reportWebVitals:()=>g,routeModule:()=>_,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>x,unstable_getStaticProps:()=>f});var s=r(63865),n=r(9455),l=r(30671),i=r(49407),c=r(89600),o=r(92557),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,l.M)(o,"default"),p=(0,l.M)(o,"getStaticProps"),h=(0,l.M)(o,"getStaticPaths"),y=(0,l.M)(o,"getServerSideProps"),m=(0,l.M)(o,"config"),g=(0,l.M)(o,"reportWebVitals"),f=(0,l.M)(o,"unstable_getStaticProps"),x=(0,l.M)(o,"unstable_getStaticPaths"),S=(0,l.M)(o,"unstable_getStaticParams"),A=(0,l.M)(o,"unstable_getServerProps"),b=(0,l.M)(o,"unstable_getServerSideProps"),_=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/shell",pathname:"/admin/[user_id]/databases/[single]/shell",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:o});a()}catch(e){a(e)}})},64648:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>y});var s=r(8732),n=r(82015),l=r.n(n),i=r(46437),c=r(58548),o=r(92557),d=r(32415),u=r(63715),p=r(60324),h=e([o,p]);function y(e){let{database:t,dbSchemaData:r,tables:a,user:n}=l().useContext(o.DatabaseShellContext);if(!n)return null;try{let e=l().useRef(),r=l().useRef(),[o,h]=l().useState(!1),[y,m]=l().useState(!1),[g,f]=l().useState(0);return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsx)("h1",{className:"text-3xl m-0",children:(0,s.jsxs)("span",{children:[t?.db_name," Database Shell"]})})]}),(0,s.jsx)(c.A,{user:n})]}),(0,s.jsxs)("div",{className:"w-full flex-col relative",children:[(0,s.jsx)("div",{ref:e,id:"ace-editor-wrapper"}),(0,s.jsxs)("button",{className:"absolute right-4 bottom-4"+(o?" pointer-events-none opacity-70":""),onClick:e=>{!function(){h(!0);let e=r.current?r.current.getValue():null;if(!e?.match(/./))return;let s=e.replace(/^--.*/gm,"").replace(/\n|\r|\n\r/gm,"").replace(/ {2,}/g," ");(0,u.A)("/api/runUserDbQuery",{method:"post",body:{database:t?.db_slug,query:s,tables:a?.map(e=>e.tableSlug)}},!0).then(e=>{e.success?m(e.result):e.msg&&window.alert(e.msg),setTimeout(()=>{h(!1)},500)})}()},children:[o&&(0,s.jsx)(d.A,{position:"relative",width:"15px",borderWidth:"3px",style:{backgroundColor:"transparent"}}),o?"Running Query ...":"Run Query"]})]}),y&&!o&&(0,s.jsx)("section",{className:"card",children:(0,s.jsxs)("div",{className:"w-full flex-col items-start overflow-x-scroll",children:[(0,s.jsx)("h2",{className:"text-xl",children:"Query Results"}),(0,s.jsx)(p.A,{data:y,user:n})]})})]})}catch(e){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:t?.db_name}),"\xa0",(0,s.jsx)("span",{children:"Database Shell"})]})]}),(0,s.jsx)(c.A,{user:n})]}),(0,s.jsx)("section",{className:"card",children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Shell not available at this time"})})]})}}[o,p]=h.then?(await h)():h,a()}catch(e){a(e)}})},60324:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>o});var s=r(8732),n=r(82015),l=r.n(n);r(63715);var i=r(89788),c=e([i]);function o({data:e,user:t}){try{return Object.keys(e[0]),(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("div",{className:"p-4 bg-slate-200 rounded-md overflow-hidden",children:(0,s.jsx)(i.A,{content:JSON.stringify(e,null,4)})})})}catch(e){return(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("span",{children:"No results"})})}}i=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},84759:(e,t,r)=>{r.d(t,{A:()=>a});function a({editorHTMLElementRef:e,fieldObject:t,setRefresh:r,language:a="javascript",entry:s,jsonTextEditors:n,editorRef:l,readOnly:i,initialContent:c,options:o}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{r?.(e=>e+1)},1e3);return}let d=ace.edit(e.current);d.setOptions({mode:"ace/mode/"+a,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&s?.[t.fieldName]?(()=>{if("json"!==a)return s[t.fieldName];try{return JSON.stringify(JSON.parse(s[t.fieldName]),null,4)}catch(e){return s[t.fieldName]}})():""),placeholder:"json"==a?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...o}),l&&t?.fieldName&&(n?.current.push({fieldName:t.fieldName,ref:l}),l.current=d);try{ace.require("ace/ext/beautify").beautify(d.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},89788:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>o});var s=r(8732);r(63715);var n=r(82015),l=r.n(n);r(84759);var i=r(75979),c=e([i]);function o({editorRef:e,content:t,readOnly:r,language:a="javascript",options:n,wrapperProps:c}){try{let e=l().useRef(),[t,r]=l().useState(0);return(0,s.jsx)("div",{...c,ref:e,className:(0,i.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}i=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},23293:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},93342:(e,t,r)=>{let a=r(22373),s=r(29021),n=r(33873);e.exports=function({userId:e}){try{let t=n.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(s.readFileSync(t,"utf-8"))}catch(e){return a({component:"grabUserSchemaData",message:e.message}),null}}},89545:(e,t,r)=>{let a=r(77463),s=r(68743);e.exports=async function({unparsedResults:e,tableSchema:t}){let r=[];try{for(let n=0;n",t.message),e}}},22373:(e,t,r)=>{let a=r(29021),{IncomingMessage:s}=r(81630);e.exports=async function({user:e,message:t,component:r,noMail:s,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],r=n.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||a||t||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=204,e.ids=[204],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},5375:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>m,default:()=>u,getServerSideProps:()=>y,getStaticPaths:()=>p,getStaticProps:()=>h,reportWebVitals:()=>g,routeModule:()=>v,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>x,unstable_getStaticProps:()=>f});var s=r(63865),n=r(9455),l=r(30671),i=r(5583),c=r(19796),o=r(40519),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,l.M)(o,"default"),h=(0,l.M)(o,"getStaticProps"),p=(0,l.M)(o,"getStaticPaths"),y=(0,l.M)(o,"getServerSideProps"),m=(0,l.M)(o,"config"),g=(0,l.M)(o,"reportWebVitals"),f=(0,l.M)(o,"unstable_getStaticProps"),x=(0,l.M)(o,"unstable_getStaticPaths"),A=(0,l.M)(o,"unstable_getStaticParams"),S=(0,l.M)(o,"unstable_getServerProps"),b=(0,l.M)(o,"unstable_getServerSideProps"),v=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/shell",pathname:"/admin/[user_id]/databases/[single]/shell",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:o});a()}catch(e){a(e)}})},22338:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>y});var s=r(8732),n=r(82015),l=r.n(n),i=r(59023),c=r(53926),o=r(40519),d=r(16757),u=r(46169),h=r(24342),p=e([o,h]);function y(){let{database:e,dbSchemaData:t,tables:r,user:a}=l().useContext(o.DatabaseShellContext);if(!a)return null;try{let t=l().useRef(),n=l().useRef(),[o,p]=l().useState(!1),[y,m]=l().useState(!1),[g,f]=l().useState(0);return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsx)("h1",{className:"text-3xl m-0",children:(0,s.jsxs)("span",{children:[e?.db_name," Database Shell"]})})]}),(0,s.jsx)(c.A,{user:a})]}),(0,s.jsxs)("div",{className:"w-full flex-col relative",children:[(0,s.jsx)("div",{ref:t,id:"ace-editor-wrapper"}),(0,s.jsxs)("button",{className:"absolute right-4 bottom-4"+(o?" pointer-events-none opacity-70":""),onClick:t=>{!function(){p(!0);let t=n.current?n.current.getValue():null;if(!t?.match(/./))return;let a=t.replace(/^--.*/gm,"").replace(/\n|\r|\n\r/gm,"").replace(/ {2,}/g," ");(0,u.A)("/api/runUserDbQuery",{method:"post",body:{database:e?.db_slug,query:a,tables:r?.map(e=>e.tableSlug)}},!0).then(e=>{e.success?m(e.result):e.msg&&window.alert(e.msg),setTimeout(()=>{p(!1)},500)})}()},children:[o&&(0,s.jsx)(d.A,{position:"relative",width:"15px",borderWidth:"3px",style:{backgroundColor:"transparent"}}),o?"Running Query ...":"Run Query"]})]}),y&&!o&&(0,s.jsx)("section",{className:"card",children:(0,s.jsxs)("div",{className:"w-full flex-col items-start overflow-x-scroll",children:[(0,s.jsx)("h2",{className:"text-xl",children:"Query Results"}),(0,s.jsx)(h.A,{data:y,user:a})]})})]})}catch(t){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:e?.db_name}),"\xa0",(0,s.jsx)("span",{children:"Database Shell"})]})]}),(0,s.jsx)(c.A,{user:a})]}),(0,s.jsx)("section",{className:"card",children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Shell not available at this time"})})]})}}[o,h]=p.then?(await p)():p,a()}catch(e){a(e)}})},24342:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>o});var s=r(8732),n=r(82015),l=r.n(n);r(46169);var i=r(84894),c=e([i]);function o({data:e,user:t}){try{return Object.keys(e[0]),(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("div",{className:"p-4 bg-slate-200 rounded-md overflow-hidden",style:{width:"100%",height:"600px",overflow:"auto"},children:(0,s.jsx)(i.A,{content:JSON.stringify(e,null,4)})})})}catch(e){return(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("span",{children:"No results"})})}}i=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},6789:(e,t,r)=>{r.d(t,{A:()=>a});function a({editorHTMLElementRef:e,fieldObject:t,setRefresh:r,language:a="javascript",entry:s,jsonTextEditors:n,editorRef:l,readOnly:i,initialContent:c,options:o}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{r?.(e=>e+1)},1e3);return}let d=ace.edit(e.current);d.setOptions({mode:"ace/mode/"+a,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&s?.[t.fieldName]?(()=>{if("json"!==a)return s[t.fieldName];try{return JSON.stringify(JSON.parse(s[t.fieldName]),null,4)}catch(e){return s[t.fieldName]}})():""),placeholder:"json"==a?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...o}),l&&t?.fieldName&&(n?.current.push({fieldName:t.fieldName,ref:l}),l.current=d);try{ace.require("ace/ext/beautify").beautify(d.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},84894:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>o});var s=r(8732);r(46169);var n=r(82015),l=r.n(n);r(6789);var i=r(75979),c=e([i]);function o({editorRef:e,content:t,readOnly:r,language:a="javascript",options:n,wrapperProps:c}){try{let e=l().useRef(),[t,r]=l().useState(0);return(0,s.jsx)("div",{...c,ref:e,className:(0,i.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}i=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},23293:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},72272:(e,t,r)=>{r.d(t,{A:()=>c});var a=r(77047),s=r(29021),n=r.n(s),l=r(33873),i=r.n(l);function c({userId:e}){try{let t=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(n().readFileSync(t,"utf-8"))}catch(e){return(0,a.A)({component:"grabUserSchemaData",message:e.message}),null}}},77047:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(29021),s=r.n(a);async function n({user:e,message:t,component:r,noMail:a,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],r=n.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||a||t||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${t} -Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(s+=` -URL: ${n.url}`),n?.body&&(s+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(s+=` -IP: ${i}`),s+=` +User Email: ${e?.email}`),n?.url&&(a+=` +URL: ${n.url}`),n?.body&&(a+=` +Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(a+=` +IP: ${i}`),a+=` Date: ${l.toDateString()} -========================================`,a.existsSync("./.tmp/error.log")||a.writeFileSync("./.tmp/error.log","","utf-8");let c=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",s),a.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let c=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},90378:(e,t,r)=>{r(29021);let a=r(89545),s=r(22373),n=r(67216),l=r(1231),i=r(88896);e.exports=async function({queryString:e,queryValuesArray:t,database:r,tableSchema:c,useLocal:o}){let d;let u=!!o||!!r?.match(/^datasquirel$/),p=o?i:u?n:l;try{d=e&&t&&Array.isArray(t)&&t[0]?u?await p(e,t):await p({paradigm:"Full Access",database:r,queryString:e,queryValues:t}):u?await p(e):await p({paradigm:"Full Access",database:r,queryString:e})}catch(e){s({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(d&&c)try{let e=d;return await a({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",r,e),s({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(d)return d;else return null}},1231:(e,t,r)=>{let a=r(29021);r(33873);let s=r(9973),n=r(31976),l=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:t,queryString:r,queryValues:i}){try{return new Promise((c,o)=>{let d=!!e?.match(/full.access|^fa$/i);try{function u(e){l.end(),c(JSON.parse(JSON.stringify(e)))}function p(e){l.end(),c({error:e.message,queryStringGenerated:r,queryValuesGenerated:i,sql:e.sql})}l=d?s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:n()}}):s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:n()}}),i&&Array.isArray(i)&&i[0]?l.query(r,i).then(u).catch(p):l.query(r).then(u).catch(p)}catch(e){a.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,t,r)=>{let a=r(9973),s=r(31976);async function n(...e){let t=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:s()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},92557:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{DatabaseShellContext:()=>b,default:()=>S,getServerSideProps:()=>A});var s=r(8732),n=r(82015),l=r.n(n),i=r(95222),c=r(20048),o=r.n(c),d=r(64098),u=r(90378),p=r.n(u),h=r(64648),y=r(67216),m=r.n(y),g=r(93342),f=r.n(g),x=e([d,h]);[d,h]=x.then?(await x)():x;let b=l().createContext({});function S({user:e,database:t,query:r,dbSchemaData:a,tables:n}){let c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Database Shell | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Database Shell"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/shell-page.css"})]}),[o,u]=l().useState(t.db_image);return(0,s.jsx)(i.A,{head:c,user:e,extraHeaderContent:(0,s.jsx)(d.A,{database:t,query:r,user:e}),aceEditor:!0,children:(0,s.jsx)(b.Provider,{value:{user:e,database:t,dbImage:o,setDbImage:u,dbSchemaData:a,tables:n},children:(0,s.jsx)(h.A,{})})})}async function A({req:e,res:t,query:r}){try{let a=await o()(e,t);if(!a?.logged_in_status||!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await m()(`SELECT * FROM user_databases WHERE user_id='${a.id}' AND db_slug='${r.single}'`);if(!s||!s[0])return{redirect:{destination:`/admin/${a?.id}/databases`,permanent:!1}};let n=await p()({queryString:"SHOW TABLES",database:s[0].db_full_name}),l=f()({userId:a.id});if(!l)throw Error("User schema data not found!");return{props:{user:a,database:s[0],query:r,dbSchemaData:l||[],tables:n&&n[0]?n.map(e=>{let t=Object.keys(e)[0];return{tableSlug:e[t]}}):[]}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}a()}catch(e){a(e)}})},9455:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9600,7070,5134],()=>r(12009));module.exports=a})(); \ No newline at end of file +${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,t,r)=>{r.d(t,{A:()=>d});var a=r(71205);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:t}){let r=[];try{for(let n=0;n",t.message),e}}var l=r(77047),i=r(71934),c=r(43651),o=r(16175);async function d({queryString:e,queryValuesArray:t,database:r,tableSchema:a,useLocal:s}){let d;let u=!!s||!!r?.match(/^datasquirel$/),h=s?o.A:u?i.A:c.A;try{d=e&&t&&Array.isArray(t)&&t[0]?u?await h(e,t):await h({paradigm:"Full Access",queryString:e,queryValues:t}):u?await h(e):await h({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,l.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(d&&a)try{let e=d;return await n({unparsedResults:e,tableSchema:a})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",r,e),(0,l.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(d)return d;else return null}},43651:(e,t,r)=>{async function a(e,t,r){try{if("string"==typeof t){let a=await e.query(s(t),r);return JSON.parse(JSON.stringify(a))}if("object"!=typeof t)return null;{let r=[];for(let a=0;an})},16175:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(9973),s=r.n(a),n=r(29021),l=r.n(n);async function i(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!l().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},40519:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{DatabaseShellContext:()=>f,default:()=>m,getServerSideProps:()=>g});var s=r(8732),n=r(82015),l=r.n(n),i=r(25562),c=r(92702),o=r(55880),d=r(52854),u=r(22338),h=r(71934),p=r(72272),y=e([o,u]);[o,u]=y.then?(await y)():y;let f=l().createContext({});function m({user:e,database:t,query:r,dbSchemaData:a,tables:n}){let c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Database Shell | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Database Shell"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/shell-page.css"})]}),[d,h]=l().useState(t.db_image);return(0,s.jsx)(i.A,{head:c,user:e,extraHeaderContent:(0,s.jsx)(o.A,{database:t,query:r,user:e}),aceEditor:!0,children:(0,s.jsx)(f.Provider,{value:{user:e,database:t,dbImage:d,setDbImage:h,dbSchemaData:a,tables:n},children:(0,s.jsx)(u.A,{})})})}async function g({req:e,res:t,query:r}){try{let a=await (0,c.default)(e,t);if(!a?.logged_in_status||!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await (0,h.A)(`SELECT * FROM user_databases WHERE user_id='${a.id}' AND db_slug='${r.single}'`);if(!s||!s[0])return{redirect:{destination:`/admin/${a?.id}/databases`,permanent:!1}};let n=await (0,d.A)({queryString:`SHOW TABLES FROM ${s[0].db_full_name}`}),l=(0,p.A)({userId:a.id});if(!l)throw Error("User schema data not found!");return{props:{user:a,database:s[0],query:r,dbSchemaData:l||[],tables:n&&n[0]?n.map(e=>{let t=Object.keys(e)[0];return{tableSlug:e[t]}}):[]}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}a()}catch(e){a(e)}})},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,5392,3634],()=>r(5375));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js.nft.json index fb19ddf..438fe1b 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/shell.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1614.js","../../../../../chunks/2414.js","../../../../../chunks/2451.js","../../../../../chunks/2996.js","../../../../../chunks/3247.js","../../../../../chunks/3460.js","../../../../../chunks/3737.js","../../../../../chunks/3932.js","../../../../../chunks/4050.js","../../../../../chunks/4312.js","../../../../../chunks/4333.js","../../../../../chunks/4385.js","../../../../../chunks/45.js","../../../../../chunks/5134.js","../../../../../chunks/5212.js","../../../../../chunks/5264.js","../../../../../chunks/5421.js","../../../../../chunks/5664.js","../../../../../chunks/5674.js","../../../../../chunks/6521.js","../../../../../chunks/7070.js","../../../../../chunks/7640.js","../../../../../chunks/8540.js","../../../../../chunks/8613.js","../../../../../chunks/883.js","../../../../../chunks/8842.js","../../../../../chunks/9600.js","../../../../../chunks/9621.js","../../../../../chunks/9732.js","../../../../../chunks/9821.js","../../../../../chunks/9914.js","../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1251.js","../../../../../chunks/1579.js","../../../../../chunks/194.js","../../../../../chunks/2282.js","../../../../../chunks/3155.js","../../../../../chunks/3474.js","../../../../../chunks/3496.js","../../../../../chunks/3634.js","../../../../../chunks/3704.js","../../../../../chunks/3791.js","../../../../../chunks/4627.js","../../../../../chunks/5392.js","../../../../../chunks/5839.js","../../../../../chunks/5954.js","../../../../../chunks/6160.js","../../../../../chunks/6202.js","../../../../../chunks/6521.js","../../../../../chunks/6622.js","../../../../../chunks/6903.js","../../../../../chunks/725.js","../../../../../chunks/7713.js","../../../../../chunks/8704.js","../../../../../chunks/8760.js","../../../../../chunks/883.js","../../../../../chunks/9796.js","../../../../../chunks/9821.js","../../../../../chunks/9901.js","../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js index 447efd7..e7f9911 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js @@ -1,8 +1,8 @@ -"use strict";(()=>{var e={};e.id=5405,e.ids=[5405],e.modules={15560:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.r(a),t.d(a,{config:()=>m,default:()=>c,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>b,reportWebVitals:()=>x,routeModule:()=>S,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>j,unstable_getStaticPaths:()=>h,unstable_getStaticProps:()=>_});var r=t(63865),l=t(9455),d=t(30671),i=t(49407),n=t(89600),o=t(65445),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,d.M)(o,"default"),b=(0,d.M)(o,"getStaticProps"),p=(0,d.M)(o,"getStaticPaths"),g=(0,d.M)(o,"getServerSideProps"),m=(0,d.M)(o,"config"),x=(0,d.M)(o,"reportWebVitals"),_=(0,d.M)(o,"unstable_getStaticProps"),h=(0,d.M)(o,"unstable_getStaticPaths"),j=(0,d.M)(o,"unstable_getStaticParams"),f=(0,d.M)(o,"unstable_getServerProps"),v=(0,d.M)(o,"unstable_getServerSideProps"),S=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables",pathname:"/admin/[user_id]/databases/[single]/tables",bundlePath:"",filename:""},components:{App:n.default,Document:i.default},userland:o});s()}catch(e){s(e)}})},34033:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(8732),r=t(82015),l=t.n(r),d=t(63715),i=t(55158),n=t(32415);function o({targetDatabase:e}){let[a,t]=l().useState(!1);return(0,s.jsxs)(i.Ay,{title:"delete-database-confirmation",children:[a&&(0,s.jsx)(n.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.db_name?e.db_name:"This Database","' database?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(a?" pointer-events-none opacity-40":""),onClick:a=>{if(!e){alert("No Target Database Selected!");return}t(!0),window.confirm("Note that you will loose all data in this database. Continue?")?(0,d.A)("/api/deleteUserDatabase",{method:"post",body:e},!0).then(e=>{e.success&&window.location.reload()}):t(!1)},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},73972:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(8732),r=t(82015),l=t.n(r),d=t(63715);t(58548);var i=t(55158),n=t(32415);function o({targetTable:e,database:a}){let[t,r]=l().useState(!1);return(0,s.jsxs)(i.Ay,{title:"delete-table-confirmation",children:[t&&(0,s.jsx)(n.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(t?" pointer-events-none opacity-40":""),onClick:t=>{r(!0),(0,d.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},80558:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>x});var r=t(8732),l=t(82015),d=t.n(l),i=t(65445),n=t(46437),o=t(58548),u=t(94010),c=t(59621),b=t(48241),p=t(62506),g=t(86571),m=e([i,u,c,b]);function x(e){let{tables:a,setTargetTable:t,database:s,query:l,confirmedDelegetedUser:m,user:x}=d().useContext(i.TablesContext),_=m?.delegated;m?.priviledges?.match(/Edit Tables/i),m?.priviledges?.match(/Delete Tables/i);let h=m?.priviledges?.match(/Create Tables/i),{active_clone:j,active_clone_parent_db:f,remote_connected:v}=s;return(0,r.jsxs)(d().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-2 w-full",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap gap-6",children:[(0,r.jsxs)("div",{className:"flex-wrap",children:[(0,r.jsx)(n.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0 flex flex-wrap gap-2",children:[(0,r.jsx)("span",{className:"inline",children:"All Tables in"}),(0,r.jsx)("span",{className:"inline relative",children:(0,r.jsxs)("a",{href:`/admin/${x?.id}/databases/${s.db_slug}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-600 text-primary hover:text-primary_dark relative inline",onClick:e=>{e.target.closest(".copy-slug-span")&&e.preventDefault()},style:{wordBreak:"break-all"},children:[s.db_name,(0,r.jsx)("div",{className:"absolute -top-4 -right-4",children:(0,r.jsx)(u.A,{slugText:s.db_slug,justIcon:!0})})]})})]})]}),(0,r.jsx)("div",{className:"w-full md:w-auto",children:(0,r.jsxs)(p.A,{children:[(!_||_&&h)&&!f&&!v&&(0,r.jsxs)("a",{href:`/admin/${x?.id}/databases/${s.db_slug}/tables/add-table`,className:"button flex items-center gap-2 w-full",children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Table"})]}),!_&&(0,r.jsx)("a",{href:`/admin/${x?.id}/databases/${s.db_slug}/users`,className:"button dark",children:"Users"})]})})]}),(0,r.jsx)(o.A,{confirmedDelegetedUser:l?.delegated,user:x})]}),s.active_clone?(0,r.jsx)(g.A,{database:s,user:x}):(0,r.jsx)(r.Fragment,{}),s.remote_connected?(0,r.jsx)(c.p,{database:s}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)(b.A,{database:s,tables:a,setTargetTable:t,confirmedDelegetedUser:m,query:l,user:x})]})}[i,u,c,b]=m.then?(await m)():m,s()}catch(e){s(e)}})},31651:(e,a,t)=>{t(81630);let s=t(77463);e.exports=async function({request:e,databaseSlug:a,user:t,query:r}){try{let l=t.id,d=null;if(!r?.delegated)return{dbUserId:l};let i=r.dbUserId,n=`${process.env.DSQL_USER_DB_PREFIX}${i}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${n}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[o]});if(!t)throw Error("Invalid Token");if((d=JSON.parse(t)).databaseSlug===a)return{dbUserId:l=d.rootUserId,rootUserId:d.rootUserId,rootUserName:d.rootUserName,rootUserEmail:d.rootUserEmail,rootUserImage:d.rootUserImage,databaseFullName:d.databaseFullName,databaseSlug:d.databaseSlug,allowedTables:d.allowedTables,priviledges:d.priviledges,database:d.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},65445:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.r(a),t.d(a,{TablesContext:()=>v,default:()=>j,getServerSideProps:()=>f});var r=t(8732),l=t(82015),d=t.n(l),i=t(20048),n=t.n(i),o=t(95222),u=t(34033),c=t(80558),b=t(73972),p=t(64098),g=t(31651),m=t.n(g),x=t(67216),_=t.n(x),h=e([c,p]);[c,p]=h.then?(await h)():h;let v=d().createContext({});function j({user:e,database:a,tables:t,query:s,confirmedDelegetedUser:l}){let i=`Tables For ${a.db_name} Database | Datasquirel`,n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:i}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[g,m]=d().useState(null);return(0,r.jsx)(v.Provider,{value:{user:e,database:a,tables:t,targetTable:g,setTargetTable:m,query:s,confirmedDelegetedUser:l},children:(0,r.jsxs)(d().Fragment,{children:[(0,r.jsx)(o.A,{head:n,user:e,extraHeaderContent:(0,r.jsx)(p.A,{database:a,query:s,confirmedDelegetedUser:l,user:e}),children:(0,r.jsx)(c.A,{})}),(0,r.jsx)(u.A,{targetDatabase:a}),(0,r.jsx)(b.A,{database:a,targetTable:g})]})})}async function f({req:e,res:a,query:t}){let s=await n()(e,a);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await m()({request:e,user:s,databaseSlug:t.single?.toString()||"",query:t});if(!r)return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let{dbUserId:l,rootUserId:d}=r,i=await _()(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${t.single}'`);if(!i||!i[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let o=d?await _()(` +"use strict";(()=>{var e={};e.id=5405,e.ids=[5405],e.modules={24454:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.r(a),t.d(a,{config:()=>m,default:()=>c,getServerSideProps:()=>p,getStaticPaths:()=>g,getStaticProps:()=>b,reportWebVitals:()=>x,routeModule:()=>v,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>j,unstable_getStaticPaths:()=>h,unstable_getStaticProps:()=>_});var r=t(63865),l=t(9455),d=t(30671),i=t(5583),n=t(19796),o=t(35503),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,d.M)(o,"default"),b=(0,d.M)(o,"getStaticProps"),g=(0,d.M)(o,"getStaticPaths"),p=(0,d.M)(o,"getServerSideProps"),m=(0,d.M)(o,"config"),x=(0,d.M)(o,"reportWebVitals"),_=(0,d.M)(o,"unstable_getStaticProps"),h=(0,d.M)(o,"unstable_getStaticPaths"),j=(0,d.M)(o,"unstable_getStaticParams"),f=(0,d.M)(o,"unstable_getServerProps"),S=(0,d.M)(o,"unstable_getServerSideProps"),v=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables",pathname:"/admin/[user_id]/databases/[single]/tables",bundlePath:"",filename:""},components:{App:n.default,Document:i.default},userland:o});s()}catch(e){s(e)}})},70355:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(8732),r=t(82015),l=t.n(r),d=t(46169),i=t(91140),n=t(16757);function o({targetDatabase:e}){let[a,t]=l().useState(!1);return(0,s.jsxs)(i.Ay,{title:"delete-database-confirmation",children:[a&&(0,s.jsx)(n.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.db_name?e.db_name:"This Database","' database?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(a?" pointer-events-none opacity-40":""),onClick:a=>{if(!e){alert("No Target Database Selected!");return}t(!0),window.confirm("Note that you will loose all data in this database. Continue?")?(0,d.A)("/api/deleteUserDatabase",{method:"post",body:e},!0).then(e=>{e.success&&window.location.reload()}):t(!1)},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},57414:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(8732),r=t(82015),l=t.n(r),d=t(46169),i=t(91140),n=t(16757);function o({targetTable:e,database:a}){let[t,r]=l().useState(!1);return(0,s.jsxs)(i.Ay,{title:"delete-table-confirmation",children:[t&&(0,s.jsx)(n.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(t?" pointer-events-none opacity-40":""),onClick:t=>{r(!0),(0,d.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},36940:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.d(a,{A:()=>x});var r=t(8732),l=t(82015),d=t.n(l),i=t(35503),n=t(59023),o=t(53926),u=t(73872),c=t(23791),b=t(6803),g=t(55904),p=t(537),m=e([i,u,c,b]);function x(){let{tables:e,setTargetTable:a,database:t,query:s,confirmedDelegetedUser:l,user:m}=d().useContext(i.TablesContext),x=l?.delegated;l?.priviledges?.match(/Edit Tables/i),l?.priviledges?.match(/Delete Tables/i);let _=l?.priviledges?.match(/Create Tables/i),{active_clone:h,active_clone_parent_db:j,remote_connected:f}=t;return(0,r.jsxs)(d().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-2 w-full",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap gap-6",children:[(0,r.jsxs)("div",{className:"flex-wrap",children:[(0,r.jsx)(n.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0 flex flex-wrap gap-2",children:[(0,r.jsx)("span",{className:"inline",children:"All Tables in"}),(0,r.jsx)("span",{className:"inline relative",children:(0,r.jsxs)("a",{href:`/admin/${m?.id}/databases/${t.db_slug}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-600 text-primary hover:text-primary_dark relative inline",onClick:e=>{e.target.closest(".copy-slug-span")&&e.preventDefault()},style:{wordBreak:"break-all"},children:[t.db_name,(0,r.jsx)("div",{className:"absolute -top-4 -right-4",children:(0,r.jsx)(u.A,{slugText:t.db_slug,justIcon:!0})})]})})]})]}),(0,r.jsx)("div",{className:"w-full md:w-auto",children:(0,r.jsxs)(g.A,{children:[(!x||x&&_)&&!j&&!f&&(0,r.jsxs)("a",{href:`/admin/${m?.id}/databases/${t.db_slug}/tables/add-table`,className:"button flex items-center gap-2 w-full",children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Table"})]}),!x&&(0,r.jsx)("a",{href:`/admin/${m?.id}/databases/${t.db_slug}/users`,className:"button dark",children:"Users"})]})})]}),(0,r.jsx)(o.A,{confirmedDelegetedUser:s?.delegated,user:m})]}),t.active_clone?(0,r.jsx)(p.A,{database:t,user:m}):(0,r.jsx)(r.Fragment,{}),t.remote_connected?(0,r.jsx)(c.p,{database:t}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)(b.A,{database:t,tables:e,setTargetTable:a,confirmedDelegetedUser:l,query:s,user:m})]})}[i,u,c,b]=m.then?(await m)():m,s()}catch(e){s(e)}})},22873:(e,a,t)=>{t.d(a,{A:()=>r});var s=t(71205);async function r({request:e,databaseSlug:a,user:t,query:r}){try{let l=t.id,d=null;if(!r?.delegated)return{dbUserId:l};let i=r.dbUserId,n=`${process.env.DSQL_USER_DB_PREFIX}${i}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${n}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let t=(0,s.A)({encryptedString:e.cookies[o]});if(!t)throw Error("Invalid Token");if((d=JSON.parse(t)).databaseSlug===a)return{dbUserId:l=d.rootUserId,rootUserId:d.rootUserId,rootUserName:d.rootUserName,rootUserEmail:d.rootUserEmail,rootUserImage:d.rootUserImage,databaseFullName:d.databaseFullName,databaseSlug:d.databaseSlug,allowedTables:d.allowedTables,priviledges:d.priviledges,database:d.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},35503:(e,a,t)=>{t.a(e,async(e,s)=>{try{t.r(a),t.d(a,{TablesContext:()=>h,default:()=>x,getServerSideProps:()=>_});var r=t(8732),l=t(82015),d=t.n(l),i=t(92702),n=t(25562),o=t(70355),u=t(36940),c=t(57414),b=t(55880),g=t(22873),p=t(71934),m=e([u,b]);[u,b]=m.then?(await m)():m;let h=d().createContext({});function x({user:e,database:a,tables:t,query:s,confirmedDelegetedUser:l}){let i=`Tables For ${a.db_name} Database | Datasquirel`,g=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:i}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[p,m]=d().useState(null);return(0,r.jsx)(h.Provider,{value:{user:e,database:a,tables:t,targetTable:p,setTargetTable:m,query:s,confirmedDelegetedUser:l},children:(0,r.jsxs)(d().Fragment,{children:[(0,r.jsx)(n.A,{head:g,user:e,extraHeaderContent:(0,r.jsx)(b.A,{database:a,query:s,confirmedDelegetedUser:l,user:e}),children:(0,r.jsx)(u.A,{})}),(0,r.jsx)(o.A,{targetDatabase:a}),(0,r.jsx)(c.A,{database:a,targetTable:p})]})})}async function _({req:e,res:a,query:t}){let s=await (0,i.default)(e,a);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,g.A)({request:e,user:s,databaseSlug:t.single?.toString()||"",query:t});if(!r)return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let{dbUserId:l,rootUserId:d}=r,n=await (0,p.A)(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${t.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let o=d?await (0,p.A)(` SELECT delegated_user_tables.database,delegated_user_tables.table,user_database_tables.* FROM delegated_user_tables INNER JOIN user_database_tables ON delegated_user_tables.root_user_id=user_database_tables.user_id AND delegated_user_tables.table=user_database_tables.table_slug AND delegated_user_tables.database=user_database_tables.db_slug WHERE - delegated_user_tables.delegated_user_id='${s.id}' AND delegated_user_tables.root_user_id='${d}' AND delegated_user_tables.database='${i[0].db_slug}' - `):await _()(`SELECT * FROM user_database_tables WHERE user_id='${s.id}' AND db_id='${i[0].id}'`);return o&&o[0]?{props:{user:s,database:i[0],tables:o,query:t,confirmedDelegetedUser:r}}:{redirect:{destination:`/admin/${s?.id}/databases/${i[0].db_slug}`,permanent:!1}}}s()}catch(e){s(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),s=a.X(0,[883,9821,6521,9600,7070,5134,9621],()=>t(15560));module.exports=s})(); \ No newline at end of file + delegated_user_tables.delegated_user_id='${s.id}' AND delegated_user_tables.root_user_id='${d}' AND delegated_user_tables.database='${n[0].db_slug}' + `):await (0,p.A)(`SELECT * FROM user_database_tables WHERE user_id='${s.id}' AND db_id='${n[0].id}'`);return o&&o[0]?{props:{user:s,database:n[0],tables:o,query:t,confirmedDelegetedUser:r}}:{redirect:{destination:`/admin/${s?.id}/databases/${n[0].db_slug}`,permanent:!1}}}s()}catch(e){s(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),s=a.X(0,[883,9821,6521,9796,5392,3634,3791],()=>t(24454));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js.nft.json index 96dcfb5..5719a32 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1614.js","../../../../../chunks/2414.js","../../../../../chunks/2451.js","../../../../../chunks/2996.js","../../../../../chunks/3247.js","../../../../../chunks/3460.js","../../../../../chunks/3737.js","../../../../../chunks/3932.js","../../../../../chunks/4050.js","../../../../../chunks/4312.js","../../../../../chunks/4333.js","../../../../../chunks/4385.js","../../../../../chunks/45.js","../../../../../chunks/5134.js","../../../../../chunks/5212.js","../../../../../chunks/5264.js","../../../../../chunks/5421.js","../../../../../chunks/5664.js","../../../../../chunks/5674.js","../../../../../chunks/6521.js","../../../../../chunks/7070.js","../../../../../chunks/7640.js","../../../../../chunks/8540.js","../../../../../chunks/8613.js","../../../../../chunks/883.js","../../../../../chunks/8842.js","../../../../../chunks/9600.js","../../../../../chunks/9621.js","../../../../../chunks/9732.js","../../../../../chunks/9821.js","../../../../../chunks/9914.js","../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1251.js","../../../../../chunks/1579.js","../../../../../chunks/194.js","../../../../../chunks/2282.js","../../../../../chunks/3155.js","../../../../../chunks/3474.js","../../../../../chunks/3496.js","../../../../../chunks/3634.js","../../../../../chunks/3704.js","../../../../../chunks/3791.js","../../../../../chunks/4627.js","../../../../../chunks/5392.js","../../../../../chunks/5839.js","../../../../../chunks/5954.js","../../../../../chunks/6160.js","../../../../../chunks/6202.js","../../../../../chunks/6521.js","../../../../../chunks/6622.js","../../../../../chunks/6903.js","../../../../../chunks/725.js","../../../../../chunks/7713.js","../../../../../chunks/8704.js","../../../../../chunks/8760.js","../../../../../chunks/883.js","../../../../../chunks/9796.js","../../../../../chunks/9821.js","../../../../../chunks/9901.js","../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js index f027726..c273145 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5271,e.ids=[5271],e.modules={91312:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{config:()=>f,default:()=>u,getServerSideProps:()=>p,getStaticPaths:()=>m,getStaticProps:()=>x,reportWebVitals:()=>h,routeModule:()=>y,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>w,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>b});var s=t(63865),r=t(9455),n=t(30671),i=t(49407),d=t(89600),c=t(13699),o=e([c]);c=(o.then?(await o)():o)[0];let u=(0,n.M)(c,"default"),x=(0,n.M)(c,"getStaticProps"),m=(0,n.M)(c,"getStaticPaths"),p=(0,n.M)(c,"getServerSideProps"),f=(0,n.M)(c,"config"),h=(0,n.M)(c,"reportWebVitals"),b=(0,n.M)(c,"unstable_getStaticProps"),g=(0,n.M)(c,"unstable_getStaticPaths"),w=(0,n.M)(c,"unstable_getStaticParams"),j=(0,n.M)(c,"unstable_getServerProps"),v=(0,n.M)(c,"unstable_getServerSideProps"),y=new s.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:c});l()}catch(e){l(e)}})},73972:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(8732),s=t(82015),r=t.n(s),n=t(63715);t(58548);var i=t(55158),d=t(32415);function c({targetTable:e,database:a}){let[t,s]=r().useState(!1);return(0,l.jsxs)(i.Ay,{title:"delete-table-confirmation",children:[t&&(0,l.jsx)(d.A,{width:"20px"}),(0,l.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("button",{className:"outlined"+(t?" pointer-events-none opacity-40":""),onClick:t=>{s(!0),(0,n.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,l.jsx)("span",{children:"Yes"})}),(0,l.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,l.jsx)("span",{children:"Cancel"})})]})]})}},68153:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.d(a,{A:()=>v});var s=t(8732),r=t(82015),n=t.n(r),i=t(63715),d=t(13699),c=t(46437),o=t(58548),u=t(94010),x=t(32415),m=t(34486),p=t(77802),f=t(59550),h=t(62506),b=t(86571),g=t(65241),w=t(59621),j=e([d,u,m,w]);function v(e){let{user:a,database:l,table:r,tableRecord:j,dbSchemaData:v,targetField:y,setTargetField:N,refreshFieldsListRef:_,setTableFields:T,tableFields:S,tableIndexes:F,setTableIndexes:A,updateTableAfterFieldsUpdateFunction:C,entries:E,targetEntry:I,setTargetEntry:q,richTextEditors:D,jsonTextEditors:$,query:k,confirmedDelegetedUser:P,entriesCount:R}=n().useContext(d.SingleTableContext);if(!l||!a||!j||!r)return;let U=t(94327),M=P?.delegated,L=P?.priviledges?.match(/Edit Tables/i),O=P?.priviledges?.match(/Delete Tables/i);P?.priviledges?.match(/Create Tables/i);let{active_clone:W,active_clone_parent_db:B,remote_connected:H}=l,V=`dsql${a.id}${l.id}${j.id}`,[X,z]=n().useState(!1);return(0,s.jsxs)(n().Fragment,{children:[X&&(0,s.jsx)(x.A,{}),(0,s.jsxs)("div",{className:"flex-col items-start gap-4 xl:gap-0 w-full relative z-50",children:[(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-wrap",children:[(0,s.jsx)(c.A,{}),(0,s.jsx)("h1",{className:"text-3xl m-0",children:(0,s.jsxs)("span",{children:[r.tableFullName.replace(/ table/i,"")," ","Table"]})}),(0,s.jsx)(u.A,{slugText:r.tableName,outlined:!0})]}),(0,s.jsx)("div",{className:"flex-wrap flex-col md:flex-row w-full md:w-auto items-stretch md:items-center",children:(0,s.jsxs)(h.A,{children:[(0,s.jsxs)("a",{href:`/admin/${a?.id}/databases/${l.db_slug}/tables/${r.tableName}/entries/add-entry`,className:"button flex items-center gap-2",children:[(0,s.jsx)("span",{className:"symbol",children:"+"}),(0,s.jsx)("span",{children:"Add New Table Entry"})]}),(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${l.db_slug}/tables/${r.tableName}/entries`,className:"button secondary flex items-center gap-2",children:(0,s.jsx)("span",{children:"Entries"})}),(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${l.db_slug}/tables/${r.tableName}/fields`,className:"button outlined secondary flex items-center gap-2",children:(0,s.jsx)("span",{children:"All Fields"})}),(!M||M&&(L||O))&&!B&&!H&&(0,s.jsxs)("div",{className:"dropdown-wrapper mt-4 xl:mt-0",children:[(0,s.jsx)("span",{className:"hidden xl:flex button outlined gray",children:"More"}),(0,s.jsx)("div",{className:"dropdown mobile-transform right-aligned mt-0 xl:-mt-2 gap-2",children:(0,s.jsxs)(h.A,{column:!0,className:"w-full",children:[(!M||M&&L)&&!B&&!H&&(0,s.jsx)("a",{className:"button outlined-gray more-padding w-full",href:`/admin/${a?.id}/databases/${l.db_slug}/tables/${r.tableName}/edit-table`,children:"Edit Table"}),(!M||M&&O)&&!B&&!H&&(0,s.jsx)("button",{className:"outlined-gray more-padding w-full",onClick:e=>{window.confirm(`Delete "${r.tableFullName}" table?`)&&(z(!0),(0,i.A)("/api/deleteUserTable",{method:"post",body:{database:l,table:{table_slug:r.tableName}}},!0).then(e=>{e.success&&window.location.reload()}))},children:"Delete Table"})]})})]})]})})]}),(0,s.jsx)(o.A,{confirmedDelegetedUser:k?.delegated,user:a})]}),l.active_clone?(0,s.jsx)(b.A,{database:l,user:a}):(0,s.jsx)(s.Fragment,{}),l.remote_connected?(0,s.jsx)(w.p,{database:l}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(g.A,{table:r,database:l,user:a}),(0,s.jsx)(p.A,{user:a,tableFields:S,setTableFields:T,setTargetField:N,refreshFieldsListRef:_,updateTable:!0,updateTableAfterFieldsUpdateFunction:C,collapsed:!0,database:l,table:r,confirmedDelegetedUser:P,query:k}),(0,s.jsx)(f.A,{user:a,table:r,tableUniqueId:V,tableIndexes:F,setTableIndexes:A,database:l,tableFields:S,updateTableAfterFieldsUpdateFunction:C,confirmedDelegetedUser:P}),E&&v&&D&&$&&(0,s.jsx)(m.A,{user:a,entries:E,database:l,table:r,setTargetEntry:q,dbSchemaData:v,richTextEditors:D,dataTypes:U,title:"Entries",query:k,confirmedDelegetedUser:P,jsonTextEditors:$,entriesCount:R})]})}[d,u,m,w]=j.then?(await j)():j,l()}catch(e){l(e)}})},59550:(e,a,t)=>{t.d(a,{A:()=>b});var l=t(8732),s=t(82015),r=t.n(s);function n({tableIndexes:e,setTableIndexes:a,setRefresh:t,setPageRefresh:l}){let s=e&&e[0]?e:[];s.push({newTempIndex:!0}),a(s),t&&t(e=>e+1)}var i=t(32415),d=t(63715),c=t(27825),o=t.n(c);function u({tableIndex:e,fieldIndex:a,currentTable:t,tableFields:s,tableIndexes:n,setTableIndexes:i,setRefresh:c,user:u,tableUniqueId:x}){let[m,p]=r().useState("regular"),[f,h]=r().useState(0),b=r().useRef();return(0,l.jsx)("div",{className:"w-full mt-1 xl:flex-nowrap flex-wrap",ref:b,children:(0,l.jsxs)("form",{className:"flex flex-row items-start gap-4 w-full justify-between border border-solid p-4 pt-6 border-slate-400 rounded focus:shadow-lg shadow-slate-700/40 relative flex-wrap xl:flex-nowrap shadow-xl",onSubmit:e=>{e.preventDefault();let t=e.target.new_index_name.value.replace(/_index/,"").replace(/_{1,}$/,"")+"_index";if(!f||!f[0]){alert("Please Select at least 1 table column name");return}!function({fieldIndex:e,setTableIndexes:a,setRefresh:t,payload:l}){a(a=>(a.splice(e,1,l),a)),t&&t(e=>e+1)}({fieldIndex:a,setTableIndexes:i,payload:{indexType:m,indexName:t,indexTableFields:f,alias:x+"_"+t},setRefresh:c})},children:[(0,l.jsx)("span",{className:"absolute -top-2 text-sm bg-fuchsia-600 text-white px-2 rounded-full",children:"New Index"}),(0,l.jsxs)("div",{className:"gap-4 flex-wrap xl:flex-nowrap flex-col xl:flex-row items-stretch w-full",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Type"}),(0,l.jsx)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",onChange:e=>{p(e.target.value)},children:m?.match(/regular/i)?(0,l.jsx)("option",{value:"regular",children:"Default"}):(0,l.jsx)("option",{value:"fullText",children:"Full Text"})})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_index_name",children:"Index Name"}),(0,l.jsx)("input",{type:"text",name:"new_index_name",id:"new_index_name",placeholder:"Eg. title_index",onInput:async e=>{let a=e.target;a.value=a.value.toLowerCase().replace(/ /g,"_")},required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"items-start",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Table Column(s)"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start gap-2",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:"Select Columns to be indexed. NB the order matters"})})]})]}),(0,l.jsxs)("div",{className:"w-auto flex flex-row items-stretch gap-4",children:[(0,l.jsxs)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl:w-auto",onChange:e=>{if(e.target.value.match(/--/))return;let a=Array.from(e.target.options).filter(a=>a.value===e.target.value)[0].dataset.type;if(a?.match(/text/i))p("fullText"),h([{value:e.target.value,dataType:a}]);else{try{if(f.filter(e=>e.dataType.match(/text/i))[0])throw Error("TEXT type exists");if(f.findIndex(a=>a.value===e.target.value)>=0||e.target.value.match(/^--$/))return;a?(f.push({value:e.target.value,dataType:a}),h([...f])):window.alert("Datatype not provided. Please recheck fields.")}catch(t){(0,d.A)("/api/admin/clientError",{method:"post",body:{component:"NewIndexFieldTemp/lines-177-190",message:t.message,user:u}}),a?h([{value:e.target.value,dataType:a}]):window.alert("Couldn't set Index Fields")}p("regular")}},children:[(0,l.jsx)("option",{value:"--",children:"--"}),s.filter(e=>!e?.fieldName?.match(/^id$|^date_/)&&!e.foreignKey).map((e,a)=>(0,l.jsx)("option",{value:e.fieldName,"data-type":e.dataType,children:e.fieldName},a+1))]}),f&&f[0]&&(0,l.jsx)("div",{className:"px-3 py-1 bg-slate-100 dark:bg-slate-500/10 rounded",children:f.map((e,a)=>(0,l.jsxs)("span",{className:"text-sm px-3 py-1 bg-white dark:bg-slate-700 rounded-full shadow-lg font-bold flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{children:e.value}),(0,l.jsx)("span",{className:"font-normal w-5 h-5 rounded-full flex items-center justify-center cursor-pointer bg-slate-200 dark:bg-slate-600 text-xs hover:bg-slate-400",onClick:a=>{h([...f.filter(a=>!a.value.match(RegExp(`^${o().escapeRegExp(e.value)}$`)))])},children:"✖"})]},a+1))})]})]})]}),(0,l.jsxs)("div",{className:"secondary mt-auto flex-wrap xl:flex-nowrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full sm:w-auto justify-center grow",children:"Add Index"}),(0,l.jsx)("div",{className:"button outlined gray mt-auto py-2.5 w-full sm:w-auto justify-center grow",onClick:e=>{i(e=>e.filter((e,t)=>t!=a))},children:"Cancel"})]})]})})}var x=t(64030);function m({targetIndexObject:e,fieldIndex:a,tableFields:t,refreshFieldsListRef:s,setTableIndexes:n,setRefresh:i,setActiveEdit:c,user:u,tableUniqueId:x}){let[m,p]=r().useState(e),[f,h]=r().useState(m.indexType||"regular"),[b,g]=r().useState(m.indexTableFields?[...m.indexTableFields]:[]),w=r().useRef();return(0,l.jsx)("div",{className:"w-full -mt-3 flex-wrap",ref:w,children:(0,l.jsxs)("form",{className:"flex flex-col xl:flex-row items-start gap-4 w-full justify-between p-4 relative xl:flex-nowrap flex-wrap border border-t-0 border-slate-200 dark:border-slate-600 border-solid rounded-b",onSubmit:e=>{e.preventDefault();let t=e.target.new_index_name.value.replace(/_index/,"").replace(/_{1,}$/,"")+"_index";m.indexName=t,m.alias=x+"_"+t,m.indexTableFields=b,n(e=>(e[a]=m,e)),c(!1),i(e=>e+1)},children:[(0,l.jsxs)("div",{className:"gap-4 xl:flex-nowrap flex-wrap flex-col xl:flex-row items-stretch w-full",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Type"}),(0,l.jsx)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",onChange:e=>{h(e.target.value),p(a=>(a.indexType=e.target.value,a))},defaultValue:f,children:f?.match(/regular/i)?(0,l.jsx)("option",{value:"regular",children:"Default"}):(0,l.jsx)("option",{value:"fullText",children:"Full Text"})})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_index_name",children:"Index Name"}),(0,l.jsx)("input",{type:"text",name:"new_index_name",id:"new_index_name",placeholder:"Eg. title_index",onInput:async e=>{let a=e.target;a.value=a.value.toLowerCase().replace(/ /g,"_")},required:!0,defaultValue:m.indexName})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"items-start",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Table Column(s)"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start gap-2",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:"Select Columns to be indexed. NB the order matters"})})]})]}),(0,l.jsxs)("div",{className:"w-auto flex flex-row items-stretch gap-4",children:[(0,l.jsxs)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl:w-auto",onChange:e=>{!function({e,indexTableFields:a,setIndexTableFields:t,setIndexType:l,user:s}){if(e.target.value.match(/--/))return;let r=Array.from(e.target.options).filter(a=>a.value===e.target.value)[0].dataset.type;if(r.match(/text/i))l("fullText"),t([{value:e.target.value,dataType:r}]);else{try{if(a.filter(e=>e.dataType.match(/text/i))[0])throw Error("TEXT type exists");if(a.findIndex(a=>a.value===e.target.value)>=0||e.target.value.match(/^--$/))return;a.push({value:e.target.value,dataType:r}),t([...a])}catch(a){(0,d.A)("/api/admin/clientError",{method:"post",body:{component:"ExistingIndexEdit/lines-184-197",message:a.message,user:s}}),t([{value:e.target.value,dataType:r}])}l("regular")}}({e,indexTableFields:b,setIndexTableFields:g,setIndexType:h,user:u})},children:[(0,l.jsx)("option",{value:"--",children:"--"}),t.filter(e=>!e?.fieldName?.match(/^id$|^date_/)&&!e.foreignKey).map((e,a)=>(0,l.jsx)("option",{value:e.fieldName,"data-type":e.dataType,children:e.fieldName},a+1))]}),b&&b[0]&&(0,l.jsx)("div",{className:"card no-hover px-3 py-1 items-center",children:b.map((e,a)=>(0,l.jsxs)("span",{className:"text-sm px-3 py-1 bg-white dark:bg-slate-700 rounded-full shadow-lg font-bold flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{children:e.value}),(0,l.jsx)("span",{className:"font-normal w-5 h-5 rounded-full flex items-center justify-center cursor-pointer bg-slate-200 text-xs hover:bg-slate-400",onClick:a=>{g([...b.filter(a=>!a.value.match(RegExp(`^${o().escapeRegExp(e.value)}$`)))])},children:"✖"})]},a+1))})]})]})]}),(0,l.jsxs)("div",{className:"secondary mt-auto xl:flex-nowrap flex-wrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full md:w-auto grow",children:"Save Updates"}),(0,l.jsx)("div",{className:"button outlined gray mt-auto py-2.5 w-full md:w-auto justify-center grow",onClick:e=>{c(!1)},children:"Cancel"})]})]})})}var p=t(62506);function f({tableIndex:e,fieldIndex:a,tableIndexes:t,setTableIndexes:s,refreshFieldsListRef:n,database:i,currentTable:d,tableFields:c,setRefresh:o,confirmedDelegetedUser:u,user:f,tableUniqueId:h}){let b=u?.delegated,g=u?.priviledges?.match(/Edit Tables/i);u?.priviledges?.match(/Delete Tables/i),u?.priviledges?.match(/Create Tables/i);let{active_clone:w,active_clone_parent_db:j,remote_connected:v}=i,[y,N]=r().useState(e),[_,T]=r().useState(!1),[S,F]=r().useState(0);return(0,l.jsxs)("div",{className:"flex-col w-full"+(_?" shadow-xl shadow-slate-300/40 dark:shadow-black/30 relative z-50":""),children:[(0,l.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(_?" rounded-t":" rounded")+(y.indexName?.match(x.A)?" text-slate-400 pointer-events-none border-slate-200 border":""),onClick:e=>{},children:[(0,l.jsx)("span",{className:"font-bold dark:text-white",children:y.indexName}),!y.indexName?.match(x.A)&&!j&&!v&&(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(!b||b&&g)&&(0,l.jsx)(r().Fragment,{children:(0,l.jsx)(p.A,{children:(0,l.jsx)("div",{className:"button outlined gray smallest",onClick:t=>{window.confirm(`Delete "${e.indexName}"?`)&&s(e=>e.filter((e,t)=>t!=a))},style:{color:"var(--slate-500)"},children:"Delete"})})})})]}),_&&(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(m,{fieldIndex:a,setTableIndexes:s,refreshFieldsListRef:n,setActiveEdit:T,tableFields:c,targetIndexObject:y,setRefresh:o,user:f,tableUniqueId:h})})]})}let h=1;function b({user:e,table:a,tableUniqueId:t,tableIndexes:s,setTableIndexes:d,tableFields:c,updateTableAfterFieldsUpdateFunction:o,confirmedDelegetedUser:x,database:m}){a.indexes;let p=x?.delegated,b=x?.priviledges?.match(/Edit Tables/i);x?.priviledges?.match(/Delete Tables/i),x?.priviledges?.match(/Create Tables/i);let{active_clone:g,active_clone_parent_db:w,remote_connected:j}=m,[v,y]=r().useState(0),[N,_]=r().useState(!1),[T,S]=r().useState(!1);return p&&!b?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)("section",{className:"paper blue",children:[N&&(0,l.jsx)(i.A,{}),a.childTable?(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Indexes"}),(0,l.jsx)("span",{children:"Table indexes are inherited from parent table"}),s&&s[0]&&s.map((e,a)=>(0,l.jsxs)("div",{className:"card w-full light-gray py-4 no-hover items-center",children:[(0,l.jsx)("b",{children:e.indexName}),(0,l.jsxs)("span",{className:"info small gray grow-0 ml-auto w-auto",children:[e.indexType," index"]})]},a))]}):(0,l.jsxs)(r().Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Indexes"}),(!p||p&&b)&&!w&&!j&&(0,l.jsxs)("div",{className:"button secondary outlined flex items-center gap-2",onClick:e=>{T&&S(!1),n({tableIndexes:s,setTableIndexes:d,setRefresh:y})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Index"})]})]}),(0,l.jsxs)("div",{className:"flex-col w-full",style:T?{maxHeight:"200px"}:{},children:[s&&s[0]&&s.map((r,n)=>(h++,r.newTempIndex)?(0,l.jsx)(u,{fieldIndex:n,tableIndex:r,currentTable:a,tableIndexes:s,setTableIndexes:d,tableFields:c,setRefresh:y,user:e,tableUniqueId:t},h):(0,l.jsx)(f,{fieldIndex:n,tableIndex:r,database:m,currentTable:a,tableIndexes:s,setTableIndexes:d,tableFields:c,setRefresh:y,confirmedDelegetedUser:x,user:e,tableUniqueId:t},h)),(!p||p&&b)&&!w&&!j&&(0,l.jsxs)(r().Fragment,{children:[(0,l.jsxs)("div",{className:"button outlined gray w-full justify-center more-padding",style:{borderStyle:"dashed"},onClick:e=>{n({tableIndexes:s,setTableIndexes:d,setRefresh:y})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Index"})]}),(0,l.jsx)("div",{className:"button w-full blue",onClick:e=>{_(!0),o&&o(_)},children:(0,l.jsx)("span",{children:"Update Table Indexes"})})]})]})]})]})}},92728:(e,a,t)=>{t.d(a,{A:()=>m}),t(81630);var l=t(22373),s=t.n(l),r=t(67216),n=t.n(r),i=t(31651),d=t.n(i),c=t(93342),o=t.n(c),u=t(90378),x=t.n(u);async function m({req:e,user:a,query:t}){try{let l=await d()({request:e,user:a,databaseSlug:t.single,query:t});if(!l)return null;let{dbUserId:s}=l,r=await n()(`SELECT * FROM user_databases WHERE user_id='${s}' AND db_slug='${t.single}'`);if(!r?.[0])return null;let i=o()({userId:s});if(!i)throw Error("DB Schema not found!");let c=i.filter(e=>e.dbFullName===r[0].db_full_name)[0]?.tables,u=c?.filter(e=>e.tableName===t.single_table)[0],m=await n()(`SELECT * FROM user_database_tables WHERE user_id='${s}' AND db_id='${r[0].id}' AND table_slug='${t.single_table}'`),p=await x()({database:r[0].db_full_name,queryString:`SELECT * FROM ${u?.tableName} ORDER BY id DESC LIMIT 10`,tableSchema:u}),f=await x()({database:r[0].db_full_name,queryString:`SELECT COUNT(id) AS count FROM ${u?.tableName}`,tableSchema:u});if(l.rootUserId){let e=i.filter(e=>e.dbFullName==r[0].db_full_name)[0],a=e.tables.filter(e=>e.tableName===u?.tableName);e.tables=a,i=[e]}return{confirmedDelegetedUser:l||null,database:r[0]||null,dbSchemaData:i||null,entries:p||null,entriesCount:f?.[0]?.count||0,query:t,table:u,tableRecord:m[0]||{}}}catch(e){return s()({component:"[single_table]/index-page-component/getServerSideProps/catch-error]",message:e.message,user:a}),{}}}},94933:(e,a,t)=>{t.d(a,{A:()=>r});var l=t(27825),s=t(63715);function r({query:e,table:a,database:t,dbSchemaData:r,tableFields:n,tableIndexes:i,setLoading:d}){let c=[...r];try{let r=c.findIndex(e=>e.dbFullName===t.db_full_name),o=c[r].tables.findIndex(e=>e.tableName===a.tableName);if(c[r].tables[o].fields=n?l.cloneDeep(n):[],c[r].tables[o].indexes=i?l.cloneDeep(i):[],c[r].tables[o].fields.find(e=>e.newTempField)){window.alert("Please resolve all open fields before you save"),setTimeout(()=>{d?.(!1)},1e3);return}(0,s.A)("/api/updateDbSchemaDataForUser",{method:"post",body:{schema:c,database:t.db_slug,table:a,delegated:e?.delegated}},!0).then(e=>{e?.success?window.location.reload():(console.log("Res",e),window.alert(e?.msg||"Operation Failed. Please check permissions."))}).finally(()=>{d&&setTimeout(()=>{d(!1)},1e3)})}catch(e){window.alert(e.message),setTimeout(()=>{d?.(!1)},1e3);return}}},13699:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{SingleTableContext:()=>v,default:()=>w,getServerSideProps:()=>j});var s=t(8732),r=t(82015),n=t.n(r),i=t(20048),d=t.n(i),c=t(95222),o=t(73972),u=t(68153),x=t(64098),m=t(94933),p=t(22373),f=t.n(p),h=t(92728),b=t(11169),g=e([u,x]);[u,x]=g.then?(await g)():g;let v=n().createContext({});function w({user:e,database:a,table:t,tableRecord:l,dbSchemaData:r,entries:i,query:d,confirmedDelegetedUser:p,entriesCount:f}){let h=`${t.tableFullName} Table | Datasquirel`,g=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:h}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),[w,j]=n().useState(t.fields),[y,N]=n().useState(t.indexes),[_,T]=n().useState(null),[S,F]=n().useState(null),A=n().useRef(null),C=n().useRef([]),E=n().useRef([]);return(0,s.jsx)(v.Provider,{value:{user:e,database:a,table:t,tableRecord:l,dbSchemaData:r,targetField:_,setTargetField:T,refreshFieldsListRef:A,tableFields:w,setTableFields:j,tableIndexes:y,setTableIndexes:N,updateTableAfterFieldsUpdateFunction:function(e){(0,m.A)({query:d,table:t,database:a,dbSchemaData:r,tableFields:w,tableIndexes:y,setLoading:e})},entries:i,targetEntry:S,setTargetEntry:F,richTextEditors:C,jsonTextEditors:E,query:d,confirmedDelegetedUser:p,entriesCount:f},children:(0,s.jsx)(c.A,{head:g,user:e,extraHeaderContent:(0,s.jsx)(x.A,{database:a,query:d,confirmedDelegetedUser:p,user:e}),children:(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(u.A,{}),(0,s.jsx)(b.A,{snug:!0}),(0,s.jsx)(o.A,{database:a,targetTable:l})]})})})}async function j({req:e,res:a,query:t}){let l=await d()(e,a);if(!l?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let a=await (0,h.A)({req:e,query:t,user:l});if(!a?.table)throw Error("Data Fetching Error!");return{props:{user:l,...a}}}catch(a){return f()({component:"[single_table]/index-page-component/getServerSideProps/catch-error]",message:a.message,user:l}),{redirect:{destination:e.url?e.url.replace(/\/[^\/]+$/,"")+(t?.delegated?"?delegated=true":""):"/",permanent:!1}}}}l()}catch(e){l(e)}})},40373:e=>{e.exports=require("@tinymce/tinymce-react")},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),l=a.X(0,[883,9821,6521,9600,7070,5134,3737,9621,8613,5421,9732,8842],()=>t(91312));module.exports=l})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5271,e.ids=[5271],e.modules={82654:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{config:()=>f,default:()=>u,getServerSideProps:()=>p,getStaticPaths:()=>m,getStaticProps:()=>x,reportWebVitals:()=>h,routeModule:()=>y,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>w,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>b});var s=t(63865),r=t(9455),n=t(30671),i=t(5583),d=t(19796),c=t(74561),o=e([c]);c=(o.then?(await o)():o)[0];let u=(0,n.M)(c,"default"),x=(0,n.M)(c,"getStaticProps"),m=(0,n.M)(c,"getStaticPaths"),p=(0,n.M)(c,"getServerSideProps"),f=(0,n.M)(c,"config"),h=(0,n.M)(c,"reportWebVitals"),b=(0,n.M)(c,"unstable_getStaticProps"),g=(0,n.M)(c,"unstable_getStaticPaths"),w=(0,n.M)(c,"unstable_getStaticParams"),j=(0,n.M)(c,"unstable_getServerProps"),v=(0,n.M)(c,"unstable_getServerSideProps"),y=new s.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:c});l()}catch(e){l(e)}})},57414:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(8732),s=t(82015),r=t.n(s),n=t(46169),i=t(91140),d=t(16757);function c({targetTable:e,database:a}){let[t,s]=r().useState(!1);return(0,l.jsxs)(i.Ay,{title:"delete-table-confirmation",children:[t&&(0,l.jsx)(d.A,{width:"20px"}),(0,l.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("button",{className:"outlined"+(t?" pointer-events-none opacity-40":""),onClick:t=>{s(!0),(0,n.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,l.jsx)("span",{children:"Yes"})}),(0,l.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,l.jsx)("span",{children:"Cancel"})})]})]})}},54187:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.d(a,{A:()=>v});var s=t(8732),r=t(82015),n=t.n(r),i=t(46169),d=t(74561),c=t(59023),o=t(53926),u=t(73872),x=t(16757),m=t(70468),p=t(471),f=t(32262),h=t(55904),b=t(537),g=t(51275),w=t(23791),j=e([d,u,m,w]);function v(){let{user:e,database:a,table:l,tableRecord:r,dbSchemaData:j,targetField:v,setTargetField:y,refreshFieldsListRef:N,setTableFields:_,tableFields:T,tableIndexes:S,setTableIndexes:A,updateTableAfterFieldsUpdateFunction:F,entries:C,targetEntry:E,setTargetEntry:I,richTextEditors:q,jsonTextEditors:$,query:D,confirmedDelegetedUser:k,entriesCount:P}=n().useContext(d.SingleTableContext);if(!a||!e||!r||!l)return;let R=t(94327),U=k?.delegated,M=k?.priviledges?.match(/Edit Tables/i),L=k?.priviledges?.match(/Delete Tables/i);k?.priviledges?.match(/Create Tables/i);let{active_clone:O,active_clone_parent_db:W,remote_connected:B}=a,H=`dsql${e.id}${a.id}${r.id}`,[V,X]=n().useState(!1);return(0,s.jsxs)(n().Fragment,{children:[V&&(0,s.jsx)(x.A,{}),(0,s.jsxs)("div",{className:"flex-col items-start gap-4 xl:gap-0 w-full relative z-50",children:[(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-wrap",children:[(0,s.jsx)(c.A,{}),(0,s.jsx)("h1",{className:"text-3xl m-0",children:(0,s.jsxs)("span",{children:[l.tableFullName.replace(/ table/i,"")," ","Table"]})}),(0,s.jsx)(u.A,{slugText:l.tableName,outlined:!0})]}),(0,s.jsx)("div",{className:"flex-wrap flex-col md:flex-row w-full md:w-auto items-stretch md:items-center",children:(0,s.jsxs)(h.A,{children:[(0,s.jsxs)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${l.tableName}/entries/add-entry`,className:"button flex items-center gap-2",children:[(0,s.jsx)("span",{className:"symbol",children:"+"}),(0,s.jsx)("span",{children:"Add New Table Entry"})]}),(0,s.jsx)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${l.tableName}/entries`,className:"button secondary flex items-center gap-2",children:(0,s.jsx)("span",{children:"Entries"})}),(0,s.jsx)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${l.tableName}/fields`,className:"button outlined secondary flex items-center gap-2",children:(0,s.jsx)("span",{children:"All Fields"})}),(!U||U&&(M||L))&&!W&&!B&&(0,s.jsxs)("div",{className:"dropdown-wrapper mt-4 xl:mt-0",children:[(0,s.jsx)("span",{className:"hidden xl:flex button outlined gray",children:"More"}),(0,s.jsx)("div",{className:"dropdown mobile-transform right-aligned mt-0 xl:-mt-2 gap-2",children:(0,s.jsxs)(h.A,{column:!0,className:"w-full",children:[(!U||U&&M)&&!W&&!B&&(0,s.jsx)("a",{className:"button outlined-gray more-padding w-full",href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${l.tableName}/edit-table`,children:"Edit Table"}),(!U||U&&L)&&!W&&!B&&(0,s.jsx)("button",{className:"outlined-gray more-padding w-full",onClick:e=>{window.confirm(`Delete "${l.tableFullName}" table?`)&&(X(!0),(0,i.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:{table_slug:l.tableName}}},!0).then(e=>{e.success&&window.location.reload()}))},children:"Delete Table"})]})})]})]})})]}),(0,s.jsx)(o.A,{confirmedDelegetedUser:D?.delegated,user:e})]}),a.active_clone?(0,s.jsx)(b.A,{database:a,user:e}):(0,s.jsx)(s.Fragment,{}),a.remote_connected?(0,s.jsx)(w.p,{database:a}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(g.A,{table:l,database:a,user:e}),(0,s.jsx)(p.A,{user:e,tableFields:T,setTableFields:_,setTargetField:y,refreshFieldsListRef:N,updateTable:!0,updateTableAfterFieldsUpdateFunction:F,collapsed:!0,database:a,table:l,confirmedDelegetedUser:k,query:D}),(0,s.jsx)(f.A,{user:e,table:l,tableUniqueId:H,tableIndexes:S,setTableIndexes:A,database:a,tableFields:T,updateTableAfterFieldsUpdateFunction:F,confirmedDelegetedUser:k}),C&&j&&q&&$&&(0,s.jsx)(m.A,{user:e,entries:C,database:a,table:l,setTargetEntry:I,dbSchemaData:j,richTextEditors:q,dataTypes:R,title:"Entries",query:D,confirmedDelegetedUser:k,jsonTextEditors:$,entriesCount:P})]})}[d,u,m,w]=j.then?(await j)():j,l()}catch(e){l(e)}})},32262:(e,a,t)=>{t.d(a,{A:()=>b});var l=t(8732),s=t(82015),r=t.n(s);function n({tableIndexes:e,setTableIndexes:a,setRefresh:t,setPageRefresh:l}){let s=e&&e[0]?e:[];s.push({newTempIndex:!0}),a(s),t&&t(e=>e+1)}var i=t(16757),d=t(46169),c=t(27825),o=t.n(c);function u({tableIndex:e,fieldIndex:a,currentTable:t,tableFields:s,tableIndexes:n,setTableIndexes:i,setRefresh:c,user:u,tableUniqueId:x}){let[m,p]=r().useState("regular"),[f,h]=r().useState([]),b=r().useRef();return(0,l.jsx)("div",{className:"w-full mt-1 xl:flex-nowrap flex-wrap",ref:b,children:(0,l.jsxs)("form",{className:"flex flex-row items-start gap-4 w-full justify-between border border-solid p-4 pt-6 border-slate-400 rounded focus:shadow-lg shadow-slate-700/40 relative flex-wrap xl:flex-nowrap shadow-xl",onSubmit:e=>{e.preventDefault();let t=e.target.new_index_name.value.replace(/_index/,"").replace(/_{1,}$/,"")+"_index";if(!f||!f[0]){alert("Please Select at least 1 table column name");return}!function({fieldIndex:e,setTableIndexes:a,setRefresh:t,payload:l}){a(a=>(a.splice(e,1,l),a)),t&&t(e=>e+1)}({fieldIndex:a,setTableIndexes:i,payload:{indexType:m,indexName:t,indexTableFields:f,alias:x+"_"+t},setRefresh:c})},children:[(0,l.jsx)("span",{className:"absolute -top-2 text-sm bg-fuchsia-600 text-white px-2 rounded-full",children:"New Index"}),(0,l.jsxs)("div",{className:"gap-4 flex-wrap xl:flex-nowrap flex-col xl:flex-row items-stretch w-full",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Type"}),(0,l.jsx)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",onChange:e=>{p(e.target.value)},children:m?.match(/regular/i)?(0,l.jsx)("option",{value:"regular",children:"Default"}):(0,l.jsx)("option",{value:"fullText",children:"Full Text"})})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_index_name",children:"Index Name"}),(0,l.jsx)("input",{type:"text",name:"new_index_name",id:"new_index_name",placeholder:"Eg. title_index",onInput:async e=>{let a=e.target;a.value=a.value.toLowerCase().replace(/ /g,"_")},required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"items-start",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Table Column(s)"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start gap-2",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:"Select Columns to be indexed. NB the order matters"})})]})]}),(0,l.jsxs)("div",{className:"w-auto flex flex-row items-stretch gap-4",children:[(0,l.jsxs)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl:w-auto",onChange:e=>{if(e.target.value.match(/--/))return;let a=Array.from(e.target.options).filter(a=>a.value===e.target.value)[0].dataset.type;if(a?.match(/text/i))p("fullText"),h([{value:e.target.value,dataType:a}]);else{try{if(f.filter(e=>e.dataType.match(/text/i))[0])throw Error("TEXT type exists");if(f.findIndex(a=>a.value===e.target.value)>=0||e.target.value.match(/^--$/))return;a?(f.push({value:e.target.value,dataType:a}),h([...f])):window.alert("Datatype not provided. Please recheck fields.")}catch(t){(0,d.A)("/api/admin/clientError",{method:"post",body:{component:"NewIndexFieldTemp/lines-177-190",message:t.message,user:u}}),a?h([{value:e.target.value,dataType:a}]):window.alert("Couldn't set Index Fields")}p("regular")}},children:[(0,l.jsx)("option",{value:"--",children:"--"}),s.filter(e=>!e?.fieldName?.match(/^id$|^date_/)&&!e.foreignKey).map((e,a)=>(0,l.jsx)("option",{value:e.fieldName,"data-type":e.dataType,children:e.fieldName},a+1))]}),f&&f[0]&&(0,l.jsx)("div",{className:"px-3 py-1 bg-slate-100 dark:bg-slate-500/10 rounded",children:f.map((e,a)=>(0,l.jsxs)("span",{className:"text-sm px-3 py-1 bg-white dark:bg-slate-700 rounded-full shadow-lg font-bold flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{children:e.value}),(0,l.jsx)("span",{className:"font-normal w-5 h-5 rounded-full flex items-center justify-center cursor-pointer bg-slate-200 dark:bg-slate-600 text-xs hover:bg-slate-400",onClick:a=>{h([...f.filter(a=>!a.value.match(RegExp(`^${o().escapeRegExp(e.value)}$`)))])},children:"✖"})]},a+1))})]})]})]}),(0,l.jsxs)("div",{className:"secondary mt-auto flex-wrap xl:flex-nowrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full sm:w-auto justify-center grow",children:"Add Index"}),(0,l.jsx)("div",{className:"button outlined gray mt-auto py-2.5 w-full sm:w-auto justify-center grow",onClick:e=>{i(e=>e.filter((e,t)=>t!=a))},children:"Cancel"})]})]})})}var x=t(42960);function m({targetIndexObject:e,fieldIndex:a,tableFields:t,refreshFieldsListRef:s,setTableIndexes:n,setRefresh:i,setActiveEdit:c,user:u,tableUniqueId:x}){let[m,p]=r().useState(e),[f,h]=r().useState(m.indexType||"regular"),[b,g]=r().useState(m.indexTableFields?[...m.indexTableFields]:[]),w=r().useRef();return(0,l.jsx)("div",{className:"w-full -mt-3 flex-wrap",ref:w,children:(0,l.jsxs)("form",{className:"flex flex-col xl:flex-row items-start gap-4 w-full justify-between p-4 relative xl:flex-nowrap flex-wrap border border-t-0 border-slate-200 dark:border-slate-600 border-solid rounded-b",onSubmit:e=>{e.preventDefault();let t=e.target.new_index_name.value.replace(/_index/,"").replace(/_{1,}$/,"")+"_index";m.indexName=t,m.alias=x+"_"+t,m.indexTableFields=b,n(e=>(e[a]=m,e)),c(!1),i(e=>e+1)},children:[(0,l.jsxs)("div",{className:"gap-4 xl:flex-nowrap flex-wrap flex-col xl:flex-row items-stretch w-full",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,l.jsx)("label",{htmlFor:"new_field_required",children:"Type"}),(0,l.jsx)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",onChange:e=>{h(e.target.value),p(a=>(a.indexType=e.target.value,a))},defaultValue:f,children:f?.match(/regular/i)?(0,l.jsx)("option",{value:"regular",children:"Default"}):(0,l.jsx)("option",{value:"fullText",children:"Full Text"})})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsx)("label",{htmlFor:"new_index_name",children:"Index Name"}),(0,l.jsx)("input",{type:"text",name:"new_index_name",id:"new_index_name",placeholder:"Eg. title_index",onInput:async e=>{let a=e.target;a.value=a.value.toLowerCase().replace(/ /g,"_")},required:!0,defaultValue:m.indexName})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,l.jsxs)("div",{className:"items-start",children:[(0,l.jsx)("label",{htmlFor:"new_field_data_type",children:"Table Column(s)"}),(0,l.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start gap-2",children:[(0,l.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,l.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,l.jsx)("span",{children:"Select Columns to be indexed. NB the order matters"})})]})]}),(0,l.jsxs)("div",{className:"w-auto flex flex-row items-stretch gap-4",children:[(0,l.jsxs)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl:w-auto",onChange:e=>{!function({e,indexTableFields:a,setIndexTableFields:t,setIndexType:l,user:s}){if(e.target.value.match(/--/))return;let r=Array.from(e.target.options).filter(a=>a.value===e.target.value)[0].dataset.type;if(r.match(/text/i))l("fullText"),t([{value:e.target.value,dataType:r}]);else{try{if(a.filter(e=>e.dataType.match(/text/i))[0])throw Error("TEXT type exists");if(a.findIndex(a=>a.value===e.target.value)>=0||e.target.value.match(/^--$/))return;a.push({value:e.target.value,dataType:r}),t([...a])}catch(a){(0,d.A)("/api/admin/clientError",{method:"post",body:{component:"ExistingIndexEdit/lines-184-197",message:a.message,user:s}}),t([{value:e.target.value,dataType:r}])}l("regular")}}({e,indexTableFields:b,setIndexTableFields:g,setIndexType:h,user:u})},children:[(0,l.jsx)("option",{value:"--",children:"--"}),t.filter(e=>!e?.fieldName?.match(/^id$|^date_/)&&!e.foreignKey).map((e,a)=>(0,l.jsx)("option",{value:e.fieldName,"data-type":e.dataType,children:e.fieldName},a+1))]}),b&&b[0]&&(0,l.jsx)("div",{className:"card no-hover px-3 py-1 items-center",children:b.map((e,a)=>(0,l.jsxs)("span",{className:"text-sm px-3 py-1 bg-white dark:bg-slate-700 rounded-full shadow-lg font-bold flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{children:e.value}),(0,l.jsx)("span",{className:"font-normal w-5 h-5 rounded-full flex items-center justify-center cursor-pointer bg-slate-200 text-xs hover:bg-slate-400",onClick:a=>{g([...b.filter(a=>!a.value.match(RegExp(`^${o().escapeRegExp(e.value)}$`)))])},children:"✖"})]},a+1))})]})]})]}),(0,l.jsxs)("div",{className:"secondary mt-auto xl:flex-nowrap flex-wrap w-full xl:w-auto",children:[(0,l.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full md:w-auto grow",children:"Save Updates"}),(0,l.jsx)("div",{className:"button outlined gray mt-auto py-2.5 w-full md:w-auto justify-center grow",onClick:e=>{c(!1)},children:"Cancel"})]})]})})}var p=t(55904);function f({tableIndex:e,fieldIndex:a,tableIndexes:t,setTableIndexes:s,refreshFieldsListRef:n,database:i,currentTable:d,tableFields:c,setRefresh:o,confirmedDelegetedUser:u,user:f,tableUniqueId:h}){let b=u?.delegated,g=u?.priviledges?.match(/Edit Tables/i);u?.priviledges?.match(/Delete Tables/i),u?.priviledges?.match(/Create Tables/i);let{active_clone:w,active_clone_parent_db:j,remote_connected:v}=i,[y,N]=r().useState(e),[_,T]=r().useState(!1),[S,A]=r().useState(0);return(0,l.jsxs)("div",{className:"flex-col w-full"+(_?" shadow-xl shadow-slate-300/40 dark:shadow-black/30 relative z-50":""),children:[(0,l.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(_?" rounded-t":" rounded")+(y.indexName?.match(x.A)?" text-slate-400 pointer-events-none border-slate-200 border":""),onClick:e=>{},children:[(0,l.jsx)("span",{className:"font-bold dark:text-white",children:y.indexName}),!y.indexName?.match(x.A)&&!j&&!v&&(0,l.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(!b||b&&g)&&(0,l.jsx)(r().Fragment,{children:(0,l.jsx)(p.A,{children:(0,l.jsx)("div",{className:"button outlined gray smallest",onClick:t=>{window.confirm(`Delete "${e.indexName}"?`)&&s(e=>e.filter((e,t)=>t!=a))},style:{color:"var(--slate-500)"},children:"Delete"})})})})]}),_&&(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(m,{fieldIndex:a,setTableIndexes:s,refreshFieldsListRef:n,setActiveEdit:T,tableFields:c,targetIndexObject:y,setRefresh:o,user:f,tableUniqueId:h})})]})}let h=1;function b({user:e,table:a,tableUniqueId:t,tableIndexes:s,setTableIndexes:d,tableFields:c,updateTableAfterFieldsUpdateFunction:o,confirmedDelegetedUser:x,database:m}){a.indexes;let p=x?.delegated,b=x?.priviledges?.match(/Edit Tables/i);x?.priviledges?.match(/Delete Tables/i),x?.priviledges?.match(/Create Tables/i);let{active_clone:g,active_clone_parent_db:w,remote_connected:j}=m,[v,y]=r().useState(0),[N,_]=r().useState(!1),[T,S]=r().useState(!1);return p&&!b?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)("section",{className:"paper blue",children:[N&&(0,l.jsx)(i.A,{}),a.childTable?(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Indexes"}),(0,l.jsx)("span",{children:"Table indexes are inherited from parent table"}),s&&s[0]&&s.map((e,a)=>(0,l.jsxs)("div",{className:"card w-full light-gray py-4 no-hover items-center",children:[(0,l.jsx)("b",{children:e.indexName}),(0,l.jsxs)("span",{className:"info small gray grow-0 ml-auto w-auto",children:[e.indexType," index"]})]},a))]}):(0,l.jsxs)(r().Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Indexes"}),(!p||p&&b)&&!w&&!j&&(0,l.jsxs)("div",{className:"button secondary outlined flex items-center gap-2",onClick:e=>{T&&S(!1),n({tableIndexes:s,setTableIndexes:d,setRefresh:y})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Index"})]})]}),(0,l.jsxs)("div",{className:"flex-col w-full",style:T?{maxHeight:"200px"}:{},children:[s&&s[0]&&s.map((r,n)=>(h++,r.newTempIndex)?(0,l.jsx)(u,{fieldIndex:n,tableIndex:r,currentTable:a,tableIndexes:s,setTableIndexes:d,tableFields:c,setRefresh:y,user:e,tableUniqueId:t},h):(0,l.jsx)(f,{fieldIndex:n,tableIndex:r,database:m,currentTable:a,tableIndexes:s,setTableIndexes:d,tableFields:c,setRefresh:y,confirmedDelegetedUser:x,user:e,tableUniqueId:t},h)),(!p||p&&b)&&!w&&!j&&(0,l.jsxs)(r().Fragment,{children:[(0,l.jsxs)("div",{className:"button outlined gray w-full justify-center more-padding",style:{borderStyle:"dashed"},onClick:e=>{n({tableIndexes:s,setTableIndexes:d,setRefresh:y})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New Index"})]}),(0,l.jsx)("div",{className:"button w-full blue",onClick:e=>{_(!0),o&&o(_)},children:(0,l.jsx)("span",{children:"Update Table Indexes"})})]})]})]})]})}},41494:(e,a,t)=>{t.d(a,{A:()=>d});var l=t(77047),s=t(71934),r=t(22873),n=t(72272),i=t(52854);async function d({req:e,user:a,query:t}){try{let l=await (0,r.A)({request:e,user:a,databaseSlug:t.single,query:t});if(!l)return null;let{dbUserId:d}=l,c=await (0,s.A)(`SELECT * FROM user_databases WHERE user_id='${d}' AND db_slug='${t.single}'`);if(!c?.[0])return null;let o=(0,n.A)({userId:Number(d)});if(!o)throw Error("DB Schema not found!");let u=o.filter(e=>e.dbFullName===c[0].db_full_name)[0]?.tables,x=u?.filter(e=>e.tableName===t.single_table)[0],m=await (0,s.A)(`SELECT * FROM user_database_tables WHERE user_id='${d}' AND db_id='${c[0].id}' AND table_slug='${t.single_table}'`),p=await (0,i.A)({database:c[0].db_full_name,queryString:`SELECT * FROM ${c[0].db_full_name}.${x?.tableName} ORDER BY id DESC LIMIT 10`,tableSchema:x}),f=await (0,i.A)({database:c[0].db_full_name,queryString:`SELECT COUNT(id) AS count FROM ${c[0].db_full_name}.${x?.tableName}`,tableSchema:x});if(l.rootUserId){let e=o.filter(e=>e.dbFullName==c[0].db_full_name)[0],a=e.tables.filter(e=>e.tableName===x?.tableName);e.tables=a,o=[e]}return{confirmedDelegetedUser:l||null,database:c[0]||null,dbSchemaData:o||null,entries:p||null,entriesCount:f?.[0]?.count||0,query:t,table:x,tableRecord:m[0]||{}}}catch(e){return(0,l.A)({component:"[single_table]/index-page-component/getServerSideProps/catch-error]",message:e.message,user:a}),{}}}},7143:(e,a,t)=>{t.d(a,{A:()=>r});var l=t(27825),s=t(46169);function r({query:e,table:a,database:t,dbSchemaData:r,tableFields:n,tableIndexes:i,setLoading:d}){let c=[...r];try{let r=c.findIndex(e=>e.dbFullName===t.db_full_name),o=c[r].tables.findIndex(e=>e.tableName===a.tableName);if(c[r].tables[o].fields=n?l.cloneDeep(n):[],c[r].tables[o].indexes=i?l.cloneDeep(i):[],c[r].tables[o].fields.find(e=>e.newTempField)){window.alert("Please resolve all open fields before you save"),setTimeout(()=>{d?.(!1)},1e3);return}(0,s.A)("/api/updateDbSchemaDataForUser",{method:"post",body:{schema:c,database:t.db_slug,table:a,delegated:e?.delegated}},!0).then(e=>{e?.success?window.location.reload():(console.log("Res",e),window.alert(e?.msg||"Operation Failed. Please check permissions."))}).finally(()=>{d&&setTimeout(()=>{d(!1)},1e3)})}catch(e){window.alert(e.message),setTimeout(()=>{d?.(!1)},1e3);return}}},74561:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{SingleTableContext:()=>w,default:()=>b,getServerSideProps:()=>g});var s=t(8732),r=t(82015),n=t.n(r),i=t(92702),d=t(25562),c=t(57414),o=t(54187),u=t(55880),x=t(7143),m=t(77047),p=t(41494),f=t(43363),h=e([o,u]);[o,u]=h.then?(await h)():h;let w=n().createContext({});function b({user:e,database:a,table:t,tableRecord:l,dbSchemaData:r,entries:i,query:m,confirmedDelegetedUser:p,entriesCount:h}){let b=`${t.tableFullName} Table | Datasquirel`,g=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:b}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),[j,v]=n().useState(t.fields),[y,N]=n().useState(t.indexes),[_,T]=n().useState(null),[S,A]=n().useState(null),F=n().useRef(null),C=n().useRef([]),E=n().useRef([]);return(0,s.jsx)(w.Provider,{value:{user:e,database:a,table:t,tableRecord:l,dbSchemaData:r,targetField:_,setTargetField:T,refreshFieldsListRef:F,tableFields:j,setTableFields:v,tableIndexes:y,setTableIndexes:N,updateTableAfterFieldsUpdateFunction:function(e){(0,x.A)({query:m,table:t,database:a,dbSchemaData:r,tableFields:j,tableIndexes:y,setLoading:e})},entries:i,targetEntry:S,setTargetEntry:A,richTextEditors:C,jsonTextEditors:E,query:m,confirmedDelegetedUser:p,entriesCount:h},children:(0,s.jsx)(d.A,{head:g,user:e,extraHeaderContent:(0,s.jsx)(u.A,{database:a,query:m,confirmedDelegetedUser:p,user:e}),children:(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(o.A,{}),(0,s.jsx)(f.A,{snug:!0}),(0,s.jsx)(c.A,{database:a,targetTable:l})]})})})}async function g({req:e,res:a,query:t}){let l=await (0,i.default)(e,a);if(!l?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let a=await (0,p.A)({req:e,query:t,user:l});if(!a?.table)throw Error("Data Fetching Error!");return{props:{user:l,...a}}}catch(a){return(0,m.A)({component:"[single_table]/index-page-component/getServerSideProps/catch-error]",message:a.message,user:l}),{redirect:{destination:e.url?e.url.replace(/\/[^\/]+$/,"")+(t?.delegated?"?delegated=true":""):"/",permanent:!1}}}}l()}catch(e){l(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),l=a.X(0,[883,9821,6521,9796,5392,3634,3155,3791,9901,725,4627,8704],()=>t(82654));module.exports=l})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js.nft.json index 1621269..1de4570 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../node_modules/gsap/package.json","../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../../../../node_modules/prop-types/node_modules/react-is/package.json","../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react-tiny-popover/dist/ArrowContainer.js","../../../../../../../../node_modules/react-tiny-popover/dist/Popover.js","../../../../../../../../node_modules/react-tiny-popover/dist/PopoverPortal.js","../../../../../../../../node_modules/react-tiny-popover/dist/useArrowContainer.js","../../../../../../../../node_modules/react-tiny-popover/dist/useElementRef.js","../../../../../../../../node_modules/react-tiny-popover/dist/useHandlePrevValues.js","../../../../../../../../node_modules/react-tiny-popover/dist/useMemoizedArray.js","../../../../../../../../node_modules/react-tiny-popover/dist/usePopover.js","../../../../../../../../node_modules/react-tiny-popover/dist/util.js","../../../../../../../../node_modules/react-tiny-popover/package.json","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1614.js","../../../../../../chunks/2414.js","../../../../../../chunks/2451.js","../../../../../../chunks/2996.js","../../../../../../chunks/3247.js","../../../../../../chunks/3460.js","../../../../../../chunks/3737.js","../../../../../../chunks/3932.js","../../../../../../chunks/4050.js","../../../../../../chunks/4312.js","../../../../../../chunks/4333.js","../../../../../../chunks/4385.js","../../../../../../chunks/45.js","../../../../../../chunks/5134.js","../../../../../../chunks/5212.js","../../../../../../chunks/5264.js","../../../../../../chunks/5421.js","../../../../../../chunks/5664.js","../../../../../../chunks/5674.js","../../../../../../chunks/6521.js","../../../../../../chunks/7070.js","../../../../../../chunks/7640.js","../../../../../../chunks/8540.js","../../../../../../chunks/8613.js","../../../../../../chunks/883.js","../../../../../../chunks/8842.js","../../../../../../chunks/9600.js","../../../../../../chunks/9621.js","../../../../../../chunks/9732.js","../../../../../../chunks/9821.js","../../../../../../chunks/9914.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../node_modules/gsap/package.json","../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react-is/cjs/react-is.development.js","../../../../../../../../node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../node_modules/react-is/index.js","../../../../../../../../node_modules/react-is/package.json","../../../../../../../../node_modules/react-tiny-popover/dist/ArrowContainer.js","../../../../../../../../node_modules/react-tiny-popover/dist/Popover.js","../../../../../../../../node_modules/react-tiny-popover/dist/PopoverPortal.js","../../../../../../../../node_modules/react-tiny-popover/dist/useArrowContainer.js","../../../../../../../../node_modules/react-tiny-popover/dist/useElementRef.js","../../../../../../../../node_modules/react-tiny-popover/dist/useHandlePrevValues.js","../../../../../../../../node_modules/react-tiny-popover/dist/useMemoizedArray.js","../../../../../../../../node_modules/react-tiny-popover/dist/usePopover.js","../../../../../../../../node_modules/react-tiny-popover/dist/util.js","../../../../../../../../node_modules/react-tiny-popover/package.json","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1251.js","../../../../../../chunks/1579.js","../../../../../../chunks/194.js","../../../../../../chunks/2282.js","../../../../../../chunks/3155.js","../../../../../../chunks/3474.js","../../../../../../chunks/3496.js","../../../../../../chunks/3634.js","../../../../../../chunks/3704.js","../../../../../../chunks/3791.js","../../../../../../chunks/4627.js","../../../../../../chunks/5392.js","../../../../../../chunks/5839.js","../../../../../../chunks/5954.js","../../../../../../chunks/6160.js","../../../../../../chunks/6202.js","../../../../../../chunks/6521.js","../../../../../../chunks/6622.js","../../../../../../chunks/6903.js","../../../../../../chunks/725.js","../../../../../../chunks/7713.js","../../../../../../chunks/8704.js","../../../../../../chunks/8760.js","../../../../../../chunks/883.js","../../../../../../chunks/9796.js","../../../../../../chunks/9821.js","../../../../../../chunks/9901.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js index 45213d4..4c37e09 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7181,e.ids=[7181],e.modules={96829:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{config:()=>g,default:()=>c,getServerSideProps:()=>p,getStaticPaths:()=>m,getStaticProps:()=>b,reportWebVitals:()=>x,routeModule:()=>j,unstable_getServerProps:()=>v,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>h});var s=t(63865),r=t(9455),i=t(30671),n=t(49407),d=t(89600),o=t(32448),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,i.M)(o,"default"),b=(0,i.M)(o,"getStaticProps"),m=(0,i.M)(o,"getStaticPaths"),p=(0,i.M)(o,"getServerSideProps"),g=(0,i.M)(o,"config"),x=(0,i.M)(o,"reportWebVitals"),h=(0,i.M)(o,"unstable_getStaticProps"),f=(0,i.M)(o,"unstable_getStaticPaths"),_=(0,i.M)(o,"unstable_getStaticParams"),v=(0,i.M)(o,"unstable_getServerProps"),w=(0,i.M)(o,"unstable_getServerSideProps"),j=new s.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table",bundlePath:"",filename:""},components:{App:d.default,Document:n.default},userland:o});l()}catch(e){l(e)}})},29641:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.d(a,{A:()=>h});var s=t(8732),r=t(82015),i=t.n(r),n=t(32448),d=t(46437),o=t(58548),u=t(33702),c=t(77802),b=t(94933),m=t(86571),p=t(65241),g=t(59621),x=e([n,u,g]);function h(e){let{user:a,database:t,table:l,tableFields:r,setTableFields:x,setTargetField:h,refreshFieldsListRef:f,dbSchemaData:_,query:v,confirmedDelegetedUser:w}=i().useContext(n.EditTableContext);return w?.delegated,w?.priviledges?.match(/Edit Tables/i),w?.priviledges?.match(/Delete Tables/i),w?.priviledges?.match(/Create Tables/i),(0,s.jsxs)(i().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(d.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{children:"Edit"}),(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${t.db_slug}/tables/${l.tableName}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-600 ml-2 text-primary hover:text-primary_dark",children:l.tableFullName}),(0,s.jsx)("span",{className:"ml-2",children:"Table"})]})]}),(0,s.jsx)(o.A,{confirmedDelegetedUser:v?.delegated,user:a})]}),t.active_clone?(0,s.jsx)(m.A,{database:t,user:a}):(0,s.jsx)(s.Fragment,{}),t.remote_connected?(0,s.jsx)(g.p,{database:t}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(p.A,{table:l,database:t,user:a}),(0,s.jsxs)("div",{className:"w-full flex-col",children:[(0,s.jsx)(u.A,{}),(0,s.jsx)(c.A,{user:a,tableFields:r,setTableFields:x,setTargetField:h,refreshFieldsListRef:f,updateTable:!0,database:t,updateTableAfterFieldsUpdateFunction:function(){(0,b.A)({query:v,table:l,database:t,dbSchemaData:_,tableFields:r,tableIndexes:l.indexes})},confirmedDelegetedUser:w,query:v,table:l})]})]})}[n,u,g]=x.then?(await x)():x,l()}catch(e){l(e)}})},33702:(e,a,t)=>{t.a(e,async(e,l)=>{try{let p;t.d(a,{A:()=>m});var s=t(8732),r=t(82015),i=t.n(r),n=t(32415),d=t(27462);t(77802);var o=t(63715),u=t(32448),c=t(64535),b=e([u]);function m(e){let{user:a,table:t,tableFields:l,database:r,query:b,confirmedDelegetedUser:m}=i().useContext(u.EditTableContext);async function g(e){return await (0,d.A)({tableName:"user_database_tables",columnName:"table_slug",value:e,userId:a.id})}let x=m?.delegated,h=m?.priviledges?.match(/Edit Tables/i);m?.priviledges?.match(/Delete Tables/i),m?.priviledges?.match(/Create Tables/i);let[f,_]=i().useState(null),[v,w]=i().useState(!1);return(0,s.jsx)(i().Fragment,{children:(!x||x&&h)&&(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Update Table Information"}),v&&(0,s.jsx)(n.A,{}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:e=>{e.preventDefault(),w(!0);let l=e.target,s=l.table_name.value,i=l.table_slug.value,n=l.table_description.value;(0,o.A)("/api/updateUserTable",{method:"post",body:{dbFullName:r.db_full_name,dbSlug:r.db_slug,dbId:r.id,tableNameOld:t.tableName,payload:{tableName:i,tableFullName:s,tableDescription:n},delegated:b?.delegated}},!0).then(e=>{e.success?window.location.pathname=`/admin/${a?.id}/databases/${r.db_slug}/tables`+window.location.search:(window.alert("Failed to update Table! Please Try again."),window.location.reload())})},children:[f&&(0,s.jsx)(c.A,{message:f}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_name",children:"Name"}),(0,s.jsx)("input",{type:"text",name:"table_name",id:"table_name",placeholder:"Table Name",onInput:async e=>{let a=e.target,l=a.closest("form");a.value.match(/./)?(a.classList.remove("warning"),_(null)):a.classList.add("warning"),l.table_slug.value=a.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,"");let s=l.table_slug.value;window.clearTimeout(p),p=setTimeout(()=>{g(s).then(e=>{e.result&&s!==t.tableName?(l.table_slug.classList.add("warning"),_("Duplicate Table Name")):(l.table_slug.classList.remove("warning"),_(null))})},300)},required:!0,defaultValue:t.tableFullName})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_slug",children:"Slug"}),(0,s.jsx)("input",{type:"text",name:"table_slug",id:"table_slug",placeholder:"Table Slug",onInput:e=>{let a=e.target;a.closest("form"),a.value.match(/./)?(a.classList.remove("warning"),_(null)):a.classList.add("warning"),window.clearTimeout(p),p=setTimeout(()=>{g(a.value).then(e=>{e.result?(a.classList.add("warning"),_("Duplicate Table Slug")):(a.classList.remove("warning"),_(null))})},300)},required:!0,defaultValue:t.tableName})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_description",children:"Description (optional)"}),(0,s.jsx)("textarea",{name:"table_description",id:"table_description",placeholder:"Short Description of Table",defaultValue:t.tableDescription})]}),(0,s.jsx)("button",{type:"submit",className:"w-full"+(v?" pointer-events-none opacity-40":""),id:"create-new-table-form-submit-button",children:"Update Table Info"})]})]})})}u=(b.then?(await b)():b)[0],l()}catch(e){l(e)}})},65241:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(8732),s=t(82015),r=t.n(s);function i({table:e,database:a,user:t,activeDbClone:s}){let i=e?.childTableDbFullName?e.childTableDbFullName.replace(new RegExp(/datasquirel_user_\d+_/),""):null,n=e.childTableDbFullName===a.db_full_name;return i?(0,l.jsxs)("span",{className:"info small green gap-1"+(a?.active_clone?" -mt-6":""),style:{fontWeight:"500"},children:["This Table is an active clone of"," ",(0,l.jsx)("a",{href:`/admin/${t?.id}/databases/${i}/tables/${e.childTableName}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,l.jsx)("b",{children:e.childTableName})})," ","in"," ",n?(0,l.jsxs)("span",{children:["this current database(",(0,l.jsx)("b",{children:a.db_name}),")."]}):(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("a",{href:`/admin/${t?.id}/databases/${i}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,l.jsx)("b",{children:i})}),(0,l.jsx)("span",{children:"database."})]})," ",a?.active_clone?"":"Only Foreign keys and Entries can be updated."]}):(0,l.jsx)(r().Fragment,{})}},64535:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({message:e}){return(0,l.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,l.jsx)("span",{children:e})]})}t(82015)},31651:(e,a,t)=>{t(81630);let l=t(77463);e.exports=async function({request:e,databaseSlug:a,user:t,query:s}){try{let r=t.id,i=null;if(!s?.delegated)return{dbUserId:r};let n=s.dbUserId,d=`${process.env.DSQL_USER_DB_PREFIX}${n}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${d}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let t=l({encryptedString:e.cookies[o]});if(!t)throw Error("Invalid Token");if((i=JSON.parse(t)).databaseSlug===a)return{dbUserId:r=i.rootUserId,rootUserId:i.rootUserId,rootUserName:i.rootUserName,rootUserEmail:i.rootUserEmail,rootUserImage:i.rootUserImage,databaseFullName:i.databaseFullName,databaseSlug:i.databaseSlug,allowedTables:i.allowedTables,priviledges:i.priviledges,database:i.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:r}}catch(e){return null}}},27462:(e,a,t)=>{t.d(a,{A:()=>s}),t(22326);var l=t(63715);async function s({tableName:e,columnName:a,value:t,dbFullName:s,dispatch:r,userId:i,dbId:n}){return await (0,l.A)(`/api/checkDuplicateData?tableName=${e}&type=${a}&value=${t}${s?"&dbFullName="+s:""}${i?"&userId="+i:""}${n?"&dbId="+n:""}`)}},94933:(e,a,t)=>{t.d(a,{A:()=>r});var l=t(27825),s=t(63715);function r({query:e,table:a,database:t,dbSchemaData:r,tableFields:i,tableIndexes:n,setLoading:d}){let o=[...r];try{let r=o.findIndex(e=>e.dbFullName===t.db_full_name),u=o[r].tables.findIndex(e=>e.tableName===a.tableName);if(o[r].tables[u].fields=i?l.cloneDeep(i):[],o[r].tables[u].indexes=n?l.cloneDeep(n):[],o[r].tables[u].fields.find(e=>e.newTempField)){window.alert("Please resolve all open fields before you save"),setTimeout(()=>{d?.(!1)},1e3);return}(0,s.A)("/api/updateDbSchemaDataForUser",{method:"post",body:{schema:o,database:t.db_slug,table:a,delegated:e?.delegated}},!0).then(e=>{e?.success?window.location.reload():(console.log("Res",e),window.alert(e?.msg||"Operation Failed. Please check permissions."))}).finally(()=>{d&&setTimeout(()=>{d(!1)},1e3)})}catch(e){window.alert(e.message),setTimeout(()=>{d?.(!1)},1e3);return}}},32448:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{EditTableContext:()=>w,default:()=>_,getServerSideProps:()=>v});var s=t(8732),r=t(82015),i=t.n(r),n=t(95222),d=t(20048),o=t.n(d),u=t(64098),c=t(29641),b=t(31651),m=t.n(b),p=t(67216),g=t.n(p),x=t(93342),h=t.n(x),f=e([u,c]);[u,c]=f.then?(await f)():f;let w=i().createContext({});function _({user:e,database:a,table:t,dbSchemaData:l,query:r,confirmedDelegetedUser:d}){let o=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Edit Table | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Edit Table"})]}),[b,m]=i().useState(t.fields),[p,g]=i().useState(null),[x,h]=i().useState(0),f=i().useRef();return(0,s.jsx)(n.A,{head:o,user:e,extraHeaderContent:(0,s.jsx)(u.A,{database:a,query:r,confirmedDelegetedUser:d,user:e}),children:(0,s.jsx)(w.Provider,{value:{user:e,database:a,table:t,tableFields:b,setTableFields:m,targetField:p,setTargetField:g,pageRefresh:x,setPageRefresh:h,refreshFieldsListRef:f,dbSchemaData:l,query:r,confirmedDelegetedUser:d},children:(0,s.jsx)(c.A,{})})})}async function v({req:e,res:a,query:t}){try{let l=await o()(e,a);if(!l?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await m()({request:e,user:l,databaseSlug:t.single,query:t});if(!s)throw Error("No Db Object Found!");let{dbUserId:r,rootUserId:i}=s,n=await g()(`SELECT * FROM user_databases WHERE user_id='${r}' AND db_slug='${t.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};let d=h()({userId:r});if(!d)throw Error("User schema data not found!");let u=d.filter(e=>e.dbFullName===n[0].db_full_name)?.[0]?.tables,c=u?.filter(e=>e.tableName===t.single_table)[0];if(!u||!c)return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};return{props:{user:l,database:n[0],dbSchemaData:d,table:c,query:t,confirmedDelegetedUser:s}}}catch(e){return{redirect:{destination:"/",permanent:!1}}}}l()}catch(e){l(e)}})},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),l=a.X(0,[883,9821,6521,9600,7070,5134,3737,9621,8613,5421],()=>t(96829));module.exports=l})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7181,e.ids=[7181],e.modules={98347:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{config:()=>g,default:()=>c,getServerSideProps:()=>p,getStaticPaths:()=>m,getStaticProps:()=>b,reportWebVitals:()=>x,routeModule:()=>j,unstable_getServerProps:()=>v,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>h});var s=t(63865),r=t(9455),i=t(30671),n=t(5583),d=t(19796),o=t(83690),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,i.M)(o,"default"),b=(0,i.M)(o,"getStaticProps"),m=(0,i.M)(o,"getStaticPaths"),p=(0,i.M)(o,"getServerSideProps"),g=(0,i.M)(o,"config"),x=(0,i.M)(o,"reportWebVitals"),h=(0,i.M)(o,"unstable_getStaticProps"),f=(0,i.M)(o,"unstable_getStaticPaths"),_=(0,i.M)(o,"unstable_getStaticParams"),v=(0,i.M)(o,"unstable_getServerProps"),w=(0,i.M)(o,"unstable_getServerSideProps"),j=new s.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table",bundlePath:"",filename:""},components:{App:d.default,Document:n.default},userland:o});l()}catch(e){l(e)}})},9723:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.d(a,{A:()=>h});var s=t(8732),r=t(82015),i=t.n(r),n=t(83690),d=t(59023),o=t(53926),u=t(15028),c=t(471),b=t(7143),m=t(537),p=t(51275),g=t(23791),x=e([n,u,g]);function h(){let{user:e,database:a,table:t,tableFields:l,setTableFields:r,setTargetField:x,refreshFieldsListRef:h,dbSchemaData:f,query:_,confirmedDelegetedUser:v}=i().useContext(n.EditTableContext);return v?.delegated,v?.priviledges?.match(/Edit Tables/i),v?.priviledges?.match(/Delete Tables/i),v?.priviledges?.match(/Create Tables/i),(0,s.jsxs)(i().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(d.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{children:"Edit"}),(0,s.jsx)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${t.tableName}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-600 ml-2 text-primary hover:text-primary_dark",children:t.tableFullName}),(0,s.jsx)("span",{className:"ml-2",children:"Table"})]})]}),(0,s.jsx)(o.A,{confirmedDelegetedUser:_?.delegated,user:e})]}),a.active_clone?(0,s.jsx)(m.A,{database:a,user:e}):(0,s.jsx)(s.Fragment,{}),a.remote_connected?(0,s.jsx)(g.p,{database:a}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(p.A,{table:t,database:a,user:e}),(0,s.jsxs)("div",{className:"w-full flex-col",children:[(0,s.jsx)(u.A,{}),(0,s.jsx)(c.A,{user:e,tableFields:l,setTableFields:r,setTargetField:x,refreshFieldsListRef:h,updateTable:!0,database:a,updateTableAfterFieldsUpdateFunction:function(){(0,b.A)({query:_,table:t,database:a,dbSchemaData:f,tableFields:l,tableIndexes:t.indexes})},confirmedDelegetedUser:v,query:_,table:t})]})]})}[n,u,g]=x.then?(await x)():x,l()}catch(e){l(e)}})},15028:(e,a,t)=>{t.a(e,async(e,l)=>{try{let p;t.d(a,{A:()=>m});var s=t(8732),r=t(82015),i=t.n(r),n=t(16757),d=t(24872),o=t(46169),u=t(83690),c=t(10621),b=e([u]);function m(){let{user:e,table:a,tableFields:t,database:l,query:r,confirmedDelegetedUser:b}=i().useContext(u.EditTableContext);async function m(a){return await (0,d.A)({tableName:"user_database_tables",columnName:"table_slug",value:a,userId:e.id})}let g=b?.delegated,x=b?.priviledges?.match(/Edit Tables/i);b?.priviledges?.match(/Delete Tables/i),b?.priviledges?.match(/Create Tables/i);let[h,f]=i().useState(null),[_,v]=i().useState(!1);return(0,s.jsx)(i().Fragment,{children:(!g||g&&x)&&(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Update Table Information"}),_&&(0,s.jsx)(n.A,{}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:t=>{t.preventDefault(),v(!0);let s=t.target,i=s.table_name.value,n=s.table_slug.value,d=s.table_description.value;(0,o.A)("/api/updateUserTable",{method:"post",body:{dbFullName:l.db_full_name,dbSlug:l.db_slug,dbId:l.id,tableNameOld:a.tableName,payload:{tableName:n,tableFullName:i,tableDescription:d},delegated:r?.delegated}},!0).then(a=>{a.success?window.location.pathname=`/admin/${e?.id}/databases/${l.db_slug}/tables`+window.location.search:(window.alert("Failed to update Table! Please Try again."),window.location.reload())})},children:[h&&(0,s.jsx)(c.A,{message:h}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_name",children:"Name"}),(0,s.jsx)("input",{type:"text",name:"table_name",id:"table_name",placeholder:"Table Name",onInput:async e=>{let t=e.target,l=t.closest("form");t.value.match(/./)?(t.classList.remove("warning"),f(null)):t.classList.add("warning"),l.table_slug.value=t.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,"");let s=l.table_slug.value;window.clearTimeout(p),p=setTimeout(()=>{m(s).then(e=>{e.result&&s!==a.tableName?(l.table_slug.classList.add("warning"),f("Duplicate Table Name")):(l.table_slug.classList.remove("warning"),f(null))})},300)},required:!0,defaultValue:a.tableFullName})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_slug",children:"Slug"}),(0,s.jsx)("input",{type:"text",name:"table_slug",id:"table_slug",placeholder:"Table Slug",onInput:e=>{let a=e.target;a.closest("form"),a.value.match(/./)?(a.classList.remove("warning"),f(null)):a.classList.add("warning"),window.clearTimeout(p),p=setTimeout(()=>{m(a.value).then(e=>{e.result?(a.classList.add("warning"),f("Duplicate Table Slug")):(a.classList.remove("warning"),f(null))})},300)},required:!0,defaultValue:a.tableName})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_description",children:"Description (optional)"}),(0,s.jsx)("textarea",{name:"table_description",id:"table_description",placeholder:"Short Description of Table",defaultValue:a.tableDescription})]}),(0,s.jsx)("button",{type:"submit",className:"w-full"+(_?" pointer-events-none opacity-40":""),id:"create-new-table-form-submit-button",children:"Update Table Info"})]})]})})}u=(b.then?(await b)():b)[0],l()}catch(e){l(e)}})},51275:(e,a,t)=>{t.d(a,{A:()=>i});var l=t(8732),s=t(82015),r=t.n(s);function i({table:e,database:a,user:t,activeDbClone:s}){let i=e?.childTableDbFullName?e.childTableDbFullName.replace(new RegExp(/datasquirel_user_\d+_/),""):null,n=e.childTableDbFullName===a.db_full_name;return i?(0,l.jsxs)("span",{className:"info small green gap-1"+(a?.active_clone?" -mt-6":""),style:{fontWeight:"500"},children:["This Table is an active clone of"," ",(0,l.jsx)("a",{href:`/admin/${t?.id}/databases/${i}/tables/${e.childTableName}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,l.jsx)("b",{children:e.childTableName})})," ","in"," ",n?(0,l.jsxs)("span",{children:["this current database(",(0,l.jsx)("b",{children:a.db_name}),")."]}):(0,l.jsxs)(r().Fragment,{children:[(0,l.jsx)("a",{href:`/admin/${t?.id}/databases/${i}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,l.jsx)("b",{children:i})}),(0,l.jsx)("span",{children:"database."})]})," ",a?.active_clone?"":"Only Foreign keys and Entries can be updated."]}):(0,l.jsx)(r().Fragment,{})}},10621:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({message:e}){return(0,l.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,l.jsx)("span",{children:e})]})}t(82015)},22873:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(71205);async function s({request:e,databaseSlug:a,user:t,query:s}){try{let r=t.id,i=null;if(!s?.delegated)return{dbUserId:r};let n=s.dbUserId,d=`${process.env.DSQL_USER_DB_PREFIX}${n}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${d}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let t=(0,l.A)({encryptedString:e.cookies[o]});if(!t)throw Error("Invalid Token");if((i=JSON.parse(t)).databaseSlug===a)return{dbUserId:r=i.rootUserId,rootUserId:i.rootUserId,rootUserName:i.rootUserName,rootUserEmail:i.rootUserEmail,rootUserImage:i.rootUserImage,databaseFullName:i.databaseFullName,databaseSlug:i.databaseSlug,allowedTables:i.allowedTables,priviledges:i.priviledges,database:i.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:r}}catch(e){return null}}},24872:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(46169);async function s({tableName:e,columnName:a,value:t,dbFullName:s,dispatch:r,userId:i,dbId:n}){return await (0,l.A)(`/api/checkDuplicateData?tableName=${e}&type=${a}&value=${t}${s?"&dbFullName="+s:""}${i?"&userId="+i:""}${n?"&dbId="+n:""}`)}},7143:(e,a,t)=>{t.d(a,{A:()=>r});var l=t(27825),s=t(46169);function r({query:e,table:a,database:t,dbSchemaData:r,tableFields:i,tableIndexes:n,setLoading:d}){let o=[...r];try{let r=o.findIndex(e=>e.dbFullName===t.db_full_name),u=o[r].tables.findIndex(e=>e.tableName===a.tableName);if(o[r].tables[u].fields=i?l.cloneDeep(i):[],o[r].tables[u].indexes=n?l.cloneDeep(n):[],o[r].tables[u].fields.find(e=>e.newTempField)){window.alert("Please resolve all open fields before you save"),setTimeout(()=>{d?.(!1)},1e3);return}(0,s.A)("/api/updateDbSchemaDataForUser",{method:"post",body:{schema:o,database:t.db_slug,table:a,delegated:e?.delegated}},!0).then(e=>{e?.success?window.location.reload():(console.log("Res",e),window.alert(e?.msg||"Operation Failed. Please check permissions."))}).finally(()=>{d&&setTimeout(()=>{d(!1)},1e3)})}catch(e){window.alert(e.message),setTimeout(()=>{d?.(!1)},1e3);return}}},83690:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{EditTableContext:()=>h,default:()=>g,getServerSideProps:()=>x});var s=t(8732),r=t(82015),i=t.n(r),n=t(25562),d=t(92702),o=t(55880),u=t(9723),c=t(22873),b=t(71934),m=t(72272),p=e([o,u]);[o,u]=p.then?(await p)():p;let h=i().createContext({});function g({user:e,database:a,table:t,dbSchemaData:l,query:r,confirmedDelegetedUser:d}){let c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Edit Table | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Edit Table"})]}),[b,m]=i().useState(t.fields),[p,g]=i().useState(null),[x,f]=i().useState(0),_=i().useRef();return(0,s.jsx)(n.A,{head:c,user:e,extraHeaderContent:(0,s.jsx)(o.A,{database:a,query:r,confirmedDelegetedUser:d,user:e}),children:(0,s.jsx)(h.Provider,{value:{user:e,database:a,table:t,tableFields:b,setTableFields:m,targetField:p,setTargetField:g,pageRefresh:x,setPageRefresh:f,refreshFieldsListRef:_,dbSchemaData:l,query:r,confirmedDelegetedUser:d},children:(0,s.jsx)(u.A,{})})})}async function x({req:e,res:a,query:t}){try{let l=await (0,d.default)(e,a);if(!l?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await (0,c.A)({request:e,user:l,databaseSlug:t.single,query:t});if(!s)throw Error("No Db Object Found!");let{dbUserId:r,rootUserId:i}=s,n=await (0,b.A)(`SELECT * FROM user_databases WHERE user_id='${r}' AND db_slug='${t.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};let o=(0,m.A)({userId:Number(r)});if(!o)throw Error("User schema data not found!");let u=o.filter(e=>e.dbFullName===n[0].db_full_name)?.[0]?.tables,p=u?.filter(e=>e.tableName===t.single_table)[0];if(!u||!p)return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};return{props:{user:l,database:n[0],dbSchemaData:o,table:p,query:t,confirmedDelegetedUser:s}}}catch(e){return{redirect:{destination:"/",permanent:!1}}}}l()}catch(e){l(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),l=a.X(0,[883,9821,6521,9796,5392,3634,3155,3791,9901],()=>t(98347));module.exports=l})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js.nft.json index e9d1b2b..e0df807 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/edit-table.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../../node_modules/gsap/package.json","../../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1614.js","../../../../../../../chunks/2414.js","../../../../../../../chunks/2451.js","../../../../../../../chunks/2996.js","../../../../../../../chunks/3247.js","../../../../../../../chunks/3460.js","../../../../../../../chunks/3737.js","../../../../../../../chunks/3932.js","../../../../../../../chunks/4050.js","../../../../../../../chunks/4312.js","../../../../../../../chunks/4333.js","../../../../../../../chunks/4385.js","../../../../../../../chunks/45.js","../../../../../../../chunks/5134.js","../../../../../../../chunks/5212.js","../../../../../../../chunks/5264.js","../../../../../../../chunks/5421.js","../../../../../../../chunks/5664.js","../../../../../../../chunks/5674.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/7070.js","../../../../../../../chunks/7640.js","../../../../../../../chunks/8540.js","../../../../../../../chunks/8613.js","../../../../../../../chunks/883.js","../../../../../../../chunks/8842.js","../../../../../../../chunks/9600.js","../../../../../../../chunks/9621.js","../../../../../../../chunks/9732.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9914.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../../node_modules/gsap/package.json","../../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1251.js","../../../../../../../chunks/1579.js","../../../../../../../chunks/194.js","../../../../../../../chunks/2282.js","../../../../../../../chunks/3155.js","../../../../../../../chunks/3474.js","../../../../../../../chunks/3496.js","../../../../../../../chunks/3634.js","../../../../../../../chunks/3704.js","../../../../../../../chunks/3791.js","../../../../../../../chunks/4627.js","../../../../../../../chunks/5392.js","../../../../../../../chunks/5839.js","../../../../../../../chunks/5954.js","../../../../../../../chunks/6160.js","../../../../../../../chunks/6202.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/6622.js","../../../../../../../chunks/6903.js","../../../../../../../chunks/725.js","../../../../../../../chunks/7713.js","../../../../../../../chunks/8704.js","../../../../../../../chunks/8760.js","../../../../../../../chunks/883.js","../../../../../../../chunks/9796.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9901.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js index 9670f30..96a4977 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js @@ -1,17 +1,17 @@ -"use strict";(()=>{var e={};e.id=6930,e.ids=[6930],e.modules={26364:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>x,default:()=>p,getServerSideProps:()=>g,getStaticPaths:()=>c,getStaticProps:()=>m,reportWebVitals:()=>h,routeModule:()=>y,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>I,unstable_getStaticProps:()=>T});var s=r(63865),i=r(9455),n=r(30671),l=r(49407),o=r(89600),u=r(98842),d=e([u]);u=(d.then?(await d)():d)[0];let p=(0,n.M)(u,"default"),m=(0,n.M)(u,"getStaticProps"),c=(0,n.M)(u,"getStaticPaths"),g=(0,n.M)(u,"getServerSideProps"),x=(0,n.M)(u,"config"),h=(0,n.M)(u,"reportWebVitals"),T=(0,n.M)(u,"unstable_getStaticProps"),I=(0,n.M)(u,"unstable_getStaticPaths"),S=(0,n.M)(u,"unstable_getStaticParams"),f=(0,n.M)(u,"unstable_getServerProps"),v=(0,n.M)(u,"unstable_getServerSideProps"),y=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:u});a()}catch(e){a(e)}})},63014:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(64030);function s({paradigm:e,table:t,query:r,user:s}){let i="";try{let s=`DSQL_${r.single}_${r.single_table}`.toUpperCase(),l=t.fields;function n(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let o=[],u=[];o.push(`type ${s} = {`),u.push(`/** - * @typedef {object} ${s}`),l.forEach(e=>{let t=e.nullValue?"?":e.fieldName?.match(a.A)?"?":"";o.push(` ${e.fieldName}${t}: ${n(e.dataType||"")};`),u.push(` * @property {${n(e.dataType||"")}${t}} ${e.fieldName}`)}),o.push("}"),u.push(" */"),e?.match(/javascript/i)&&(i=u.join("\n")),e?.match(/typescript/i)&&(i=o.join("\n"))}catch(e){console.log(e.message),i=null}return i}},39897:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(8732);function s({collapse:e,setCollapse:t}){return(0,a.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:r=>{e?t(!1):t(!0)},children:[(0,a.jsx)("span",{children:e?"Expand":"Collapse"}),(0,a.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,a.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}r(82015)},2817:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(8732);function s({children:e,open:t,setOpen:r,onClose:s,maxWidth:i}){return(0,a.jsx)(a.Fragment,{})}r(82015),r(1976),r(58150)},64030:(e,t,r)=>{r.d(t,{A:()=>a});let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},22373:(e,t,r)=>{let a=r(29021),{IncomingMessage:s}=r(81630);e.exports=async function({user:e,message:t,component:r,noMail:s,req:i}){let n=new Date,l=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],t=i.headers["x-real-ip"],r=i.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||a||t||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=6930,e.ids=[6930],e.modules={52738:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>x,default:()=>p,getServerSideProps:()=>g,getStaticPaths:()=>c,getStaticProps:()=>m,reportWebVitals:()=>h,routeModule:()=>y,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>I,unstable_getStaticProps:()=>T});var i=r(63865),s=r(9455),n=r(30671),l=r(5583),o=r(19796),u=r(78704),d=e([u]);u=(d.then?(await d)():d)[0];let p=(0,n.M)(u,"default"),m=(0,n.M)(u,"getStaticProps"),c=(0,n.M)(u,"getStaticPaths"),g=(0,n.M)(u,"getServerSideProps"),x=(0,n.M)(u,"config"),h=(0,n.M)(u,"reportWebVitals"),T=(0,n.M)(u,"unstable_getStaticProps"),I=(0,n.M)(u,"unstable_getStaticPaths"),S=(0,n.M)(u,"unstable_getStaticParams"),f=(0,n.M)(u,"unstable_getServerProps"),v=(0,n.M)(u,"unstable_getServerSideProps"),y=new i.PagesRouteModule({definition:{kind:s.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:u});a()}catch(e){a(e)}})},60424:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(42960);function i({paradigm:e,table:t,query:r,user:i}){let s="";try{let i=`DSQL_${r.single}_${r.single_table}`.toUpperCase(),l=t.fields;function n(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let o=[],u=[];o.push(`type ${i} = {`),u.push(`/** + * @typedef {object} ${i}`),l.forEach(e=>{let t=e.nullValue?"?":e.fieldName?.match(a.A)?"?":"";o.push(` ${e.fieldName}${t}: ${n(e.dataType||"")};`),u.push(` * @property {${n(e.dataType||"")}${t}} ${e.fieldName}`)}),o.push("}"),u.push(" */"),e?.match(/javascript/i)&&(s=u.join("\n")),e?.match(/typescript/i)&&(s=o.join("\n"))}catch(e){console.log(e.message),s=null}return s}},51339:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(8732);function i({collapse:e,setCollapse:t}){return(0,a.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:r=>{e?t(!1):t(!0)},children:[(0,a.jsx)("span",{children:e?"Expand":"Collapse"}),(0,a.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,a.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}r(82015)},84483:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(8732);function i({children:e,open:t,setOpen:r,onClose:i,maxWidth:s}){return(0,a.jsx)(a.Fragment,{})}r(82015),r(1976),r(58150)},42960:(e,t,r)=>{r.d(t,{A:()=>a});let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},77047:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(29021),i=r.n(a);async function s({user:e,message:t,component:r,noMail:a,req:s}){let n=new Date,l=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],t=s.headers["x-real-ip"],r=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],i=r||a||t||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${t} -Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(s+=` -URL: ${i.url}`),i?.body&&(s+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),l&&(s+=` -IP: ${l}`),s+=` +User Email: ${e?.email}`),s?.url&&(a+=` +URL: ${s.url}`),s?.body&&(a+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),l&&(a+=` +IP: ${l}`),a+=` Date: ${n.toDateString()} -========================================`,a.existsSync("./.tmp/error.log")||a.writeFileSync("./.tmp/error.log","","utf-8");let o=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",s),a.appendFileSync("./.tmp/error.log",` +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let o=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",a),i().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,6521,9600,7070,5134,3737,9621,9732,8842],()=>r(26364));module.exports=a})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,6521,9796,5392,3634,3155,3791,725,4627,8704],()=>r(52738));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js.nft.json index d34e653..68c89aa 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../../../../../node_modules/prop-types/node_modules/react-is/package.json","../../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react-tiny-popover/dist/ArrowContainer.js","../../../../../../../../../node_modules/react-tiny-popover/dist/Popover.js","../../../../../../../../../node_modules/react-tiny-popover/dist/PopoverPortal.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useArrowContainer.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useElementRef.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useHandlePrevValues.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useMemoizedArray.js","../../../../../../../../../node_modules/react-tiny-popover/dist/usePopover.js","../../../../../../../../../node_modules/react-tiny-popover/dist/util.js","../../../../../../../../../node_modules/react-tiny-popover/package.json","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1614.js","../../../../../../../chunks/2414.js","../../../../../../../chunks/2451.js","../../../../../../../chunks/2996.js","../../../../../../../chunks/3247.js","../../../../../../../chunks/3460.js","../../../../../../../chunks/3737.js","../../../../../../../chunks/3932.js","../../../../../../../chunks/4050.js","../../../../../../../chunks/4312.js","../../../../../../../chunks/4333.js","../../../../../../../chunks/4385.js","../../../../../../../chunks/45.js","../../../../../../../chunks/5134.js","../../../../../../../chunks/5212.js","../../../../../../../chunks/5264.js","../../../../../../../chunks/5421.js","../../../../../../../chunks/5664.js","../../../../../../../chunks/5674.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/7070.js","../../../../../../../chunks/7640.js","../../../../../../../chunks/8540.js","../../../../../../../chunks/8613.js","../../../../../../../chunks/883.js","../../../../../../../chunks/8842.js","../../../../../../../chunks/9600.js","../../../../../../../chunks/9621.js","../../../../../../../chunks/9732.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9914.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react-is/cjs/react-is.development.js","../../../../../../../../../node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../../node_modules/react-is/index.js","../../../../../../../../../node_modules/react-is/package.json","../../../../../../../../../node_modules/react-tiny-popover/dist/ArrowContainer.js","../../../../../../../../../node_modules/react-tiny-popover/dist/Popover.js","../../../../../../../../../node_modules/react-tiny-popover/dist/PopoverPortal.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useArrowContainer.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useElementRef.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useHandlePrevValues.js","../../../../../../../../../node_modules/react-tiny-popover/dist/useMemoizedArray.js","../../../../../../../../../node_modules/react-tiny-popover/dist/usePopover.js","../../../../../../../../../node_modules/react-tiny-popover/dist/util.js","../../../../../../../../../node_modules/react-tiny-popover/package.json","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1251.js","../../../../../../../chunks/1579.js","../../../../../../../chunks/194.js","../../../../../../../chunks/2282.js","../../../../../../../chunks/3155.js","../../../../../../../chunks/3474.js","../../../../../../../chunks/3496.js","../../../../../../../chunks/3634.js","../../../../../../../chunks/3704.js","../../../../../../../chunks/3791.js","../../../../../../../chunks/4627.js","../../../../../../../chunks/5392.js","../../../../../../../chunks/5839.js","../../../../../../../chunks/5954.js","../../../../../../../chunks/6160.js","../../../../../../../chunks/6202.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/6622.js","../../../../../../../chunks/6903.js","../../../../../../../chunks/725.js","../../../../../../../chunks/7713.js","../../../../../../../chunks/8704.js","../../../../../../../chunks/8760.js","../../../../../../../chunks/883.js","../../../../../../../chunks/9796.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9901.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js index 9db3625..62f3e59 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js @@ -1,17 +1,17 @@ -"use strict";(()=>{var e={};e.id=794,e.ids=[794],e.modules={76387:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>x,default:()=>c,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>m,reportWebVitals:()=>b,routeModule:()=>E,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>h});var s=a(63865),n=a(9455),i=a(30671),l=a(49407),d=a(89600),o=a(2359),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,i.M)(o,"default"),m=(0,i.M)(o,"getStaticProps"),p=(0,i.M)(o,"getStaticPaths"),g=(0,i.M)(o,"getServerSideProps"),x=(0,i.M)(o,"config"),b=(0,i.M)(o,"reportWebVitals"),h=(0,i.M)(o,"unstable_getStaticProps"),y=(0,i.M)(o,"unstable_getStaticPaths"),f=(0,i.M)(o,"unstable_getStaticParams"),S=(0,i.M)(o,"unstable_getServerProps"),N=(0,i.M)(o,"unstable_getServerSideProps"),E=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]",bundlePath:"",filename:""},components:{App:d.default,Document:l.default},userland:o});r()}catch(e){r(e)}})},52092:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>u});var s=a(8732),n=a(82015),i=a.n(n),l=a(2359);a(63715);var d=a(51548),o=e([l]);function u(e){let{entry:t,targetEntry:a,database:r,table:n,user:o}=i().useContext(l.SingleEntryContext),[u,c]=i().useState([]),m=(()=>{let e=Object.keys(t);return e[1].match(/uuid/i)?e[2]:e[1]})();return u?.[0]?(0,s.jsx)("div",{className:"row gap-3 flex-wrap min-w-[80px]",children:(0,s.jsx)(d.A,{selectOptions:u.map(e=>({title:e.title||e.slug||e.full_name||e[m]||e.id,payload:e.id,default:t.id==e.id})),onChangeHandler:e=>{let t=`/admin/${o?.id}/databases/${r.db_slug}/tables/${n.tableName}/entries/${e.target.value}`;window.location.href=`${t}${window.location.search}`}})}):null}l=(o.then?(await o)():o)[0],r()}catch(e){r(e)}})},13605:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>h});var s=a(8732),n=a(82015),i=a.n(n),l=a(2359),d=a(46437),o=a(58548),u=a(94010),c=a(34486),m=a(89579),p=a(86571),g=a(82972),x=a(52092),b=e([l,u,c,g,x]);function h(e){let{user:t,database:r,table:n,dbSchemaData:c,entry:b,setTargetEntry:h,richTextEditors:y,jsonTextEditors:f,query:S,confirmedDelegetedUser:N}=i().useContext(l.SingleEntryContext),E=a(94327);return N?.delegated,N?.priviledges?.match(/Edit Tables/i),N?.priviledges?.match(/Delete Tables/i),N?.priviledges?.match(/Create Tables/i),N?.priviledges?.match(/Edit Entries/i),N?.priviledges?.match(/Delete Entries/i),(0,s.jsxs)(i().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(d.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsxs)("span",{className:"inline-block",children:[(0,s.jsxs)("span",{className:"bg-slate-100 dark:bg-slate-800 px-2 py-1 border border-solid border-slate-400 dark:border-slate-600 rounded relative",children:[n?.tableFullName,(0,s.jsx)("div",{className:"absolute -top-5 -right-4",children:n?.tableName&&(0,s.jsx)(u.A,{slugText:n.tableName,justIcon:!0})})]})," ","Table Entry #"]}),(0,s.jsx)("span",{children:b.id})]})]}),(0,s.jsxs)("div",{className:"flex-wrap",children:[r&&n?(0,s.jsxs)("a",{href:`/admin/${t?.id}/databases/${r.db_slug}/tables/${n.tableName}/entries/add-entry`,className:"button flex items-center gap-2",children:[(0,s.jsx)("span",{className:"symbol",children:"+"}),(0,s.jsx)("span",{children:"Add New Entry"})]}):(0,s.jsx)("span",{children:"No Db and Table"}),(0,s.jsx)(g.A,{}),(0,s.jsx)(x.A,{})]})]}),(0,s.jsx)(o.A,{confirmedDelegetedUser:S?.delegated,user:t})]}),r?.active_clone?(0,s.jsx)(p.A,{database:r,user:t}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(m.A,{user:t,database:r,table:n,dbSchemaData:c,richTextEditors:y,dataTypes:E,entry:b,entryPage:!0,query:S,confirmedDelegetedUser:N,jsonTextEditors:f})]})}[l,u,c,g,x]=b.then?(await b)():b,r()}catch(e){r(e)}})},82972:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>o});var s=a(8732),n=a(82015),i=a.n(n),l=a(2359),d=e([l]);function o(e){let{prevEntry:t,nextEntry:a,database:r,table:n,user:d}=i().useContext(l.SingleEntryContext);return(0,s.jsxs)("div",{className:"row gap-3 flex-wrap",children:[t&&(0,s.jsx)("a",{href:`/admin/${d?.id}/databases/${r.db_slug}/tables/${n.tableName}/entries/${t.id}`,className:"button outlined gray",children:"Prev"}),a&&(0,s.jsx)("a",{href:`/admin/${d?.id}/databases/${r.db_slug}/tables/${n.tableName}/entries/${a.id}`,className:"button outlined gray",children:"Next"})]})}l=(d.then?(await d)():d)[0],r()}catch(e){r(e)}})},63014:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(64030);function s({paradigm:e,table:t,query:a,user:s}){let n="";try{let s=`DSQL_${a.single}_${a.single_table}`.toUpperCase(),l=t.fields;function i(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let d=[],o=[];d.push(`type ${s} = {`),o.push(`/** - * @typedef {object} ${s}`),l.forEach(e=>{let t=e.nullValue?"?":e.fieldName?.match(r.A)?"?":"";d.push(` ${e.fieldName}${t}: ${i(e.dataType||"")};`),o.push(` * @property {${i(e.dataType||"")}${t}} ${e.fieldName}`)}),d.push("}"),o.push(" */"),e?.match(/javascript/i)&&(n=o.join("\n")),e?.match(/typescript/i)&&(n=d.join("\n"))}catch(e){console.log(e.message),n=null}return n}},39897:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s({collapse:e,setCollapse:t}){return(0,r.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:a=>{e?t(!1):t(!0)},children:[(0,r.jsx)("span",{children:e?"Expand":"Collapse"}),(0,r.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,r.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}a(82015)},2817:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s({children:e,open:t,setOpen:a,onClose:s,maxWidth:n}){return(0,r.jsx)(r.Fragment,{})}a(82015),a(1976),a(58150)},64030:(e,t,a)=>{a.d(t,{A:()=>r});let r=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},22373:(e,t,a)=>{let r=a(29021),{IncomingMessage:s}=a(81630);e.exports=async function({user:e,message:t,component:a,noMail:s,req:n}){let i=new Date,l=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],a=n.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],s=a||r||t||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=794,e.ids=[794],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},7213:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>y,default:()=>u,getServerSideProps:()=>h,getStaticPaths:()=>m,getStaticProps:()=>p,reportWebVitals:()=>x,routeModule:()=>E,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>g});var s=a(63865),l=a(9455),i=a(30671),n=a(5583),d=a(19796),c=a(51325),o=e([c]);c=(o.then?(await o)():o)[0];let u=(0,i.M)(c,"default"),p=(0,i.M)(c,"getStaticProps"),m=(0,i.M)(c,"getStaticPaths"),h=(0,i.M)(c,"getServerSideProps"),y=(0,i.M)(c,"config"),x=(0,i.M)(c,"reportWebVitals"),g=(0,i.M)(c,"unstable_getStaticProps"),b=(0,i.M)(c,"unstable_getStaticPaths"),f=(0,i.M)(c,"unstable_getStaticParams"),A=(0,i.M)(c,"unstable_getServerProps"),v=(0,i.M)(c,"unstable_getServerSideProps"),E=new s.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry]",bundlePath:"",filename:""},components:{App:d.default,Document:n.default},userland:c});r()}catch(e){r(e)}})},47198:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>o});var s=a(8732),l=a(82015),i=a.n(l),n=a(51325);a(46169);var d=a(80830),c=e([n]);function o(){let{entry:e,targetEntry:t,database:a,table:r,user:l}=i().useContext(n.SingleEntryContext),[c,o]=i().useState([]),u=(()=>{let t=Object.keys(e);return t[1].match(/uuid/i)?t[2]:t[1]})();return c?.[0]?(0,s.jsx)("div",{className:"row gap-3 flex-wrap min-w-[80px]",children:(0,s.jsx)(d.A,{selectOptions:c.map(t=>({title:t.title||t.slug||t.full_name||t[u]||t.id,payload:t.id,default:e.id==t.id})),onChangeHandler:e=>{let t=`/admin/${l?.id}/databases/${a.db_slug}/tables/${r.tableName}/entries/${e.target.value}`;window.location.href=`${t}${window.location.search}`}})}):null}n=(c.then?(await c)():c)[0],r()}catch(e){r(e)}})},15:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>x});var s=a(8732),l=a(82015),i=a.n(l),n=a(51325),d=a(59023),c=a(53926),o=a(73872),u=a(23180),p=a(537),m=a(12254),h=a(47198),y=e([n,o,m,h]);function x(){let{user:e,database:t,table:r,dbSchemaData:l,entry:y,setTargetEntry:x,richTextEditors:g,jsonTextEditors:b,query:f,confirmedDelegetedUser:A}=i().useContext(n.SingleEntryContext),v=a(94327);return A?.delegated,A?.priviledges?.match(/Edit Tables/i),A?.priviledges?.match(/Delete Tables/i),A?.priviledges?.match(/Create Tables/i),A?.priviledges?.match(/Edit Entries/i),A?.priviledges?.match(/Delete Entries/i),(0,s.jsxs)(i().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(d.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsxs)("span",{className:"inline-block",children:[(0,s.jsxs)("span",{className:"bg-slate-100 dark:bg-slate-800 px-2 py-1 border border-solid border-slate-400 dark:border-slate-600 rounded relative",children:[r?.tableFullName,(0,s.jsx)("div",{className:"absolute -top-5 -right-4",children:r?.tableName&&(0,s.jsx)(o.A,{slugText:r.tableName,justIcon:!0})})]})," ","Table Entry #"]}),(0,s.jsx)("span",{children:y.id})]})]}),(0,s.jsxs)("div",{className:"flex-wrap",children:[t&&r?(0,s.jsxs)("a",{href:`/admin/${e?.id}/databases/${t.db_slug}/tables/${r.tableName}/entries/add-entry`,className:"button flex items-center gap-2",children:[(0,s.jsx)("span",{className:"symbol",children:"+"}),(0,s.jsx)("span",{children:"Add New Entry"})]}):(0,s.jsx)("span",{children:"No Db and Table"}),(0,s.jsx)(m.A,{}),(0,s.jsx)(h.A,{})]})]}),(0,s.jsx)(c.A,{confirmedDelegetedUser:f?.delegated,user:e})]}),t?.active_clone?(0,s.jsx)(p.A,{database:t,user:e}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(u.A,{user:e,database:t,table:r,dbSchemaData:l,richTextEditors:g,dataTypes:v,entry:y,entryPage:!0,query:f,confirmedDelegetedUser:A,jsonTextEditors:b})]})}[n,o,m,h]=y.then?(await y)():y,r()}catch(e){r(e)}})},12254:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>c});var s=a(8732),l=a(82015),i=a.n(l),n=a(51325),d=e([n]);function c(){let{prevEntry:e,nextEntry:t,database:a,table:r,user:l}=i().useContext(n.SingleEntryContext);return(0,s.jsxs)("div",{className:"row gap-3 flex-wrap",children:[e&&(0,s.jsx)("a",{href:`/admin/${l?.id}/databases/${a.db_slug}/tables/${r.tableName}/entries/${e.id}`,className:"button outlined gray",children:"Prev"}),t&&(0,s.jsx)("a",{href:`/admin/${l?.id}/databases/${a.db_slug}/tables/${r.tableName}/entries/${t.id}`,className:"button outlined gray",children:"Next"})]})}n=(d.then?(await d)():d)[0],r()}catch(e){r(e)}})},60424:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(42960);function s({paradigm:e,table:t,query:a,user:s}){let l="";try{let s=`DSQL_${a.single}_${a.single_table}`.toUpperCase(),n=t.fields;function i(e){return e?.match(/int/i)?"number":(e?.match(/text|varchar|timestamp/i),"string")}let d=[],c=[];d.push(`type ${s} = {`),c.push(`/** + * @typedef {object} ${s}`),n.forEach(e=>{let t=e.nullValue?"?":e.fieldName?.match(r.A)?"?":"";d.push(` ${e.fieldName}${t}: ${i(e.dataType||"")};`),c.push(` * @property {${i(e.dataType||"")}${t}} ${e.fieldName}`)}),d.push("}"),c.push(" */"),e?.match(/javascript/i)&&(l=c.join("\n")),e?.match(/typescript/i)&&(l=d.join("\n"))}catch(e){console.log(e.message),l=null}return l}},537:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s({database:e,user:t}){let a=e.active_clone_parent_db?.replace(/datasquirel_user_\d+_/,""),s=`/admin/${t?.id}/databases/${a}`;return(0,r.jsx)("div",{className:"info green",children:(0,r.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,r.jsx)("b",{children:(0,r.jsx)("a",{href:s,target:"_blank",className:"query-url",children:a})})]})})}a(82015)},51339:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s({collapse:e,setCollapse:t}){return(0,r.jsxs)("div",{className:"collapse-block"+(e?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:a=>{e?t(!1):t(!0)},children:[(0,r.jsx)("span",{children:e?"Expand":"Collapse"}),(0,r.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(e?"":"rotate-180")}),(0,r.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(e?"":"rotate-180")})]})}a(82015)},42960:(e,t,a)=>{a.d(t,{A:()=>r});let r=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},23293:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},77047:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(29021),s=a.n(r);async function l({user:e,message:t,component:a,noMail:r,req:l}){let i=new Date,n=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],t=l.headers["x-real-ip"],a=l.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],s=a||r||t||l.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== Error Message: ${t} -Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(s+=` -URL: ${n.url}`),n?.body&&(s+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),l&&(s+=` -IP: ${l}`),s+=` +User Email: ${e?.email}`),l?.url&&(r+=` +URL: ${l.url}`),l?.body&&(r+=` +Request Body: ${JSON.stringify(l.body,null,4)}`),n&&(r+=` +IP: ${n}`),r+=` Date: ${i.toDateString()} -========================================`,r.existsSync("./.tmp/error.log")||r.writeFileSync("./.tmp/error.log","","utf-8");let d=r.readFileSync("./.tmp/error.log","utf-8");r.writeFileSync("./.tmp/error.log",s),r.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let d=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",r),s().appendFileSync("./.tmp/error.log",` -${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},2359:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{SingleEntryContext:()=>v,default:()=>E,getServerSideProps:()=>T});var s=a(8732),n=a(82015),i=a.n(n),l=a(20048),d=a.n(l),o=a(95222),u=a(64098),c=a(90378),m=a.n(c),p=a(13605),g=a(31651),x=a.n(g),b=a(22373),h=a.n(b),y=a(67216),f=a.n(y),S=a(11169),N=e([u,p]);[u,p]=N.then?(await N)():N;let _=a(29021),v=i().createContext({});function E({user:e,database:t,table:a,dbSchemaData:r,entry:n,query:l,confirmedDelegetedUser:d,prevEntry:c,nextEntry:m}){let g=`${a.tableFullName} Table | Datasquirel`,x=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:g}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),[b,h]=i().useState(n),y=i().useRef([]),f=i().useRef([]);return(0,s.jsx)(o.A,{head:x,user:e,extraHeaderContent:(0,s.jsx)(u.A,{database:t,query:l,confirmedDelegetedUser:d,user:e}),aceEditor:!0,children:(0,s.jsxs)(v.Provider,{value:{user:e,database:t,table:a,dbSchemaData:r,entry:n,richTextEditors:y,jsonTextEditors:f,targetEntry:b,setTargetEntry:h,query:l,confirmedDelegetedUser:d,prevEntry:c,nextEntry:m},children:[(0,s.jsx)(p.A,{}),(0,s.jsx)(S.A,{snug:!0})]})})}async function T({req:e,res:t,query:a}){let r=await d()(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t=a.single,s=await x()({request:e,user:r,databaseSlug:t,query:a});if(!s)throw Error("No Db Object Found!");let{dbUserId:n,rootUserId:i}=s,l=await f()(`SELECT * FROM user_databases WHERE user_id='${n}' AND db_slug='${a.single}'`);if(!l||!l[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let d=JSON.parse(_.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${n}/main.json`,"utf-8")),o=(d.filter(e=>e.dbFullName===l[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0],u=await m()({database:l[0].db_full_name,queryString:`SELECT * FROM ${o.tableName} WHERE id='${a.single_entry}'`,tableSchema:o});if(!u?.[0])return{redirect:{destination:`/admin/${r?.id}/databases/${l[0].db_slug}/tables/${o.tableName}/entries`,permanent:!1}};let c=u[0],p=await m()({database:l[0].db_full_name,queryString:`SELECT id FROM ${o.tableName} WHERE id > '${a.single_entry}' LIMIT 1`,tableSchema:o}),g=await m()({database:l[0].db_full_name,queryString:`SELECT id FROM ${o.tableName} WHERE id < '${a.single_entry}' ORDER BY id DESC LIMIT 1`,tableSchema:o});return{props:{user:r,database:l[0],table:o,dbSchemaData:d,entry:c,query:a,confirmedDelegetedUser:s,nextEntry:p?.[0]||null,prevEntry:g?.[0]||null}}}catch(e){return h()({component:"[single_entry]-page-component/getServerSideProps/catch-error",message:e.message,user:r}),{props:{user:r,database:null,table:null,entry:null}}}}r()}catch(e){r(e)}})},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,6521,9600,7070,5134,3737,9621,9732,8842],()=>a(76387));module.exports=r})(); \ No newline at end of file +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},51325:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{SingleEntryContext:()=>A,default:()=>g,getServerSideProps:()=>b});var s=a(8732),l=a(82015),i=a.n(l),n=a(92702),d=a(25562),c=a(55880),o=a(52854),u=a(15),p=a(22873),m=a(77047),h=a(71934),y=a(43363),x=e([c,u]);[c,u]=x.then?(await x)():x;let f=a(29021),A=i().createContext({});function g({user:e,database:t,table:a,dbSchemaData:r,entry:l,query:n,confirmedDelegetedUser:o,prevEntry:p,nextEntry:m}){let h=`${a.tableFullName} Table | Datasquirel`,x=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:h}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),[g,b]=i().useState(l),f=i().useRef([]),v=i().useRef([]);return(0,s.jsx)(d.A,{head:x,user:e,extraHeaderContent:(0,s.jsx)(c.A,{database:t,query:n,confirmedDelegetedUser:o,user:e}),aceEditor:!0,children:(0,s.jsxs)(A.Provider,{value:{user:e,database:t,table:a,dbSchemaData:r,entry:l,richTextEditors:f,jsonTextEditors:v,targetEntry:g,setTargetEntry:b,query:n,confirmedDelegetedUser:o,prevEntry:p,nextEntry:m},children:[(0,s.jsx)(u.A,{}),(0,s.jsx)(y.A,{snug:!0})]})})}async function b({req:e,res:t,query:a}){let r=await (0,n.default)(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t=a.single,s=await (0,p.A)({request:e,user:r,databaseSlug:t,query:a});if(!s)throw Error("No Db Object Found!");let{dbUserId:l,rootUserId:i}=s,n=await (0,h.A)(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${a.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let d=n[0].db_full_name,c=JSON.parse(f.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l}/main.json`,"utf-8")),u=(c.filter(e=>e.dbFullName===n[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0],m=await (0,o.A)({database:d,queryString:`SELECT * FROM ${d}.${u.tableName} WHERE id='${a.single_entry}'`,tableSchema:u});if(!m?.[0])return{redirect:{destination:`/admin/${r?.id}/databases/${n[0].db_slug}/tables/${u.tableName}/entries`,permanent:!1}};let y=m[0],x=await (0,o.A)({database:d,queryString:`SELECT id FROM ${d}.${u.tableName} WHERE id > '${a.single_entry}' LIMIT 1`,tableSchema:u}),g=await (0,o.A)({database:d,queryString:`SELECT id FROM ${d}.${u.tableName} WHERE id < '${a.single_entry}' ORDER BY id DESC LIMIT 1`,tableSchema:u});return{props:{user:r,database:n[0],table:u,dbSchemaData:c,entry:y,query:a,confirmedDelegetedUser:s,nextEntry:x?.[0]||null,prevEntry:g?.[0]||null}}}catch(e){return(0,m.A)({component:"[single_entry]-page-component/getServerSideProps/catch-error",message:e.message,user:r}),{props:{user:r,database:null,table:null,entry:null}}}}r()}catch(e){r(e)}})},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},41836:e=>{e.exports=require("react-tiny-popover")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,9796,5392,3634,725,4627],()=>a(7213));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js.nft.json index 3b3b4f0..7293c05 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/[single_entry].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../../node_modules/next/head.js","../../../../../../../../../../node_modules/next/package.json","../../../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/package.json","../../../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/ArrowContainer.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/Popover.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/PopoverPortal.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useArrowContainer.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useElementRef.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useHandlePrevValues.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useMemoizedArray.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/usePopover.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/util.js","../../../../../../../../../../node_modules/react-tiny-popover/package.json","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../../node_modules/react/index.js","../../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../../node_modules/react/package.json","../../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../../package.json","../../../../../../../../../package.json","../../../../../../../../chunks/1614.js","../../../../../../../../chunks/2414.js","../../../../../../../../chunks/2451.js","../../../../../../../../chunks/2996.js","../../../../../../../../chunks/3247.js","../../../../../../../../chunks/3460.js","../../../../../../../../chunks/3737.js","../../../../../../../../chunks/3932.js","../../../../../../../../chunks/4050.js","../../../../../../../../chunks/4312.js","../../../../../../../../chunks/4333.js","../../../../../../../../chunks/4385.js","../../../../../../../../chunks/45.js","../../../../../../../../chunks/5134.js","../../../../../../../../chunks/5212.js","../../../../../../../../chunks/5264.js","../../../../../../../../chunks/5421.js","../../../../../../../../chunks/5664.js","../../../../../../../../chunks/5674.js","../../../../../../../../chunks/6521.js","../../../../../../../../chunks/7070.js","../../../../../../../../chunks/7640.js","../../../../../../../../chunks/8540.js","../../../../../../../../chunks/8613.js","../../../../../../../../chunks/883.js","../../../../../../../../chunks/8842.js","../../../../../../../../chunks/9600.js","../../../../../../../../chunks/9621.js","../../../../../../../../chunks/9732.js","../../../../../../../../chunks/9821.js","../../../../../../../../chunks/9914.js","../../../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../../node_modules/next/head.js","../../../../../../../../../../node_modules/next/package.json","../../../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../../node_modules/react-is/cjs/react-is.development.js","../../../../../../../../../../node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../../../node_modules/react-is/index.js","../../../../../../../../../../node_modules/react-is/package.json","../../../../../../../../../../node_modules/react-tiny-popover/dist/ArrowContainer.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/Popover.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/PopoverPortal.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useArrowContainer.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useElementRef.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useHandlePrevValues.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/useMemoizedArray.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/usePopover.js","../../../../../../../../../../node_modules/react-tiny-popover/dist/util.js","../../../../../../../../../../node_modules/react-tiny-popover/package.json","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../../node_modules/react/index.js","../../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../../node_modules/react/package.json","../../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../../package.json","../../../../../../../../../package.json","../../../../../../../../chunks/1251.js","../../../../../../../../chunks/1579.js","../../../../../../../../chunks/194.js","../../../../../../../../chunks/2282.js","../../../../../../../../chunks/3155.js","../../../../../../../../chunks/3474.js","../../../../../../../../chunks/3496.js","../../../../../../../../chunks/3634.js","../../../../../../../../chunks/3704.js","../../../../../../../../chunks/3791.js","../../../../../../../../chunks/4627.js","../../../../../../../../chunks/5392.js","../../../../../../../../chunks/5839.js","../../../../../../../../chunks/5954.js","../../../../../../../../chunks/6160.js","../../../../../../../../chunks/6202.js","../../../../../../../../chunks/6521.js","../../../../../../../../chunks/6622.js","../../../../../../../../chunks/6903.js","../../../../../../../../chunks/725.js","../../../../../../../../chunks/7713.js","../../../../../../../../chunks/8704.js","../../../../../../../../chunks/8760.js","../../../../../../../../chunks/883.js","../../../../../../../../chunks/9796.js","../../../../../../../../chunks/9821.js","../../../../../../../../chunks/9901.js","../../../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js index 5dcb87b..f6a9b26 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=2405,e.ids=[2405],e.modules={23821:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>x,default:()=>c,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>m,reportWebVitals:()=>b,routeModule:()=>E,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>T,unstable_getStaticPaths:()=>h,unstable_getStaticProps:()=>f});var s=a(63865),i=a(9455),l=a(30671),n=a(49407),d=a(89600),u=a(90488),o=e([u]);u=(o.then?(await o)():o)[0];let c=(0,l.M)(u,"default"),m=(0,l.M)(u,"getStaticProps"),p=(0,l.M)(u,"getStaticPaths"),g=(0,l.M)(u,"getServerSideProps"),x=(0,l.M)(u,"config"),b=(0,l.M)(u,"reportWebVitals"),f=(0,l.M)(u,"unstable_getStaticProps"),h=(0,l.M)(u,"unstable_getStaticPaths"),T=(0,l.M)(u,"unstable_getStaticParams"),y=(0,l.M)(u,"unstable_getServerProps"),N=(0,l.M)(u,"unstable_getServerSideProps"),E=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry",bundlePath:"",filename:""},components:{App:d.default,Document:n.default},userland:u});r()}catch(e){r(e)}})},84374:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>b});var s=a(8732),i=a(82015),l=a.n(i),n=a(90488),d=a(46437),u=a(58548),o=a(94010),c=a(58992),m=a(86571),p=a(65241),g=a(59621),x=e([n,o,c,g]);function b(e){let{user:t,database:a,table:r,dbSchemaData:i,query:x,confirmedDelegetedUser:b}=l().useContext(n.AddTableEntryContext);return b?.delegated,b?.priviledges?.match(/Edit Tables/i),b?.priviledges?.match(/Delete Tables/i),b?.priviledges?.match(/Create Tables/i),b?.priviledges?.match(/Edit Entries/i),b?.priviledges?.match(/Delete Entries/i),(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,s.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,s.jsxs)("div",{className:"flex-wrap",children:[(0,s.jsx)(d.A,{}),(0,s.jsx)("h1",{className:"text-3xl m-0",children:(0,s.jsxs)("span",{className:"flex gap-y-2 flex-wrap gap-x-2 items-center",children:["Add New Entry To"," ",(0,s.jsxs)("span",{className:"bg-slate-100 dark:bg-slate-800 px-2 py-1 border border-solid border-slate-400 dark:border-slate-600 rounded relative",children:[r.tableFullName,(0,s.jsx)("div",{className:"absolute -top-5 -right-4",children:(0,s.jsx)(o.A,{slugText:r.tableName,justIcon:!0})})]})," ","Table"]})})]})}),(0,s.jsx)(u.A,{confirmedDelegetedUser:x?.delegated,user:t})]}),a.active_clone?(0,s.jsx)(m.A,{database:a,user:t}):(0,s.jsx)(s.Fragment,{}),a.remote_connected?(0,s.jsx)(g.p,{database:a}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(p.A,{table:r,database:a,user:t}),(0,s.jsx)(c.A,{})]})}[n,o,c,g]=x.then?(await x)():x,r()}catch(e){r(e)}})},58992:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>p});var s=a(8732),i=a(82015),l=a.n(i),n=a(64030),d=a(90488),u=a(32415),o=a(81897),c=a(43965),m=e([d]);function p({}){let{user:e,database:t,table:r,dbSchemaData:i,richTextEditors:m,query:p,confirmedDelegetedUser:g,jsonTextEditors:x,duplicateEntry:b}=l().useContext(d.AddTableEntryContext),f=r.fields.filter(e=>!e.fieldName?.match(n.A)),h=a(94327);g?.delegated,g?.priviledges?.match(/Edit Tables/i),g?.priviledges?.match(/Delete Tables/i),g?.priviledges?.match(/Create Tables/i),g?.priviledges?.match(/Edit Entries/i),g?.priviledges?.match(/Delete Entries/i);let[T,y]=l().useState(!1),N=l().useRef([]),[E,S]=l().useState(b||null);return(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-xl m-0 mb-4",children:"Form Fields"}),p?.duplicate&&b&&(0,s.jsxs)("span",{className:"info gray",children:["This post is a duplicate of"," ",(0,s.jsx)("a",{href:`/admin/${e?.id}/databases/${t.db_slug}/tables/${r.tableName}/entries/${b.id}`,target:"_blank",children:b.title||`Entry #${b.id}`})]}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-8",onSubmit:e=>{(0,c.A)({e,currentRichTextEditorForms:N,database:t,filteredFields:f,jsonTextEditors:x,query:p,setLoading:y,table:r})},onKeyUp:e=>{e.ctrlKey&&"Enter"==e.key&&window.confirm("Add this Entry?")&&document.getElementById("add-entry-button")?.click()},children:[T&&(0,s.jsx)(u.A,{}),f.map((e,t)=>{let a=h.filter(t=>t.name===e.dataType?.replace(/\d|\(|\)/g,""));return(E&&e.fieldName&&(e.defaultValue=E[e.fieldName],e.defaultValueLiteral=E[e.fieldName]),e.defaultValueLiteral&&!E)?(0,s.jsx)(l().Fragment,{},t+1):(0,s.jsx)(o.A,{fieldObject:e,dataTypeSchema:a[0],richTextEditors:m,currentRichTextEditorForms:N,query:p,confirmedDelegetedUser:g,jsonTextEditors:x},t+1)}),(0,s.jsx)("button",{type:"submit",className:T?" pointer-events-none opacity-40":"",id:"add-entry-button",children:"Add Entry"})]})]})}d=(m.then?(await m)():m)[0],r()}catch(e){r(e)}})},64030:(e,t,a)=>{a.d(t,{A:()=>r});let r=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},43965:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(63715),s=a(86152);function i({e,setLoading:t,filteredFields:a,currentRichTextEditorForms:i,jsonTextEditors:l,database:n,table:d,query:u}){e.preventDefault(),t(!0);let o=e.target,c={};a.forEach(e=>{e?.fieldName&&o[e.fieldName]?.value&&(c[e.fieldName]=o[e.fieldName].value)}),i.current[0]&&i.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(c[e.fieldName]=e.ref.current.getContent())}),l.current[0]&&l.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(c[e.fieldName]=e.ref.current.getValue())});let m={dbSlug:n.db_slug,dbId:n.id,tableName:d.tableName,payload:c,tableSchema:d,delegated:u?.delegated};(0,r.A)("/api/addTableEntry",{method:"post",body:m},!0).then(e=>{e.success?(0,s.A)().then(()=>{window.location.pathname=window.location.pathname.replace(/\/add-entry.*?/,"")}):(window.alert(e.msg+"\n"+(e.err||"")),setTimeout(()=>{t(!1)},500))})}},22373:(e,t,a)=>{let r=a(29021),{IncomingMessage:s}=a(81630);e.exports=async function({user:e,message:t,component:a,noMail:s,req:i}){let l=new Date,n=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],t=i.headers["x-real-ip"],a=i.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],s=a||r||t||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2405,e.ids=[2405],e.modules={17723:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>b,default:()=>o,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>m,reportWebVitals:()=>x,routeModule:()=>E,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>T,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>h});var l=a(63865),s=a(9455),i=a(30671),n=a(5583),d=a(19796),c=a(62130),u=e([c]);c=(u.then?(await u)():u)[0];let o=(0,i.M)(c,"default"),m=(0,i.M)(c,"getStaticProps"),p=(0,i.M)(c,"getStaticPaths"),g=(0,i.M)(c,"getServerSideProps"),b=(0,i.M)(c,"config"),x=(0,i.M)(c,"reportWebVitals"),h=(0,i.M)(c,"unstable_getStaticProps"),f=(0,i.M)(c,"unstable_getStaticPaths"),T=(0,i.M)(c,"unstable_getStaticParams"),y=(0,i.M)(c,"unstable_getServerProps"),N=(0,i.M)(c,"unstable_getServerSideProps"),E=new l.PagesRouteModule({definition:{kind:s.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry",bundlePath:"",filename:""},components:{App:d.default,Document:n.default},userland:c});r()}catch(e){r(e)}})},20356:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>x});var l=a(8732),s=a(82015),i=a.n(s),n=a(62130),d=a(59023),c=a(53926),u=a(73872),o=a(79130),m=a(537),p=a(51275),g=a(23791),b=e([n,u,o,g]);function x(){let{user:e,database:t,table:a,dbSchemaData:r,query:s,confirmedDelegetedUser:b}=i().useContext(n.AddTableEntryContext);return b?.delegated,b?.priviledges?.match(/Edit Tables/i),b?.priviledges?.match(/Delete Tables/i),b?.priviledges?.match(/Create Tables/i),b?.priviledges?.match(/Edit Entries/i),b?.priviledges?.match(/Delete Entries/i),(0,l.jsxs)(i().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full relative z-50",children:[(0,l.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,l.jsxs)("div",{className:"flex-wrap",children:[(0,l.jsx)(d.A,{}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:(0,l.jsxs)("span",{className:"flex gap-y-2 flex-wrap gap-x-2 items-center",children:["Add New Entry To"," ",(0,l.jsxs)("span",{className:"bg-slate-100 dark:bg-slate-800 px-2 py-1 border border-solid border-slate-400 dark:border-slate-600 rounded relative",children:[a?.tableFullName,(0,l.jsx)("div",{className:"absolute -top-5 -right-4",children:(0,l.jsx)(u.A,{slugText:a?.tableName||"",justIcon:!0})})]})," ","Table"]})})]})}),(0,l.jsx)(c.A,{confirmedDelegetedUser:s?.delegated,user:e})]}),t?.active_clone?(0,l.jsx)(m.A,{database:t,user:e}):(0,l.jsx)(l.Fragment,{}),t?.remote_connected?(0,l.jsx)(g.p,{database:t}):(0,l.jsx)(l.Fragment,{}),a&&t&&e&&(0,l.jsx)(p.A,{table:a,database:t,user:e}),(0,l.jsx)(o.A,{})]})}[n,u,o,g]=b.then?(await b)():b,r()}catch(e){r(e)}})},79130:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>p});var l=a(8732),s=a(82015),i=a.n(s),n=a(42960),d=a(62130),c=a(16757),u=a(6748),o=a(19391),m=e([d]);function p({}){let{user:e,database:t,table:r,dbSchemaData:s,richTextEditors:m,query:p,confirmedDelegetedUser:g,jsonTextEditors:b,duplicateEntry:x}=i().useContext(d.AddTableEntryContext),h=r?.fields.filter(e=>!e.fieldName?.match(n.A)),f=a(94327);g?.delegated,g?.priviledges?.match(/Edit Tables/i),g?.priviledges?.match(/Delete Tables/i),g?.priviledges?.match(/Create Tables/i),g?.priviledges?.match(/Edit Entries/i),g?.priviledges?.match(/Delete Entries/i);let[T,y]=i().useState(!1),N=i().useRef([]),[E,v]=i().useState(x||null);return(0,l.jsxs)("section",{className:"paper",children:[(0,l.jsx)("h2",{className:"text-xl m-0 mb-4",children:"Form Fields"}),p?.duplicate&&x&&(0,l.jsxs)("span",{className:"info gray",children:["This post is a duplicate of"," ",(0,l.jsx)("a",{href:`/admin/${e?.id}/databases/${t.db_slug}/tables/${r.tableName}/entries/${x.id}`,target:"_blank",children:x.title||`Entry #${x.id}`})]}),(0,l.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-8",onSubmit:e=>{(0,o.A)({e,currentRichTextEditorForms:N,database:t,filteredFields:h,jsonTextEditors:b,query:p,setLoading:y,table:r})},onKeyUp:e=>{e.ctrlKey&&"Enter"==e.key&&window.confirm("Add this Entry?")&&document.getElementById("add-entry-button")?.click()},children:[T&&(0,l.jsx)(c.A,{}),h.map((e,t)=>{let a=f.filter(t=>t.name===e.dataType?.replace(/\d|\(|\)/g,""));return(E&&e.fieldName&&(e.defaultValue=E[e.fieldName],e.defaultValueLiteral=E[e.fieldName]),e.defaultValueLiteral&&!E)?(0,l.jsx)(i().Fragment,{},t+1):(0,l.jsx)(u.A,{fieldObject:e,dataTypeSchema:a[0],richTextEditors:m,currentRichTextEditorForms:N,query:p,confirmedDelegetedUser:g,jsonTextEditors:b},t+1)}),(0,l.jsx)("button",{type:"submit",className:T?" pointer-events-none opacity-40":"",id:"add-entry-button",children:"Add Entry"})]})]})}d=(m.then?(await m)():m)[0],r()}catch(e){r(e)}})},51275:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(8732),l=a(82015),s=a.n(l);function i({table:e,database:t,user:a,activeDbClone:l}){let i=e?.childTableDbFullName?e.childTableDbFullName.replace(new RegExp(/datasquirel_user_\d+_/),""):null,n=e.childTableDbFullName===t.db_full_name;return i?(0,r.jsxs)("span",{className:"info small green gap-1"+(t?.active_clone?" -mt-6":""),style:{fontWeight:"500"},children:["This Table is an active clone of"," ",(0,r.jsx)("a",{href:`/admin/${a?.id}/databases/${i}/tables/${e.childTableName}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,r.jsx)("b",{children:e.childTableName})})," ","in"," ",n?(0,r.jsxs)("span",{children:["this current database(",(0,r.jsx)("b",{children:t.db_name}),")."]}):(0,r.jsxs)(s().Fragment,{children:[(0,r.jsx)("a",{href:`/admin/${a?.id}/databases/${i}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,r.jsx)("b",{children:i})}),(0,r.jsx)("span",{children:"database."})]})," ",t?.active_clone?"":"Only Foreign keys and Entries can be updated."]}):(0,r.jsx)(s().Fragment,{})}},42960:(e,t,a)=>{a.d(t,{A:()=>r});let r=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},19391:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(46169),l=a(72390);function s({e,setLoading:t,filteredFields:a,currentRichTextEditorForms:s,jsonTextEditors:i,database:n,table:d,query:c}){e.preventDefault(),t(!0);let u=e.target,o={};a.forEach(e=>{e?.fieldName&&u[e.fieldName]?.value&&(o[e.fieldName]=u[e.fieldName].value)}),s.current[0]&&s.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(o[e.fieldName]=e.ref.current.getContent())}),i.current[0]&&i.current.forEach(e=>{e?.fieldName&&e?.ref?.current&&(o[e.fieldName]=e.ref.current.getValue())});let m={dbSlug:n.db_slug,dbId:n.id,tableName:d.tableName,payload:o,tableSchema:d,delegated:c?.delegated};(0,r.A)("/api/addTableEntry",{method:"post",body:m},!0).then(e=>{e.success?(0,l.A)().then(()=>{window.location.pathname=window.location.pathname.replace(/\/add-entry.*?/,"")}):(window.alert(e.msg+"\n"+(e.err||"")),setTimeout(()=>{t(!1)},500))})}},77047:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(29021),l=a.n(r);async function s({user:e,message:t,component:a,noMail:r,req:s}){let i=new Date,n=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],t=s.headers["x-real-ip"],a=s.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],l=a||r||t||s.socket.remoteAddress;if(!l)return null;return String(l)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== Error Message: ${t} -Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(s+=` -URL: ${i.url}`),i?.body&&(s+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),n&&(s+=` -IP: ${n}`),s+=` -Date: ${l.toDateString()} -========================================`,r.existsSync("./.tmp/error.log")||r.writeFileSync("./.tmp/error.log","","utf-8");let d=r.readFileSync("./.tmp/error.log","utf-8");r.writeFileSync("./.tmp/error.log",s),r.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),s?.url&&(r+=` +URL: ${s.url}`),s?.body&&(r+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),n&&(r+=` +IP: ${n}`),r+=` +Date: ${i.toDateString()} +========================================`,l().existsSync("./.tmp/error.log")||l().writeFileSync("./.tmp/error.log","","utf-8");let d=l().readFileSync("./.tmp/error.log","utf-8");l().writeFileSync("./.tmp/error.log",r),l().appendFileSync("./.tmp/error.log",` -${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},90488:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{AddTableEntryContext:()=>v,default:()=>N,getServerSideProps:()=>E});var s=a(8732),i=a(82015),l=a.n(i),n=a(20048),d=a.n(n),u=a(95222),o=a(84374),c=a(64098),m=a(31651),p=a.n(m),g=a(22373),x=a.n(g),b=a(67216),f=a.n(b),h=a(90378),T=a.n(h),y=e([o,c]);[o,c]=y.then?(await y)():y;let S=a(29021),v=l().createContext({});function N({user:e,database:t,table:a,dbSchemaData:r,query:i,confirmedDelegetedUser:n,duplicateEntry:d}){let m=`${a.tableFullName} Table New Entry | Datasquirel`,p=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:m}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),g=l().useRef([]),x=l().useRef([]);return(0,s.jsx)(u.A,{head:p,user:e,extraHeaderContent:(0,s.jsx)(c.A,{database:t,query:i,confirmedDelegetedUser:n,user:e}),children:(0,s.jsx)(v.Provider,{value:{user:e,database:t,table:a,dbSchemaData:r,richTextEditors:g,jsonTextEditors:x,query:i,confirmedDelegetedUser:n,duplicateEntry:d},children:(0,s.jsx)(o.A,{})})})}async function E({req:e,res:t,query:a}){let r=await d()(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t;let s=a.single,i=await p()({request:e,user:r,databaseSlug:s,query:a});if(!i)throw Error("No Db Object Found!");let{dbUserId:l}=i,n=await f()(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${a.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let d=JSON.parse(S.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l}/main.json`,"utf-8")),u=(d.filter(e=>e.dbFullName===n[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0];if(a.duplicate&&a.id){let e=n[0].db_full_name,r=u.tableName,s=await T()({database:e,queryString:`SELECT * FROM ${r} WHERE id='${a.id}'`,tableSchema:u});t=s?.[0]}return{props:{user:r,database:n[0],table:u,dbSchemaData:d,query:a,confirmedDelegetedUser:i,duplicateEntry:t||null}}}catch(e){return x()({component:"add-entry-page-component/getServerSideProps/catch-error",message:e.message,user:r}),{props:{user:r,database:null,table:null}}}}r()}catch(e){r(e)}})},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,6521,9600,7070,5134,9621,9732],()=>a(23821));module.exports=r})(); \ No newline at end of file +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},62130:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{AddTableEntryContext:()=>y,default:()=>f,getServerSideProps:()=>T});var l=a(8732),s=a(82015),i=a.n(s),n=a(29021),d=a.n(n),c=a(92702),u=a(25562),o=a(20356),m=a(55880),p=a(22873),g=a(77047),b=a(71934),x=a(52854),h=e([o,m]);[o,m]=h.then?(await h)():h;let y=i().createContext({});function f({user:e,database:t,table:a,dbSchemaData:r,query:s,confirmedDelegetedUser:n,duplicateEntry:d}){let c=`${a.tableFullName} Table New Entry | Datasquirel`,p=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:c}),(0,l.jsx)("meta",{name:"description",content:"Single Table"})]}),g=i().useRef([]),b=i().useRef([]);return(0,l.jsx)(u.A,{head:p,user:e,extraHeaderContent:(0,l.jsx)(m.A,{database:t,query:s,confirmedDelegetedUser:n,user:e}),children:(0,l.jsx)(y.Provider,{value:{user:e,database:t,table:a,dbSchemaData:r,richTextEditors:g,jsonTextEditors:b,query:s,confirmedDelegetedUser:n,duplicateEntry:d},children:(0,l.jsx)(o.A,{})})})}async function T({req:e,res:t,query:a}){let r=await (0,c.default)(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t;let l=a.single,s=await (0,p.A)({request:e,user:r,databaseSlug:l,query:a});if(!s)throw Error("No Db Object Found!");let{dbUserId:i}=s,n=await (0,b.A)(`SELECT * FROM user_databases WHERE user_id='${i}' AND db_slug='${a.single}'`);if(!n||!n[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let c=JSON.parse(d().readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${i}/main.json`,"utf-8")),u=(c.filter(e=>e.dbFullName===n[0].db_full_name)[0]?.tables).filter(e=>e.tableName===a.single_table)[0];if(a.duplicate&&a.id){let e=n[0].db_full_name,r=u.tableName,l=await (0,x.A)({database:e,queryString:`SELECT * FROM ${e}.${r} WHERE id='${a.id}'`,tableSchema:u});t=l?.[0]}return{props:{user:r,database:n[0],table:u,dbSchemaData:c,query:a,confirmedDelegetedUser:s,duplicateEntry:t||null}}}catch(e){return(0,g.A)({component:"add-entry-page-component/getServerSideProps/catch-error",message:e.message,user:r}),{props:{user:r,database:null,table:null}}}}r()}catch(e){r(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},90317:e=>{e.exports=require("html-prettify")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}};var t=require("../../../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,6521,9796,5392,3634,3791,725],()=>a(17723));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js.nft.json index dc1cca6..aea44e4 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/entries/add-entry.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../../node_modules/next/head.js","../../../../../../../../../../node_modules/next/package.json","../../../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../../../../../../node_modules/prop-types/node_modules/react-is/package.json","../../../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../../node_modules/react/index.js","../../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../../node_modules/react/package.json","../../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../../package.json","../../../../../../../../../package.json","../../../../../../../../chunks/1614.js","../../../../../../../../chunks/2414.js","../../../../../../../../chunks/2451.js","../../../../../../../../chunks/2996.js","../../../../../../../../chunks/3247.js","../../../../../../../../chunks/3460.js","../../../../../../../../chunks/3737.js","../../../../../../../../chunks/3932.js","../../../../../../../../chunks/4050.js","../../../../../../../../chunks/4312.js","../../../../../../../../chunks/4333.js","../../../../../../../../chunks/4385.js","../../../../../../../../chunks/45.js","../../../../../../../../chunks/5134.js","../../../../../../../../chunks/5212.js","../../../../../../../../chunks/5264.js","../../../../../../../../chunks/5421.js","../../../../../../../../chunks/5664.js","../../../../../../../../chunks/5674.js","../../../../../../../../chunks/6521.js","../../../../../../../../chunks/7070.js","../../../../../../../../chunks/7640.js","../../../../../../../../chunks/8540.js","../../../../../../../../chunks/8613.js","../../../../../../../../chunks/883.js","../../../../../../../../chunks/8842.js","../../../../../../../../chunks/9600.js","../../../../../../../../chunks/9621.js","../../../../../../../../chunks/9732.js","../../../../../../../../chunks/9821.js","../../../../../../../../chunks/9914.js","../../../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../../node_modules/html-prettify/package.json","../../../../../../../../../../node_modules/html-prettify/src/index.js","../../../../../../../../../../node_modules/html-prettify/src/utils/addIndentation.js","../../../../../../../../../../node_modules/html-prettify/src/utils/toLines.js","../../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../../node_modules/next/head.js","../../../../../../../../../../node_modules/next/package.json","../../../../../../../../../../node_modules/object-assign/index.js","../../../../../../../../../../node_modules/object-assign/package.json","../../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../../../../../node_modules/prop-types/index.js","../../../../../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../../../../../node_modules/prop-types/lib/has.js","../../../../../../../../../../node_modules/prop-types/package.json","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../../node_modules/react-is/cjs/react-is.development.js","../../../../../../../../../../node_modules/react-is/cjs/react-is.production.min.js","../../../../../../../../../../node_modules/react-is/index.js","../../../../../../../../../../node_modules/react-is/package.json","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../../node_modules/react/index.js","../../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../../node_modules/react/package.json","../../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../../package.json","../../../../../../../../../package.json","../../../../../../../../chunks/1251.js","../../../../../../../../chunks/1579.js","../../../../../../../../chunks/194.js","../../../../../../../../chunks/2282.js","../../../../../../../../chunks/3155.js","../../../../../../../../chunks/3474.js","../../../../../../../../chunks/3496.js","../../../../../../../../chunks/3634.js","../../../../../../../../chunks/3704.js","../../../../../../../../chunks/3791.js","../../../../../../../../chunks/4627.js","../../../../../../../../chunks/5392.js","../../../../../../../../chunks/5839.js","../../../../../../../../chunks/5954.js","../../../../../../../../chunks/6160.js","../../../../../../../../chunks/6202.js","../../../../../../../../chunks/6521.js","../../../../../../../../chunks/6622.js","../../../../../../../../chunks/6903.js","../../../../../../../../chunks/725.js","../../../../../../../../chunks/7713.js","../../../../../../../../chunks/8704.js","../../../../../../../../chunks/8760.js","../../../../../../../../chunks/883.js","../../../../../../../../chunks/9796.js","../../../../../../../../chunks/9821.js","../../../../../../../../chunks/9901.js","../../../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js index d6e8d22..811e09a 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6569,e.ids=[6569],e.modules={8409:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{config:()=>g,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>p,getStaticProps:()=>b,reportWebVitals:()=>h,routeModule:()=>y,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>D,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>x,unstable_getStaticProps:()=>_});var r=a(63865),l=a(9455),n=a(30671),i=a(49407),d=a(89600),o=a(48292),c=e([o]);o=(c.then?(await c)():c)[0];let u=(0,n.M)(o,"default"),b=(0,n.M)(o,"getStaticProps"),p=(0,n.M)(o,"getStaticPaths"),m=(0,n.M)(o,"getServerSideProps"),g=(0,n.M)(o,"config"),h=(0,n.M)(o,"reportWebVitals"),_=(0,n.M)(o,"unstable_getStaticProps"),x=(0,n.M)(o,"unstable_getStaticPaths"),f=(0,n.M)(o,"unstable_getStaticParams"),S=(0,n.M)(o,"unstable_getServerProps"),D=(0,n.M)(o,"unstable_getServerSideProps"),y=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/fields",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/fields",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:o});s()}catch(e){s(e)}})},73972:(e,t,a)=>{a.d(t,{A:()=>o});var s=a(8732),r=a(82015),l=a.n(r),n=a(63715);a(58548);var i=a(55158),d=a(32415);function o({targetTable:e,database:t}){let[a,r]=l().useState(!1);return(0,s.jsxs)(i.Ay,{title:"delete-table-confirmation",children:[a&&(0,s.jsx)(d.A,{width:"20px"}),(0,s.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{className:"outlined"+(a?" pointer-events-none opacity-40":""),onClick:a=>{r(!0),(0,n.A)("/api/deleteUserTable",{method:"post",body:{database:t,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,s.jsx)("span",{children:"Yes"})}),(0,s.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,s.jsx)("span",{children:"Cancel"})})]})]})}},59844:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>h});var r=a(8732),l=a(82015),n=a.n(l),i=a(48292),d=a(46437),o=a(58548),c=a(94010),u=a(77802),b=a(86571),p=a(65241),m=a(59621),g=e([i,c,m]);function h(e){let{user:t,database:a,table:s,tableFields:l,setTableFields:g,setTargetField:h,refreshFieldsListRef:_,updateTableAfterFieldsUpdateFunction:x,query:f,confirmedDelegetedUser:S}=n().useContext(i.TableFieldsContext);return S?.delegated,S?.priviledges?.match(/Edit Tables/i),S?.priviledges?.match(/Delete Tables/i),S?.priviledges?.match(/Create Tables/i),s?.childTable&&s.childTableDbFullName?.replace(new RegExp(/datasquirel_user_\d+_/),""),(0,r.jsxs)(n().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(d.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[(0,r.jsx)("span",{children:"All Fields in"}),(0,r.jsx)("div",{className:"inline relative",children:(0,r.jsxs)("a",{href:`/admin/${t?.id}/databases/${a.db_slug}/tables/${s.tableName}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-600 ml-2 text-primary hover:text-primary_dark relative",onClick:e=>{e.target.closest(".copy-slug-span")&&e.preventDefault()},children:[s.tableFullName,(0,r.jsx)("div",{className:"absolute -top-4 -right-4",children:(0,r.jsx)(c.A,{slugText:s.tableName,justIcon:!0})})]})}),(0,r.jsx)("span",{className:"ml-2",children:"Table"})]})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:`/admin/${t?.id}/databases/${a.db_slug}/tables/${s.tableName}/entries/add-entry`,className:"button flex items-center gap-2",children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add New Table Entry"})]})})]}),(0,r.jsx)(o.A,{confirmedDelegetedUser:f?.delegated,user:t})]}),a.active_clone?(0,r.jsx)(b.A,{database:a,user:t}):(0,r.jsx)(r.Fragment,{}),a.remote_connected?(0,r.jsx)(m.p,{database:a}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)(p.A,{table:s,database:a,user:t}),(0,r.jsx)(u.A,{user:t,tableFields:l,setTableFields:g,setTargetField:h,refreshFieldsListRef:_,updateTable:!0,updateTableAfterFieldsUpdateFunction:x,database:a,confirmedDelegetedUser:S,query:f,table:s})]})}[i,c,m]=g.then?(await g)():g,s()}catch(e){s(e)}})},65241:(e,t,a)=>{a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n({table:e,database:t,user:a,activeDbClone:r}){let n=e?.childTableDbFullName?e.childTableDbFullName.replace(new RegExp(/datasquirel_user_\d+_/),""):null,i=e.childTableDbFullName===t.db_full_name;return n?(0,s.jsxs)("span",{className:"info small green gap-1"+(t?.active_clone?" -mt-6":""),style:{fontWeight:"500"},children:["This Table is an active clone of"," ",(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${n}/tables/${e.childTableName}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,s.jsx)("b",{children:e.childTableName})})," ","in"," ",i?(0,s.jsxs)("span",{children:["this current database(",(0,s.jsx)("b",{children:t.db_name}),")."]}):(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${n}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,s.jsx)("b",{children:n})}),(0,s.jsx)("span",{children:"database."})]})," ",t?.active_clone?"":"Only Foreign keys and Entries can be updated."]}):(0,s.jsx)(l().Fragment,{})}},31651:(e,t,a)=>{a(81630);let s=a(77463);e.exports=async function({request:e,databaseSlug:t,user:a,query:r}){try{let l=a.id,n=null;if(!r?.delegated)return{dbUserId:l};let i=r.dbUserId,d=`${process.env.DSQL_USER_DB_PREFIX}${i}_${t}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${d}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let a=s({encryptedString:e.cookies[o]});if(!a)throw Error("Invalid Token");if((n=JSON.parse(a)).databaseSlug===t)return{dbUserId:l=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},92728:(e,t,a)=>{a.d(t,{A:()=>p}),a(81630);var s=a(22373),r=a.n(s),l=a(67216),n=a.n(l),i=a(31651),d=a.n(i),o=a(93342),c=a.n(o),u=a(90378),b=a.n(u);async function p({req:e,user:t,query:a}){try{let s=await d()({request:e,user:t,databaseSlug:a.single,query:a});if(!s)return null;let{dbUserId:r}=s,l=await n()(`SELECT * FROM user_databases WHERE user_id='${r}' AND db_slug='${a.single}'`);if(!l?.[0])return null;let i=c()({userId:r});if(!i)throw Error("DB Schema not found!");let o=i.filter(e=>e.dbFullName===l[0].db_full_name)[0]?.tables,u=o?.filter(e=>e.tableName===a.single_table)[0],p=await n()(`SELECT * FROM user_database_tables WHERE user_id='${r}' AND db_id='${l[0].id}' AND table_slug='${a.single_table}'`),m=await b()({database:l[0].db_full_name,queryString:`SELECT * FROM ${u?.tableName} ORDER BY id DESC LIMIT 10`,tableSchema:u}),g=await b()({database:l[0].db_full_name,queryString:`SELECT COUNT(id) AS count FROM ${u?.tableName}`,tableSchema:u});if(s.rootUserId){let e=i.filter(e=>e.dbFullName==l[0].db_full_name)[0],t=e.tables.filter(e=>e.tableName===u?.tableName);e.tables=t,i=[e]}return{confirmedDelegetedUser:s||null,database:l[0]||null,dbSchemaData:i||null,entries:m||null,entriesCount:g?.[0]?.count||0,query:a,table:u,tableRecord:p[0]||{}}}catch(e){return r()({component:"[single_table]/index-page-component/getServerSideProps/catch-error]",message:e.message,user:t}),{}}}},94933:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(27825),r=a(63715);function l({query:e,table:t,database:a,dbSchemaData:l,tableFields:n,tableIndexes:i,setLoading:d}){let o=[...l];try{let l=o.findIndex(e=>e.dbFullName===a.db_full_name),c=o[l].tables.findIndex(e=>e.tableName===t.tableName);if(o[l].tables[c].fields=n?s.cloneDeep(n):[],o[l].tables[c].indexes=i?s.cloneDeep(i):[],o[l].tables[c].fields.find(e=>e.newTempField)){window.alert("Please resolve all open fields before you save"),setTimeout(()=>{d?.(!1)},1e3);return}(0,r.A)("/api/updateDbSchemaDataForUser",{method:"post",body:{schema:o,database:a.db_slug,table:t,delegated:e?.delegated}},!0).then(e=>{e?.success?window.location.reload():(console.log("Res",e),window.alert(e?.msg||"Operation Failed. Please check permissions."))}).finally(()=>{d&&setTimeout(()=>{d(!1)},1e3)})}catch(e){window.alert(e.message),setTimeout(()=>{d?.(!1)},1e3);return}}},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},89545:(e,t,a)=>{let s=a(77463),r=a(68743);e.exports=async function({unparsedResults:e,tableSchema:t}){let a=[];try{for(let l=0;l",t.message),e}}},90378:(e,t,a)=>{a(29021);let s=a(89545),r=a(22373),l=a(67216),n=a(1231),i=a(88896);e.exports=async function({queryString:e,queryValuesArray:t,database:a,tableSchema:d,useLocal:o}){let c;let u=!!o||!!a?.match(/^datasquirel$/),b=o?i:u?l:n;try{c=e&&t&&Array.isArray(t)&&t[0]?u?await b(e,t):await b({paradigm:"Full Access",database:a,queryString:e,queryValues:t}):u?await b(e):await b({paradigm:"Full Access",database:a,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&d)try{let e=c;return await s({unparsedResults:e,tableSchema:d})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},1231:(e,t,a)=>{let s=a(29021);a(33873);let r=a(9973),l=a(31976),n=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:l()}});e.exports=function({paradigm:e,database:t,queryString:a,queryValues:i}){try{return new Promise((d,o)=>{let c=!!e?.match(/full.access|^fa$/i);try{function u(e){n.end(),d(JSON.parse(JSON.stringify(e)))}function b(e){n.end(),d({error:e.message,queryStringGenerated:a,queryValuesGenerated:i,sql:e.sql})}n=c?r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:l()}}):r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:l()}}),i&&Array.isArray(i)&&i[0]?n.query(a,i).then(u).catch(b):n.query(a).then(u).catch(b)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),d({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,t,a)=>{let s=a(9973),r=a(31976);async function l(...e){let t=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=l},48292:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{TableFieldsContext:()=>S,default:()=>x,getServerSideProps:()=>f});var r=a(8732),l=a(82015),n=a.n(l),i=a(20048),d=a.n(i),o=a(95222),c=a(73972),u=a(64098),b=a(59844),p=a(94933),m=a(22373),g=a.n(m),h=a(92728),_=e([u,b]);[u,b]=_.then?(await _)():_;let S=n().createContext({});function x({user:e,database:t,table:a,dbSchemaData:s,query:l,confirmedDelegetedUser:i}){let d=`${a.tableFullName} Table | Datasquirel`,m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:d}),(0,r.jsx)("meta",{name:"description",content:"Single Table"})]}),[g,h]=n().useState(a.fields),[_,x]=n().useState(null),f=n().useRef();return(0,r.jsx)(S.Provider,{value:{user:e,database:t,table:a,dbSchemaData:s,targetField:_,setTargetField:x,refreshFieldsListRef:f,tableFields:g,setTableFields:h,updateTableAfterFieldsUpdateFunction:function(e){(0,p.A)({query:l,table:a,database:t,dbSchemaData:s,tableFields:g,tableIndexes:a.indexes,setLoading:e})},query:l,confirmedDelegetedUser:i},children:(0,r.jsxs)(n().Fragment,{children:[(0,r.jsx)(o.A,{head:m,user:e,extraHeaderContent:(0,r.jsx)(u.A,{database:t,query:l,confirmedDelegetedUser:i,user:e}),children:(0,r.jsx)(b.A,{})}),(0,r.jsx)(c.A,{database:t})]})})}async function f({req:e,res:t,query:a}){let s=await d()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let t=await (0,h.A)({req:e,query:a,user:s});if(!t||!t?.table)throw Error("Data Fetching Error!");return{props:{user:s,...t}}}catch(e){return g()({component:"fields-page-component/getServerSideProps/catch-error",message:e.message,user:s}),{props:{user:s,database:null,table:null}}}}s()}catch(e){s(e)}})},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,6521,9600,7070,5134,3737,9621,8613,5421],()=>a(8409));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6569,e.ids=[6569],e.modules={86191:(e,a,t)=>{t.a(e,async(e,r)=>{try{t.r(a),t.d(a,{config:()=>g,default:()=>u,getServerSideProps:()=>p,getStaticPaths:()=>m,getStaticProps:()=>b,reportWebVitals:()=>h,routeModule:()=>v,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>y,unstable_getStaticParams:()=>x,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>f});var s=t(63865),l=t(9455),n=t(30671),i=t(5583),d=t(19796),o=t(12310),c=e([o]);o=(c.then?(await c)():c)[0];let u=(0,n.M)(o,"default"),b=(0,n.M)(o,"getStaticProps"),m=(0,n.M)(o,"getStaticPaths"),p=(0,n.M)(o,"getServerSideProps"),g=(0,n.M)(o,"config"),h=(0,n.M)(o,"reportWebVitals"),f=(0,n.M)(o,"unstable_getStaticProps"),_=(0,n.M)(o,"unstable_getStaticPaths"),x=(0,n.M)(o,"unstable_getStaticParams"),S=(0,n.M)(o,"unstable_getServerProps"),y=(0,n.M)(o,"unstable_getServerSideProps"),v=new s.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/[single_table]/fields",pathname:"/admin/[user_id]/databases/[single]/tables/[single_table]/fields",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:o});r()}catch(e){r(e)}})},57414:(e,a,t)=>{t.d(a,{A:()=>o});var r=t(8732),s=t(82015),l=t.n(s),n=t(46169),i=t(91140),d=t(16757);function o({targetTable:e,database:a}){let[t,s]=l().useState(!1);return(0,r.jsxs)(i.Ay,{title:"delete-table-confirmation",children:[t&&(0,r.jsx)(d.A,{width:"20px"}),(0,r.jsxs)("h4",{className:"m-0",children:["Delete '",e?.table_name?e.table_name:"This Database","' Table?"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("button",{className:"outlined"+(t?" pointer-events-none opacity-40":""),onClick:t=>{s(!0),(0,n.A)("/api/deleteUserTable",{method:"post",body:{database:a,table:e}},!0).then(e=>{e.success&&window.location.reload()})},children:(0,r.jsx)("span",{children:"Yes"})}),(0,r.jsx)("button",{onClick:e=>{(0,i.fs)()},children:(0,r.jsx)("span",{children:"Cancel"})})]})]})}},23862:(e,a,t)=>{t.a(e,async(e,r)=>{try{t.d(a,{A:()=>h});var s=t(8732),l=t(82015),n=t.n(l),i=t(12310),d=t(59023),o=t(53926),c=t(73872),u=t(471),b=t(537),m=t(51275),p=t(23791),g=e([i,c,p]);function h(){let{user:e,database:a,table:t,tableFields:r,setTableFields:l,setTargetField:g,refreshFieldsListRef:h,updateTableAfterFieldsUpdateFunction:f,query:_,confirmedDelegetedUser:x}=n().useContext(i.TableFieldsContext);return x?.delegated,x?.priviledges?.match(/Edit Tables/i),x?.priviledges?.match(/Delete Tables/i),x?.priviledges?.match(/Create Tables/i),t?.childTable&&t.childTableDbFullName?.replace(new RegExp(/datasquirel_user_\d+_/),""),(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(d.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{children:"All Fields in"}),(0,s.jsx)("div",{className:"inline relative",children:(0,s.jsxs)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${t.tableName}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-600 ml-2 text-primary hover:text-primary_dark relative",onClick:e=>{e.target.closest(".copy-slug-span")&&e.preventDefault()},children:[t.tableFullName,(0,s.jsx)("div",{className:"absolute -top-4 -right-4",children:(0,s.jsx)(c.A,{slugText:t.tableName,justIcon:!0})})]})}),(0,s.jsx)("span",{className:"ml-2",children:"Table"})]})]}),(0,s.jsx)("div",{children:(0,s.jsxs)("a",{href:`/admin/${e?.id}/databases/${a.db_slug}/tables/${t.tableName}/entries/add-entry`,className:"button flex items-center gap-2",children:[(0,s.jsx)("span",{className:"symbol",children:"+"}),(0,s.jsx)("span",{children:"Add New Table Entry"})]})})]}),(0,s.jsx)(o.A,{confirmedDelegetedUser:_?.delegated,user:e})]}),a.active_clone?(0,s.jsx)(b.A,{database:a,user:e}):(0,s.jsx)(s.Fragment,{}),a.remote_connected?(0,s.jsx)(p.p,{database:a}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(m.A,{table:t,database:a,user:e}),(0,s.jsx)(u.A,{user:e,tableFields:r,setTableFields:l,setTargetField:g,refreshFieldsListRef:h,updateTable:!0,updateTableAfterFieldsUpdateFunction:f,database:a,confirmedDelegetedUser:x,query:_,table:t})]})}[i,c,p]=g.then?(await g)():g,r()}catch(e){r(e)}})},51275:(e,a,t)=>{t.d(a,{A:()=>n});var r=t(8732),s=t(82015),l=t.n(s);function n({table:e,database:a,user:t,activeDbClone:s}){let n=e?.childTableDbFullName?e.childTableDbFullName.replace(new RegExp(/datasquirel_user_\d+_/),""):null,i=e.childTableDbFullName===a.db_full_name;return n?(0,r.jsxs)("span",{className:"info small green gap-1"+(a?.active_clone?" -mt-6":""),style:{fontWeight:"500"},children:["This Table is an active clone of"," ",(0,r.jsx)("a",{href:`/admin/${t?.id}/databases/${n}/tables/${e.childTableName}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,r.jsx)("b",{children:e.childTableName})})," ","in"," ",i?(0,r.jsxs)("span",{children:["this current database(",(0,r.jsx)("b",{children:a.db_name}),")."]}):(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)("a",{href:`/admin/${t?.id}/databases/${n}`,target:"_blank",className:"button gray outlined small-text",style:{display:"inline-block",fontSize:"12px",padding:"3px 7px"},children:(0,r.jsx)("b",{children:n})}),(0,r.jsx)("span",{children:"database."})]})," ",a?.active_clone?"":"Only Foreign keys and Entries can be updated."]}):(0,r.jsx)(l().Fragment,{})}},22873:(e,a,t)=>{t.d(a,{A:()=>s});var r=t(71205);async function s({request:e,databaseSlug:a,user:t,query:s}){try{let l=t.id,n=null;if(!s?.delegated)return{dbUserId:l};let i=s.dbUserId,d=`${process.env.DSQL_USER_DB_PREFIX}${i}_${a}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${d}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let t=(0,r.A)({encryptedString:e.cookies[o]});if(!t)throw Error("Invalid Token");if((n=JSON.parse(t)).databaseSlug===a)return{dbUserId:l=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},41494:(e,a,t)=>{t.d(a,{A:()=>d});var r=t(77047),s=t(71934),l=t(22873),n=t(72272),i=t(52854);async function d({req:e,user:a,query:t}){try{let r=await (0,l.A)({request:e,user:a,databaseSlug:t.single,query:t});if(!r)return null;let{dbUserId:d}=r,o=await (0,s.A)(`SELECT * FROM user_databases WHERE user_id='${d}' AND db_slug='${t.single}'`);if(!o?.[0])return null;let c=(0,n.A)({userId:Number(d)});if(!c)throw Error("DB Schema not found!");let u=c.filter(e=>e.dbFullName===o[0].db_full_name)[0]?.tables,b=u?.filter(e=>e.tableName===t.single_table)[0],m=await (0,s.A)(`SELECT * FROM user_database_tables WHERE user_id='${d}' AND db_id='${o[0].id}' AND table_slug='${t.single_table}'`),p=await (0,i.A)({database:o[0].db_full_name,queryString:`SELECT * FROM ${o[0].db_full_name}.${b?.tableName} ORDER BY id DESC LIMIT 10`,tableSchema:b}),g=await (0,i.A)({database:o[0].db_full_name,queryString:`SELECT COUNT(id) AS count FROM ${o[0].db_full_name}.${b?.tableName}`,tableSchema:b});if(r.rootUserId){let e=c.filter(e=>e.dbFullName==o[0].db_full_name)[0],a=e.tables.filter(e=>e.tableName===b?.tableName);e.tables=a,c=[e]}return{confirmedDelegetedUser:r||null,database:o[0]||null,dbSchemaData:c||null,entries:p||null,entriesCount:g?.[0]?.count||0,query:t,table:b,tableRecord:m[0]||{}}}catch(e){return(0,r.A)({component:"[single_table]/index-page-component/getServerSideProps/catch-error]",message:e.message,user:a}),{}}}},7143:(e,a,t)=>{t.d(a,{A:()=>l});var r=t(27825),s=t(46169);function l({query:e,table:a,database:t,dbSchemaData:l,tableFields:n,tableIndexes:i,setLoading:d}){let o=[...l];try{let l=o.findIndex(e=>e.dbFullName===t.db_full_name),c=o[l].tables.findIndex(e=>e.tableName===a.tableName);if(o[l].tables[c].fields=n?r.cloneDeep(n):[],o[l].tables[c].indexes=i?r.cloneDeep(i):[],o[l].tables[c].fields.find(e=>e.newTempField)){window.alert("Please resolve all open fields before you save"),setTimeout(()=>{d?.(!1)},1e3);return}(0,s.A)("/api/updateDbSchemaDataForUser",{method:"post",body:{schema:o,database:t.db_slug,table:a,delegated:e?.delegated}},!0).then(e=>{e?.success?window.location.reload():(console.log("Res",e),window.alert(e?.msg||"Operation Failed. Please check permissions."))}).finally(()=>{d&&setTimeout(()=>{d(!1)},1e3)})}catch(e){window.alert(e.message),setTimeout(()=>{d?.(!1)},1e3);return}}},52854:(e,a,t)=>{t.d(a,{A:()=>c});var r=t(71205);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function l({unparsedResults:e,tableSchema:a}){let t=[];try{for(let l=0;l",a.message),e}}var n=t(77047),i=t(71934),d=t(43651),o=t(16175);async function c({queryString:e,queryValuesArray:a,database:t,tableSchema:r,useLocal:s}){let c;let u=!!s||!!t?.match(/^datasquirel$/),b=s?o.A:u?i.A:d.A;try{c=e&&a&&Array.isArray(a)&&a[0]?u?await b(e,a):await b({paradigm:"Full Access",queryString:e,queryValues:a}):u?await b(e):await b({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,n.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&r)try{let e=c;return await l({unparsedResults:e,tableSchema:r})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,n.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},43651:(e,a,t)=>{async function r(e,a,t){try{if("string"==typeof a){let r=await e.query(s(a),t);return JSON.parse(JSON.stringify(r))}if("object"!=typeof a)return null;{let t=[];for(let r=0;rl})},16175:(e,a,t)=>{t.d(a,{A:()=>i});var r=t(9973),s=t.n(r),l=t(29021),n=t.n(l);async function i(...e){let a=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let a=`${e}/ca-cert.pem`;if(!n().existsSync(a)){console.log(`${a} does not exist`);return}return{ca:n().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},12310:(e,a,t)=>{t.a(e,async(e,r)=>{try{t.r(a),t.d(a,{TableFieldsContext:()=>_,default:()=>h,getServerSideProps:()=>f});var s=t(8732),l=t(82015),n=t.n(l),i=t(92702),d=t(25562),o=t(57414),c=t(55880),u=t(23862),b=t(7143),m=t(77047),p=t(41494),g=e([c,u]);[c,u]=g.then?(await g)():g;let _=n().createContext({});function h({user:e,database:a,table:t,dbSchemaData:r,query:l,confirmedDelegetedUser:i}){let m=`${t.tableFullName} Table | Datasquirel`,p=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:m}),(0,s.jsx)("meta",{name:"description",content:"Single Table"})]}),[g,h]=n().useState(t.fields),[f,x]=n().useState(null),S=n().useRef();return(0,s.jsx)(_.Provider,{value:{user:e,database:a,table:t,dbSchemaData:r,targetField:f,setTargetField:x,refreshFieldsListRef:S,tableFields:g,setTableFields:h,updateTableAfterFieldsUpdateFunction:function(e){(0,b.A)({query:l,table:t,database:a,dbSchemaData:r,tableFields:g,tableIndexes:t.indexes,setLoading:e})},query:l,confirmedDelegetedUser:i},children:(0,s.jsxs)(n().Fragment,{children:[(0,s.jsx)(d.A,{head:p,user:e,extraHeaderContent:(0,s.jsx)(c.A,{database:a,query:l,confirmedDelegetedUser:i,user:e}),children:(0,s.jsx)(u.A,{})}),(0,s.jsx)(o.A,{database:a})]})})}async function f({req:e,res:a,query:t}){let r=await (0,i.default)(e,a);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};try{let a=await (0,p.A)({req:e,query:t,user:r});if(!a||!a?.table)throw Error("Data Fetching Error!");return{props:{user:r,...a}}}catch(e){return(0,m.A)({component:"fields-page-component/getServerSideProps/catch-error",message:e.message,user:r}),{props:{user:r,database:null,table:null}}}}r()}catch(e){r(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),r=a.X(0,[883,9821,6521,9796,5392,3634,3155,3791,9901],()=>t(86191));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js.nft.json index e9d1b2b..016554f 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/[single_table]/fields.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../../node_modules/gsap/package.json","../../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1614.js","../../../../../../../chunks/2414.js","../../../../../../../chunks/2451.js","../../../../../../../chunks/2996.js","../../../../../../../chunks/3247.js","../../../../../../../chunks/3460.js","../../../../../../../chunks/3737.js","../../../../../../../chunks/3932.js","../../../../../../../chunks/4050.js","../../../../../../../chunks/4312.js","../../../../../../../chunks/4333.js","../../../../../../../chunks/4385.js","../../../../../../../chunks/45.js","../../../../../../../chunks/5134.js","../../../../../../../chunks/5212.js","../../../../../../../chunks/5264.js","../../../../../../../chunks/5421.js","../../../../../../../chunks/5664.js","../../../../../../../chunks/5674.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/7070.js","../../../../../../../chunks/7640.js","../../../../../../../chunks/8540.js","../../../../../../../chunks/8613.js","../../../../../../../chunks/883.js","../../../../../../../chunks/8842.js","../../../../../../../chunks/9600.js","../../../../../../../chunks/9621.js","../../../../../../../chunks/9732.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9914.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../../node_modules/gsap/package.json","../../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1251.js","../../../../../../../chunks/1579.js","../../../../../../../chunks/194.js","../../../../../../../chunks/2282.js","../../../../../../../chunks/3155.js","../../../../../../../chunks/3474.js","../../../../../../../chunks/3496.js","../../../../../../../chunks/3634.js","../../../../../../../chunks/3704.js","../../../../../../../chunks/3791.js","../../../../../../../chunks/4627.js","../../../../../../../chunks/5392.js","../../../../../../../chunks/5839.js","../../../../../../../chunks/5954.js","../../../../../../../chunks/6160.js","../../../../../../../chunks/6202.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/6622.js","../../../../../../../chunks/6903.js","../../../../../../../chunks/725.js","../../../../../../../chunks/7713.js","../../../../../../../chunks/8704.js","../../../../../../../chunks/8760.js","../../../../../../../chunks/883.js","../../../../../../../chunks/9796.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9901.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js index 567f022..09decff 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6778,e.ids=[6778],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},95515:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.r(t),a.d(t,{config:()=>h,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>b,getStaticProps:()=>p,reportWebVitals:()=>x,routeModule:()=>j,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>g,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>f});var s=a(63865),r=a(9455),d=a(30671),n=a(49407),i=a(89600),c=a(85719),o=e([c]);c=(o.then?(await o)():o)[0];let u=(0,d.M)(c,"default"),p=(0,d.M)(c,"getStaticProps"),b=(0,d.M)(c,"getStaticPaths"),m=(0,d.M)(c,"getServerSideProps"),h=(0,d.M)(c,"config"),x=(0,d.M)(c,"reportWebVitals"),f=(0,d.M)(c,"unstable_getStaticProps"),y=(0,d.M)(c,"unstable_getStaticPaths"),g=(0,d.M)(c,"unstable_getStaticParams"),A=(0,d.M)(c,"unstable_getServerProps"),v=(0,d.M)(c,"unstable_getServerSideProps"),j=new s.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/add-table",pathname:"/admin/[user_id]/databases/[single]/tables/add-table",bundlePath:"",filename:""},components:{App:i.default,Document:n.default},userland:c});l()}catch(e){l(e)}})},59706:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>p});var s=a(8732),r=a(82015),d=a.n(r),n=a(85719),i=a(46437),c=a(58548),o=a(81579);a(77802);var u=e([n,o]);function p(e){let{database:t,user:a}=d().useContext(n.AddTableContext);return t?(0,s.jsxs)(d().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{children:"Add A New Table To"}),(0,s.jsx)("a",{href:`/admin/${a?.id}/databases/${t.db_slug}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-700 ml-2 text-primary hover:text-primary_dark",children:t.db_name})]})]}),(0,s.jsx)(c.A,{user:a})]}),(0,s.jsx)("div",{className:"w-full flex-col",children:(0,s.jsx)(o.A,{})})]}):null}[n,o]=u.then?(await u)():u,l()}catch(e){l(e)}})},81579:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>u});var s=a(8732),r=a(82015),d=a.n(r),n=a(85719),i=a(34702),c=a(54253),o=e([n,i,c]);function u(e){let{database:t,query:a}=d().useContext(n.AddTableContext),l=a?.clone;a?.clone_db,a?.clone_table;let[r,o]=d().useState(!!l);return(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsxs)("div",{className:"gap-1 w-full bg-blue-100 dark:bg-blue-100/10 text-white p-2 rounded",children:[(0,s.jsx)("input",{type:"checkbox",name:"toggle-clone-table",id:"toggle-clone-table",className:"w-5 h-5",onChange:e=>{e.target.checked?o(!0):o(!1)},defaultChecked:r}),(0,s.jsx)("label",{htmlFor:"toggle-clone-table",className:"text-base text-slate-600",children:"Clone Another Table"})]}),r?(0,s.jsx)(c.A,{}):(0,s.jsx)(i.A,{})]})}[n,i,c]=o.then?(await o)():o,l()}catch(e){l(e)}})},54253:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>b});var s=a(8732),r=a(82015),d=a.n(r),n=a(32415),i=a(85719),c=a(63715),o=a(64535),u=a(15969),p=e([i,u]);function b(e){let{user:t,tableFields:a,database:l,dbSchemaData:r,query:p}=d().useContext(i.AddTableContext);if(!r)return null;p?.clone;let b=p?.clone_db,m=p?.clone_table,h=b?r.find(e=>e.dbSlug===b):null,x=h?h.tables:null,[f,y]=d().useState(null),[g,A]=d().useState(!1),[v,j]=d().useState(!1),[N,w]=d().useState(h||{...r[0]}),[_,k]=d().useState(x||[...r[0].tables]),[T,S]=d().useState(x?x.find(e=>e.tableName===m):r[0].tables[0]?{...r[0].tables[0]}:null);return(0,s.jsxs)(d().Fragment,{children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Clone Existing Table"}),g&&(0,s.jsx)(n.A,{}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:e=>{if(e.preventDefault(),A(!0),!T){window.alert("No Table Selected!"),A(!1);return}let a=e.target,s=a.table_name.value,r=a.table_slug.value,d=a.table_description?.value?.match(/./)?a.table_description.value:null,n={...T};n.tableName=r,n.tableFullName=s,v&&(n.childTable=!0,n.childTableName=T.tableName,n.childTableDbFullName=N.dbFullName),d&&(n.tableDescription=d),n.fields.forEach(e=>{delete e.foreignKey}),delete n.childrenTables,l?(0,c.A)("/api/addUserTable",{method:"post",body:{dbFullName:l.db_full_name,dbId:l.id,dbSlug:l.db_slug,parentDatabase:N.dbFullName,parentTable:T.tableName,payload:n}},!0).then(e=>{e.success?window.location.pathname=`/admin/${t?.id}/databases/${l.db_slug}/tables`:window.alert("Table Clonning Failed! Please Try again.")}).finally(()=>{setTimeout(()=>{A(!1)},1e3)}):window.alert("Database record data not found!")},id:"create-new-table-form",children:[f&&(0,s.jsx)(o.A,{message:f}),(0,s.jsx)("hr",{className:"w-full opacity-40"}),(0,s.jsx)("h3",{className:"text-base m-0 font-semibold text-slate-600",children:"Enter New Table Info"}),(0,s.jsx)(u.A,{setAlert:y}),(0,s.jsx)("hr",{className:"w-full opacity-40"}),(0,s.jsx)("h3",{className:"text-base m-0 font-semibold text-slate-600",children:"Select Existing Table To Clone"}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"select_root_database",children:"Database"}),(0,s.jsx)("select",{name:"select_root_database",id:"select_root_database",onChange:e=>{let t=r.filter(t=>t.dbName===e.target.value)[0];w({...t}),k([...t.tables]),t.tables[0]?S({...t.tables[0]}):S(null)},children:r.filter(e=>!e.childDatabase).map((e,t)=>(0,s.jsx)("option",{value:e.dbName,selected:!!b&&b==e.dbSlug||void 0,children:e.dbName},t+1))})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"select_root_table",children:"Table"}),(0,s.jsx)("select",{name:"select_root_table",id:"select_root_table",onChange:e=>{S({..._.filter(t=>t.tableName===e.target.value)[0]})},children:_&&_[0]?_.filter(e=>!e.childTable).map((e,t)=>(0,s.jsx)("option",{value:e.tableName,selected:!!m&&m==e.tableName||void 0,children:e.tableFullName},t+1)):(0,s.jsx)("option",{value:"null",children:"-- No Tables --"})})]}),(0,s.jsxs)("div",{className:"flex-col items-start gap-1",children:[(0,s.jsxs)("div",{className:"gap-1",children:[(0,s.jsx)("input",{type:"checkbox",name:"toggle-update-table",id:"toggle-update-table",className:"w-4 h-4",onChange:e=>{e.target.checked?j(!0):j(!1)}}),(0,s.jsx)("label",{htmlFor:"toggle-update-table",className:"text-base text-slate-600 dark:text-slate-100",children:"Keep New Table Updated?"})]}),(0,s.jsx)("span",{className:"text-sm italic text-slate-600 dark:text-slate-400",children:"By checking this box the new Table stays up to date with changes to the structure of the parent Table"})]}),(0,s.jsx)("button",{className:"w-full p-4"+(g?" pointer-events-none opacity-40":""),onClick:e=>{document.getElementById("create-new-table-form-submit-button")?.click()},children:"Clone Table"})]})]})}[i,u]=p.then?(await p)():p,l()}catch(e){l(e)}})},6848:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(8732),s=a(82015),r=a.n(s),d=a(55158),n=a(32415),i=a(64417);function c({targetField:e,fieldIndex:t,tableFields:a,setTableFields:s,refreshFieldsListRef:c,database:o,user:u}){let[p,b]=r().useState(!1);return(0,l.jsxs)(d.Ay,{title:"edit-field-popup",children:[p&&(0,l.jsx)(n.A,{width:"20px"}),(0,l.jsxs)("span",{children:["Edit"," ",(0,l.jsx)("b",{className:"bg-slate-100 px-3 py-1.5 rounded-full border border-slate-300 border-solid",children:e?.fieldName})]}),(0,l.jsx)(i.A,{fieldIndex:t,tableFields:a,setTableFields:s,refreshFieldsListRef:c,targetField:e,database:o,user:u})]})}},34702:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>m});var s=a(8732),r=a(82015),d=a.n(r),n=a(32415),i=a(85719),c=a(77802),o=a(63715),u=a(64535),p=a(15969),b=e([i,p]);function m(e){let{user:t,tableFields:a,database:l,setTableFields:r,setTargetField:b,refreshFieldsListRef:m,query:h}=d().useContext(i.AddTableContext),[x,f]=d().useState(null),[y,g]=d().useState(!1),[A,v]=d().useState(!1);return(0,s.jsxs)(d().Fragment,{children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"New Table Information"}),A&&(0,s.jsx)(n.A,{}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:e=>{e.preventDefault(),v(!0);let s=e.target,r=s.table_name.value,d=s.table_slug.value,n=s.table_description?.value?.match(/./)?s.table_description.value:null,i={tableName:d,tableFullName:r,fields:a};n&&(i.description=n),(0,o.A)("/api/addUserTable",{method:"post",body:{dbFullName:l?.db_full_name,dbId:l?.id,dbSlug:l?.db_slug,payload:i}},!0).then(e=>{e.success?window.location.pathname=`/admin/${t?.id}/databases/${l?.db_slug}/tables`:(window.alert("Table Creation Failed! Please Try again."),window.location.reload())})},id:"create-new-table-form",children:[x&&(0,s.jsx)(u.A,{message:x}),(0,s.jsx)(p.A,{setAlert:f}),(0,s.jsx)("button",{type:"submit",className:"w-full hidden",id:"create-new-table-form-submit-button",children:"Create Table"})]}),t&&a&&r&&b&&l&&m&&(0,s.jsx)(c.A,{user:t,tableFields:a,setTableFields:r,setTargetField:b,refreshFieldsListRef:m,database:l,query:h}),(0,s.jsx)("button",{className:"w-full p-4"+(A?" pointer-events-none opacity-40":""),onClick:e=>{document.getElementById("create-new-table-form-submit-button")?.click()},children:"Create Table"})]})}[i,p]=b.then?(await b)():b,l()}catch(e){l(e)}})},15969:(e,t,a)=>{a.a(e,async(e,l)=>{try{let u;a.d(t,{A:()=>o});var s=a(8732),r=a(82015),d=a.n(r),n=a(27462),i=a(85719),c=e([i]);function o({setAlert:e}){let{user:t,database:a}=d().useContext(i.AddTableContext);async function l(e){return await (0,n.A)({tableName:"user_database_tables",columnName:"table_slug",value:e,dbId:a?.id,userId:t?.id})}return(0,s.jsxs)(d().Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_name",children:"Name"}),(0,s.jsx)("input",{type:"text",name:"table_name",id:"table_name",placeholder:"Table Name",onInput:async t=>{let a=t.target,s=a.closest("form");if(a.value.match(/./)?(a.classList.remove("warning"),e(null)):a.classList.add("warning"),s){s.table_slug.value=a.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,"");let t=s.table_slug.value;window.clearTimeout(u),u=setTimeout(()=>{l(t).then(t=>{t.result?(s?.table_slug.classList.add("warning"),e("Duplicate Table Name")):(s.table_slug.classList.remove("warning"),e(null))})},300)}},required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_slug",children:"Slug"}),(0,s.jsx)("input",{type:"text",name:"table_slug",id:"table_slug",placeholder:"Table Slug",onInput:t=>{let a=t.target;a.closest("form"),a.value.match(/./)?(a.classList.remove("warning"),e(null)):a.classList.add("warning"),window.clearTimeout(u),u=setTimeout(()=>{l(a.value).then(t=>{t.result?(a.classList.add("warning"),e("Duplicate Table Name")):(a.classList.remove("warning"),e(null))})},300)},required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_description",children:"Description (optional)"}),(0,s.jsx)("textarea",{name:"table_description",id:"table_description",placeholder:"Short Description of Table"})]})]})}i=(c.then?(await c)():c)[0],l()}catch(e){l(e)}})},64535:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(8732);function s({message:e}){return(0,l.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,l.jsx)("span",{children:e})]})}a(82015)},55158:(e,t,a)=>{a.d(t,{Ay:()=>n,PB:()=>i,fs:()=>c});var l=a(8732),s=a(58150),r=a(82015),d=a.n(r);function n({children:e,title:t,data:a,fullPage:r,wrapperClasses:n,closePopupDispatch:i,wrapperStyle:o,noContainer:u}){return r?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(n||""),"data-popupid":t||null,style:o,children:[u?(0,l.jsx)(d().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),i&&i()},children:(0,l.jsx)(s.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[u?(0,l.jsx)(d().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]})}function i(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t&&t(a))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},62506:(e,t,a)=>{a.d(t,{A:()=>d});var l=a(8732),s=a(82015),r=a.n(s);function d({children:e,column:t,className:a}){let s=r().useRef();return(0,l.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:s,children:e})}},27462:(e,t,a)=>{a.d(t,{A:()=>s}),a(22326);var l=a(63715);async function s({tableName:e,columnName:t,value:a,dbFullName:s,dispatch:r,userId:d,dbId:n}){return await (0,l.A)(`/api/checkDuplicateData?tableName=${e}&type=${t}&value=${a}${s?"&dbFullName="+s:""}${d?"&userId="+d:""}${n?"&dbId="+n:""}`)}},23293:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},85719:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.r(t),a.d(t,{AddTableContext:()=>A,default:()=>y,getServerSideProps:()=>g});var s=a(8732),r=a(82015),d=a.n(r),n=a(95222),i=a(20048),c=a.n(i),o=a(59706),u=a(6848),p=a(64098),b=a(67216),m=a.n(b),h=a(93342),x=a.n(h),f=e([o,p]);[o,p]=f.then?(await f)():f;let A=d().createContext({});function y({user:e,database:t,tables:l,dbSchemaData:r,query:i}){let c=`Add Table To ${t.db_name}| Datasquirel`,b=a(45478),m=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:c}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[h,x]=d().useState(b),[f,y]=d().useState(),[g,v]=d().useState(null),j=d().useRef(),N=f&&h?h.findIndex(e=>e.fieldName===f.fieldName):1;return(0,s.jsx)(A.Provider,{value:{user:e,dbSchemaData:r,database:t,tables:l,tableFields:h,setTableFields:x,targetField:f,setTargetField:y,pageRefresh:g,setPageRefresh:v,refreshFieldsListRef:j,query:i},children:(0,s.jsxs)(d().Fragment,{children:[(0,s.jsx)(n.A,{head:m,user:e,extraHeaderContent:(0,s.jsx)(p.A,{database:t,query:i,user:e}),children:(0,s.jsx)(o.A,{})}),f&&h&&(0,s.jsx)(u.A,{targetField:f,fieldIndex:N,tableFields:h,setTableFields:x,refreshFieldsListRef:j,database:t,user:e})]})})}async function g({req:e,res:t,query:a}){try{let l=await c()(e,t);if(!l?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await m()(`SELECT * FROM user_databases WHERE user_id='${l.id}' AND db_slug='${a.single}'`);if(!s||!s[0])return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};let r=await m()(`SELECT * FROM user_database_tables WHERE user_id='${l.id}' AND db_id='${s[0].id}'`),d=x()({userId:l.id});if(!d)throw Error("User schema data not found!");return{props:{user:l,database:s[0],tables:r,dbSchemaData:d,query:a}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}l()}catch(e){l(e)}})},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")},45478:e=>{e.exports=JSON.parse('[{"fieldName":"id","dataType":"BIGINT","notNullValue":true,"primaryKey":true,"autoIncrement":true},{"fieldName":"uuid","dataType":"UUID","defaultValueLiteral":"UUID()"},{"fieldName":"date_created","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_created_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_created_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP"},{"fieldName":"date_updated","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_updated_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_updated_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP","onUpdateLiteral":"CURRENT_TIMESTAMP"}]')}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),l=t.X(0,[883,9821,9600,7070,5134,3737,8613,5421],()=>a(95515));module.exports=l})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6778,e.ids=[6778],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},56501:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.r(t),a.d(t,{config:()=>h,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>b,getStaticProps:()=>p,reportWebVitals:()=>x,routeModule:()=>j,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>g,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>f});var s=a(63865),r=a(9455),d=a(30671),n=a(5583),i=a(19796),c=a(83101),o=e([c]);c=(o.then?(await o)():o)[0];let u=(0,d.M)(c,"default"),p=(0,d.M)(c,"getStaticProps"),b=(0,d.M)(c,"getStaticPaths"),m=(0,d.M)(c,"getServerSideProps"),h=(0,d.M)(c,"config"),x=(0,d.M)(c,"reportWebVitals"),f=(0,d.M)(c,"unstable_getStaticProps"),y=(0,d.M)(c,"unstable_getStaticPaths"),g=(0,d.M)(c,"unstable_getStaticParams"),A=(0,d.M)(c,"unstable_getServerProps"),v=(0,d.M)(c,"unstable_getServerSideProps"),j=new s.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/databases/[single]/tables/add-table",pathname:"/admin/[user_id]/databases/[single]/tables/add-table",bundlePath:"",filename:""},components:{App:i.default,Document:n.default},userland:c});l()}catch(e){l(e)}})},62864:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>p});var s=a(8732),r=a(82015),d=a.n(r),n=a(83101),i=a(59023),c=a(53926),o=a(95545),u=e([n,o]);function p(){let{database:e,user:t}=d().useContext(n.AddTableContext);return e?(0,s.jsxs)(d().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:[(0,s.jsx)("span",{children:"Add A New Table To"}),(0,s.jsx)("a",{href:`/admin/${t?.id}/databases/${e.db_slug}`,className:"p-2 bg-white dark:bg-slate-800 rounded border border-solid border-slate-200 dark:border-slate-700 ml-2 text-primary hover:text-primary_dark",children:e.db_name})]})]}),(0,s.jsx)(c.A,{user:t})]}),(0,s.jsx)("div",{className:"w-full flex-col",children:(0,s.jsx)(o.A,{})})]}):null}[n,o]=u.then?(await u)():u,l()}catch(e){l(e)}})},95545:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>u});var s=a(8732),r=a(82015),d=a.n(r),n=a(83101),i=a(85196),c=a(2215),o=e([n,i,c]);function u(){let{database:e,query:t}=d().useContext(n.AddTableContext),a=t?.clone;t?.clone_db,t?.clone_table;let[l,r]=d().useState(!!a);return(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsxs)("div",{className:"gap-1 w-full bg-blue-100 dark:bg-blue-100/10 text-white p-2 rounded",children:[(0,s.jsx)("input",{type:"checkbox",name:"toggle-clone-table",id:"toggle-clone-table",className:"w-5 h-5",onChange:e=>{e.target.checked?r(!0):r(!1)},defaultChecked:l}),(0,s.jsx)("label",{htmlFor:"toggle-clone-table",className:"text-base text-slate-600",children:"Clone Another Table"})]}),l?(0,s.jsx)(c.A,{}):(0,s.jsx)(i.A,{})]})}[n,i,c]=o.then?(await o)():o,l()}catch(e){l(e)}})},2215:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>b});var s=a(8732),r=a(82015),d=a.n(r),n=a(16757),i=a(83101),c=a(46169),o=a(10621),u=a(97635),p=e([i,u]);function b(){let{user:e,tableFields:t,database:a,dbSchemaData:l,query:r}=d().useContext(i.AddTableContext);if(!l)return null;r?.clone;let p=r?.clone_db,b=r?.clone_table,m=p?l.find(e=>e.dbSlug===p):null,h=m?m.tables:null,[x,f]=d().useState(null),[y,g]=d().useState(!1),[A,v]=d().useState(!1),[j,N]=d().useState(m||{...l[0]}),[w,_]=d().useState(h||[...l[0].tables]),[k,T]=d().useState(h?h.find(e=>e.tableName===b):l[0].tables[0]?{...l[0].tables[0]}:null);return(0,s.jsxs)(d().Fragment,{children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Clone Existing Table"}),y&&(0,s.jsx)(n.A,{}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:t=>{if(t.preventDefault(),g(!0),!k){window.alert("No Table Selected!"),g(!1);return}let l=t.target,s=l.table_name.value,r=l.table_slug.value,d=l.table_description?.value?.match(/./)?l.table_description.value:null,n={...k};n.tableName=r,n.tableFullName=s,A&&(n.childTable=!0,n.childTableName=k.tableName,n.childTableDbFullName=j.dbFullName),d&&(n.tableDescription=d),n.fields.forEach(e=>{delete e.foreignKey}),delete n.childrenTables,a?(0,c.A)("/api/addUserTable",{method:"post",body:{dbFullName:a.db_full_name,dbId:a.id,dbSlug:a.db_slug,parentDatabase:j.dbFullName,parentTable:k.tableName,payload:n}},!0).then(t=>{t.success?window.location.pathname=`/admin/${e?.id}/databases/${a.db_slug}/tables`:window.alert("Table Clonning Failed! Please Try again.")}).finally(()=>{setTimeout(()=>{g(!1)},1e3)}):window.alert("Database record data not found!")},id:"create-new-table-form",children:[x&&(0,s.jsx)(o.A,{message:x}),(0,s.jsx)("hr",{className:"w-full opacity-40"}),(0,s.jsx)("h3",{className:"text-base m-0 font-semibold text-slate-600",children:"Enter New Table Info"}),(0,s.jsx)(u.A,{setAlert:f}),(0,s.jsx)("hr",{className:"w-full opacity-40"}),(0,s.jsx)("h3",{className:"text-base m-0 font-semibold text-slate-600",children:"Select Existing Table To Clone"}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"select_root_database",children:"Database"}),(0,s.jsx)("select",{name:"select_root_database",id:"select_root_database",onChange:e=>{let t=l.filter(t=>t.dbName===e.target.value)[0];N({...t}),_([...t.tables]),t.tables[0]?T({...t.tables[0]}):T(null)},children:l.filter(e=>!e.childDatabase).map((e,t)=>(0,s.jsx)("option",{value:e.dbName,selected:!!p&&p==e.dbSlug||void 0,children:e.dbName},t+1))})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"select_root_table",children:"Table"}),(0,s.jsx)("select",{name:"select_root_table",id:"select_root_table",onChange:e=>{T({...w.filter(t=>t.tableName===e.target.value)[0]})},children:w&&w[0]?w.filter(e=>!e.childTable).map((e,t)=>(0,s.jsx)("option",{value:e.tableName,selected:!!b&&b==e.tableName||void 0,children:e.tableFullName},t+1)):(0,s.jsx)("option",{value:"null",children:"-- No Tables --"})})]}),(0,s.jsxs)("div",{className:"flex-col items-start gap-1",children:[(0,s.jsxs)("div",{className:"gap-1",children:[(0,s.jsx)("input",{type:"checkbox",name:"toggle-update-table",id:"toggle-update-table",className:"w-4 h-4",onChange:e=>{e.target.checked?v(!0):v(!1)}}),(0,s.jsx)("label",{htmlFor:"toggle-update-table",className:"text-base text-slate-600 dark:text-slate-100",children:"Keep New Table Updated?"})]}),(0,s.jsx)("span",{className:"text-sm italic text-slate-600 dark:text-slate-400",children:"By checking this box the new Table stays up to date with changes to the structure of the parent Table"})]}),(0,s.jsx)("button",{className:"w-full p-4"+(y?" pointer-events-none opacity-40":""),onClick:e=>{document.getElementById("create-new-table-form-submit-button")?.click()},children:"Clone Table"})]})]})}[i,u]=p.then?(await p)():p,l()}catch(e){l(e)}})},29802:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(8732),s=a(82015),r=a.n(s),d=a(91140),n=a(16757),i=a(46083);function c({targetField:e,fieldIndex:t,tableFields:a,setTableFields:s,refreshFieldsListRef:c,database:o,user:u}){let[p,b]=r().useState(!1);return(0,l.jsxs)(d.Ay,{title:"edit-field-popup",children:[p&&(0,l.jsx)(n.A,{width:"20px"}),(0,l.jsxs)("span",{children:["Edit"," ",(0,l.jsx)("b",{className:"bg-slate-100 px-3 py-1.5 rounded-full border border-slate-300 border-solid",children:e?.fieldName})]}),(0,l.jsx)(i.A,{fieldIndex:t,tableFields:a,setTableFields:s,refreshFieldsListRef:c,targetField:e,database:o,user:u})]})}},85196:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>m});var s=a(8732),r=a(82015),d=a.n(r),n=a(16757),i=a(83101),c=a(471),o=a(46169),u=a(10621),p=a(97635),b=e([i,p]);function m(){let{user:e,tableFields:t,database:a,setTableFields:l,setTargetField:r,refreshFieldsListRef:b,query:m}=d().useContext(i.AddTableContext),[h,x]=d().useState(null),[f,y]=d().useState(!1),[g,A]=d().useState(!1);return(0,s.jsxs)(d().Fragment,{children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"New Table Information"}),g&&(0,s.jsx)(n.A,{}),(0,s.jsxs)("form",{className:"w-full flex flex-col items-start gap-4 relative",onSubmit:l=>{l.preventDefault(),A(!0);let s=l.target,r=s.table_name.value,d=s.table_slug.value,n=s.table_description?.value?.match(/./)?s.table_description.value:null,i={tableName:d,tableFullName:r,fields:t};n&&(i.description=n),(0,o.A)("/api/addUserTable",{method:"post",body:{dbFullName:a?.db_full_name,dbId:a?.id,dbSlug:a?.db_slug,payload:i}},!0).then(t=>{t.success?window.location.pathname=`/admin/${e?.id}/databases/${a?.db_slug}/tables`:(window.alert("Table Creation Failed! Please Try again."),window.location.reload())})},id:"create-new-table-form",children:[h&&(0,s.jsx)(u.A,{message:h}),(0,s.jsx)(p.A,{setAlert:x}),(0,s.jsx)("button",{type:"submit",className:"w-full hidden",id:"create-new-table-form-submit-button",children:"Create Table"})]}),e&&t&&l&&r&&a&&b&&(0,s.jsx)(c.A,{user:e,tableFields:t,setTableFields:l,setTargetField:r,refreshFieldsListRef:b,database:a,query:m}),(0,s.jsx)("button",{className:"w-full p-4"+(g?" pointer-events-none opacity-40":""),onClick:e=>{document.getElementById("create-new-table-form-submit-button")?.click()},children:"Create Table"})]})}[i,p]=b.then?(await b)():b,l()}catch(e){l(e)}})},97635:(e,t,a)=>{a.a(e,async(e,l)=>{try{let u;a.d(t,{A:()=>o});var s=a(8732),r=a(82015),d=a.n(r),n=a(24872),i=a(83101),c=e([i]);function o({setAlert:e}){let{user:t,database:a}=d().useContext(i.AddTableContext);async function l(e){return await (0,n.A)({tableName:"user_database_tables",columnName:"table_slug",value:e,dbId:a?.id,userId:t?.id})}return(0,s.jsxs)(d().Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_name",children:"Name"}),(0,s.jsx)("input",{type:"text",name:"table_name",id:"table_name",placeholder:"Table Name",onInput:async t=>{let a=t.target,s=a.closest("form");if(a.value.match(/./)?(a.classList.remove("warning"),e(null)):a.classList.add("warning"),s){s.table_slug.value=a.value.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9-_]/g,"");let t=s.table_slug.value;window.clearTimeout(u),u=setTimeout(()=>{l(t).then(t=>{t.result?(s?.table_slug.classList.add("warning"),e("Duplicate Table Name")):(s.table_slug.classList.remove("warning"),e(null))})},300)}},required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_slug",children:"Slug"}),(0,s.jsx)("input",{type:"text",name:"table_slug",id:"table_slug",placeholder:"Table Slug",onInput:t=>{let a=t.target;a.closest("form"),a.value.match(/./)?(a.classList.remove("warning"),e(null)):a.classList.add("warning"),window.clearTimeout(u),u=setTimeout(()=>{l(a.value).then(t=>{t.result?(a.classList.add("warning"),e("Duplicate Table Name")):(a.classList.remove("warning"),e(null))})},300)},required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"table_description",children:"Description (optional)"}),(0,s.jsx)("textarea",{name:"table_description",id:"table_description",placeholder:"Short Description of Table"})]})]})}i=(c.then?(await c)():c)[0],l()}catch(e){l(e)}})},10621:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(8732);function s({message:e}){return(0,l.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,l.jsx)("span",{children:e})]})}a(82015)},91140:(e,t,a)=>{a.d(t,{Ay:()=>n,PB:()=>i,fs:()=>c});var l=a(8732),s=a(58150),r=a(82015),d=a.n(r);function n({children:e,title:t,data:a,fullPage:r,wrapperClasses:n,closePopupDispatch:i,wrapperStyle:o,noContainer:u}){return r?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(n||""),"data-popupid":t||null,style:o,children:[u?(0,l.jsx)(d().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),i&&i()},children:(0,l.jsx)(s.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[u?(0,l.jsx)(d().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]})}function i(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t?.(a))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},55904:(e,t,a)=>{a.d(t,{A:()=>d});var l=a(8732),s=a(82015),r=a.n(s);function d({children:e,column:t,className:a}){let s=r().useRef();return(0,l.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:s,children:e})}},24872:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(46169);async function s({tableName:e,columnName:t,value:a,dbFullName:s,dispatch:r,userId:d,dbId:n}){return await (0,l.A)(`/api/checkDuplicateData?tableName=${e}&type=${t}&value=${a}${s?"&dbFullName="+s:""}${d?"&userId="+d:""}${n?"&dbId="+n:""}`)}},23293:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},83101:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.r(t),a.d(t,{AddTableContext:()=>f,default:()=>h,getServerSideProps:()=>x});var s=a(8732),r=a(82015),d=a.n(r),n=a(25562),i=a(92702),c=a(62864),o=a(29802),u=a(55880),p=a(71934),b=a(72272),m=e([c,u]);[c,u]=m.then?(await m)():m;let f=d().createContext({});function h({user:e,database:t,tables:l,dbSchemaData:r,query:i}){let p=`Add Table To ${t.db_name}| Datasquirel`,b=a(45478),m=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:p}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[h,x]=d().useState(b),[y,g]=d().useState(null),[A,v]=d().useState(0),j=d().useRef(),N=y&&h?h.findIndex(e=>e.fieldName===y.fieldName):1;return(0,s.jsx)(f.Provider,{value:{user:e,dbSchemaData:r,database:t,tables:l,tableFields:h,setTableFields:x,targetField:y,setTargetField:g,pageRefresh:A,setPageRefresh:v,refreshFieldsListRef:j,query:i},children:(0,s.jsxs)(d().Fragment,{children:[(0,s.jsx)(n.A,{head:m,user:e,extraHeaderContent:(0,s.jsx)(u.A,{database:t,query:i,user:e}),children:(0,s.jsx)(c.A,{})}),y&&h&&(0,s.jsx)(o.A,{targetField:y,fieldIndex:N,tableFields:h,setTableFields:x,refreshFieldsListRef:j,database:t,user:e})]})})}async function x({req:e,res:t,query:a}){try{let l=await (0,i.default)(e,t);if(!l?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=await (0,p.A)(`SELECT * FROM user_databases WHERE user_id='${l.id}' AND db_slug='${a.single}'`);if(!s||!s[0])return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};let r=await (0,p.A)(`SELECT * FROM user_database_tables WHERE user_id='${l.id}' AND db_id='${s[0].id}'`),d=(0,b.A)({userId:l.id});if(!d)throw Error("User schema data not found!");return{props:{user:l,database:s[0],tables:r,dbSchemaData:d,query:a}}}catch(e){return console.log(e),{redirect:{destination:"/",permanent:!1}}}}l()}catch(e){l(e)}})},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},80255:e=>{e.exports=require("gsap")},43191:e=>{e.exports=require("gsap/Flip")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},45478:e=>{e.exports=JSON.parse('[{"fieldName":"id","dataType":"BIGINT","notNullValue":true,"primaryKey":true,"autoIncrement":true},{"fieldName":"uuid","dataType":"UUID","defaultValueLiteral":"UUID()"},{"fieldName":"date_created","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_created_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_created_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP"},{"fieldName":"date_updated","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"date_updated_code","dataType":"BIGINT","nullValue":true},{"fieldName":"date_updated_timestamp","dataType":"TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP","onUpdateLiteral":"CURRENT_TIMESTAMP"}]')}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),l=t.X(0,[883,9821,9796,5392,3634,3155,9901],()=>a(56501));module.exports=l})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js.nft.json index 6495d0d..3c3f7d5 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/tables/add-table.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../node_modules/gsap/package.json","../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../package-shared/data/defaultFields.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1614.js","../../../../../../chunks/2414.js","../../../../../../chunks/2451.js","../../../../../../chunks/2996.js","../../../../../../chunks/3247.js","../../../../../../chunks/3460.js","../../../../../../chunks/3737.js","../../../../../../chunks/3932.js","../../../../../../chunks/4050.js","../../../../../../chunks/4312.js","../../../../../../chunks/4333.js","../../../../../../chunks/4385.js","../../../../../../chunks/45.js","../../../../../../chunks/5134.js","../../../../../../chunks/5212.js","../../../../../../chunks/5264.js","../../../../../../chunks/5421.js","../../../../../../chunks/5664.js","../../../../../../chunks/5674.js","../../../../../../chunks/6521.js","../../../../../../chunks/7070.js","../../../../../../chunks/7640.js","../../../../../../chunks/8540.js","../../../../../../chunks/8613.js","../../../../../../chunks/883.js","../../../../../../chunks/8842.js","../../../../../../chunks/9600.js","../../../../../../chunks/9621.js","../../../../../../chunks/9732.js","../../../../../../chunks/9821.js","../../../../../../chunks/9914.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/gsap/Flip.js","../../../../../../../../node_modules/gsap/dist/gsap.js","../../../../../../../../node_modules/gsap/package.json","../../../../../../../../node_modules/gsap/utils/matrix.js","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/client.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../package-shared/data/dataTypes.json","../../../../../../../../package-shared/data/defaultFields.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1251.js","../../../../../../chunks/1579.js","../../../../../../chunks/194.js","../../../../../../chunks/2282.js","../../../../../../chunks/3155.js","../../../../../../chunks/3474.js","../../../../../../chunks/3496.js","../../../../../../chunks/3634.js","../../../../../../chunks/3704.js","../../../../../../chunks/3791.js","../../../../../../chunks/4627.js","../../../../../../chunks/5392.js","../../../../../../chunks/5839.js","../../../../../../chunks/5954.js","../../../../../../chunks/6160.js","../../../../../../chunks/6202.js","../../../../../../chunks/6521.js","../../../../../../chunks/6622.js","../../../../../../chunks/6903.js","../../../../../../chunks/725.js","../../../../../../chunks/7713.js","../../../../../../chunks/8704.js","../../../../../../chunks/8760.js","../../../../../../chunks/883.js","../../../../../../chunks/9796.js","../../../../../../chunks/9821.js","../../../../../../chunks/9901.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js index ce7e94a..635ce25 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=9974,e.ids=[9974],e.modules={74468:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{config:()=>b,default:()=>u,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>m,reportWebVitals:()=>h,routeModule:()=>y,unstable_getServerProps:()=>f,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>x});var a=t(63865),n=t(9455),l=t(30671),i=t(49407),o=t(89600),d=t(53702),c=e([d]);d=(c.then?(await c)():c)[0];let u=(0,l.M)(d,"default"),m=(0,l.M)(d,"getStaticProps"),p=(0,l.M)(d,"getStaticPaths"),g=(0,l.M)(d,"getServerSideProps"),b=(0,l.M)(d,"config"),h=(0,l.M)(d,"reportWebVitals"),x=(0,l.M)(d,"unstable_getStaticProps"),_=(0,l.M)(d,"unstable_getStaticPaths"),S=(0,l.M)(d,"unstable_getStaticParams"),f=(0,l.M)(d,"unstable_getServerProps"),v=(0,l.M)(d,"unstable_getServerSideProps"),y=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/users",pathname:"/admin/[user_id]/databases/[single]/users",bundlePath:"",filename:""},components:{App:o.default,Document:i.default},userland:d});r()}catch(e){r(e)}})},25969:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.d(s,{A:()=>b});var a=t(8732),n=t(82015),l=t.n(n),i=t(53702),o=t(58548),d=t(74504),c=t(86571),u=t(46437),m=t(62506),p=t(59621),g=e([i,p]);function b(e){let{user:s,users:t,table:r,setTargetUser:n,database:g}=l().useContext(i.UsersContext),[b,h]=l().useState(!1);return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,a.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(u.A,{}),(0,a.jsxs)("h1",{className:"text-3xl m-0",children:["Users in ",g.db_name]})]}),r?.tableName&&(0,a.jsxs)(m.A,{children:[(0,a.jsxs)("a",{href:`/admin/${s?.id}/databases/${g.db_slug}/users/add-user`,className:"gap-2 button",children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add New User"})]}),(0,a.jsx)("a",{href:`/admin/${s?.id}/databases/${g.db_slug}/users/add-social-logins`,className:"gap-2 button outlined",children:(0,a.jsx)("span",{children:"Social Logins"})})]})]}),(0,a.jsx)(o.A,{user:s})]}),g.active_clone?(0,a.jsx)(c.A,{database:g,user:s}):(0,a.jsx)(a.Fragment,{}),g.remote_connected?(0,a.jsx)(p.p,{database:g}):(0,a.jsx)(a.Fragment,{}),(0,a.jsx)("div",{className:"w-full grid grid-cols-1 items-start justify-start",children:(0,a.jsx)("div",{className:"flex-col items-stretch justify-start",children:(0,a.jsx)(d.A,{setTargetUser:n,user:s,users:t,table:r,database:g})})})]})}[i,p]=g.then?(await g)():g,r()}catch(e){r(e)}})},74504:(e,s,t)=>{t.d(s,{A:()=>o});var r=t(8732),a=t(82015),n=t.n(a);t(21347);var l=t(63715),i=t(32415);function o({user:e,table:s,setTargetUser:t,users:a,database:o}){let{active_clone:d,active_clone_parent_db:c,remote_connected:u}=o,[m,p]=n().useState(!1);return(0,r.jsxs)(n().Fragment,{children:[m&&(0,r.jsx)(i.A,{}),a&&a[0]?(0,r.jsx)(n().Fragment,{children:a.map((s,t)=>(0,r.jsxs)("a",{href:`/admin/${e?.id}/databases/${o.db_slug}/users/${s.id}`,className:"card",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[(0,r.jsx)("img",{src:s.image_thumbnail,alt:"",className:"w-10 h-10 rounded-full object-cover bg-slate-200"}),(0,r.jsxs)("div",{className:"flex-col items-start gap-1",children:[(0,r.jsxs)("span",{className:"font-bold",children:[s.first_name," ",s.last_name]}),(0,r.jsx)("span",{className:"text-xs text-slate-500",children:s.date_created?.substring(0,16)})]}),(0,r.jsx)("button",{className:"ml-auto outlined gray pointer-events-none",children:"Edit User"})]},t+1))}):s?.tableName?(0,r.jsx)("section",{className:"paper",children:(0,r.jsx)("span",{children:"No Users Added Yet"})}):(0,r.jsx)("section",{className:"paper",children:(0,r.jsx)("span",{children:"No User Table Present"})}),!s?.tableName&&!c&&!u&&(0,r.jsxs)("button",{className:"gap-4 py-3",onClick:e=>{window.confirm(`Add users table to ${o.db_name}?`)&&(p(!0),(0,l.A)("/api/addUsersTableToDatabase",{method:"post",body:{dbFullName:o.db_full_name,dbSlug:o.db_slug,dbId:o.id}},!0).then(e=>{console.log(e),e.success&&window.location.reload(),setTimeout(()=>{p(!1)},500)}))},children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add User Table"})]})]})}},21347:(e,s,t)=>{t.d(s,{A:()=>c});var r=t(8732),a=t(82015),n=t.n(a),l=t(55158),i=t(63715),o=t(32415),d=t(62506);function c({userObject:e,setTargetUser:s,paradigm:t}){let a=t?.match(/invited/)?`${e.inviteeFirstName} ${e.inviteeLastName} (${e.inviteeEmail})`:`${e.first_name} ${e.last_name} (${e.email})`,c=t?.match(/invited/)?`${e.inviteeImage}`:`${e.image_thumbnail}`,[u,m]=n().useState(!1);return(0,r.jsxs)("div",{className:"card no-hover items-center "+(t?.match(/invited/)?" green green-bg":" primary"),children:[u&&(0,r.jsx)(o.A,{}),(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)("img",{src:c,className:"w-8 h-8 rounded-full object-cover bg-slate-200",onError:e=>{e.target.src="/images/user-preset-thumbnail.png"}}),(0,r.jsx)("span",{className:"text-sm font-semibold",children:a}),e?.user_priviledge?.match(/./)&&(0,r.jsxs)("span",{className:"text-sm ml-auto text-slate-900/50",children:["Priviledges:"," ",(0,r.jsx)("span",{className:"text-slate-600 font-semibold",children:e.user_priviledge.split("|").join(" | ")})]}),!t?.match(/invited/)&&(0,r.jsx)(n().Fragment,{children:(0,r.jsxs)(d.A,{children:[(0,r.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:t=>{s(e),setTimeout(()=>{(0,l.PB)("target-user-popup")},200)},children:"Edit User Access"}),(0,r.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:s=>{m(!0),window.confirm("Delete this user")&&(0,i.A)("/api/deleteUserUser",{method:"post",body:{...e}},!0).then(e=>{setTimeout(()=>{m(!1)},500),window.location.reload()})},children:"Delete User"})]})})]})]})}},31651:(e,s,t)=>{t(81630);let r=t(77463);e.exports=async function({request:e,databaseSlug:s,user:t,query:a}){try{let n=t.id,l=null;if(!a?.delegated)return{dbUserId:n};let i=a.dbUserId,o=`${process.env.DSQL_USER_DB_PREFIX}${i}_${s}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${o}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let t=r({encryptedString:e.cookies[d]});if(!t)throw Error("Invalid Token");if((l=JSON.parse(t)).databaseSlug===s)return{dbUserId:n=l.rootUserId,rootUserId:l.rootUserId,rootUserName:l.rootUserName,rootUserEmail:l.rootUserEmail,rootUserImage:l.rootUserImage,databaseFullName:l.databaseFullName,databaseSlug:l.databaseSlug,allowedTables:l.allowedTables,priviledges:l.priviledges,database:l.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},89545:(e,s,t)=>{let r=t(77463),a=t(68743);e.exports=async function({unparsedResults:e,tableSchema:s}){let t=[];try{for(let n=0;n",s.message),e}}},22373:(e,s,t)=>{let r=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:s,component:t,noMail:a,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],s=n.headers["x-real-ip"],t=n.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||r||s||n.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== -Error Message: ${s} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` +"use strict";(()=>{var e={};e.id=9974,e.ids=[9974],e.modules={66234:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>b,default:()=>u,getServerSideProps:()=>p,getStaticPaths:()=>g,getStaticProps:()=>m,reportWebVitals:()=>f,routeModule:()=>j,unstable_getServerProps:()=>x,unstable_getServerSideProps:()=>y,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>S,unstable_getStaticProps:()=>h});var a=r(63865),n=r(9455),l=r(30671),i=r(5583),o=r(19796),d=r(41972),c=e([d]);d=(c.then?(await c)():c)[0];let u=(0,l.M)(d,"default"),m=(0,l.M)(d,"getStaticProps"),g=(0,l.M)(d,"getStaticPaths"),p=(0,l.M)(d,"getServerSideProps"),b=(0,l.M)(d,"config"),f=(0,l.M)(d,"reportWebVitals"),h=(0,l.M)(d,"unstable_getStaticProps"),S=(0,l.M)(d,"unstable_getStaticPaths"),_=(0,l.M)(d,"unstable_getStaticParams"),x=(0,l.M)(d,"unstable_getServerProps"),y=(0,l.M)(d,"unstable_getServerSideProps"),j=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/[single]/users",pathname:"/admin/[user_id]/databases/[single]/users",bundlePath:"",filename:""},components:{App:o.default,Document:i.default},userland:d});s()}catch(e){s(e)}})},61235:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{A:()=>b});var a=r(8732),n=r(82015),l=r.n(n),i=r(41972),o=r(53926),d=r(82722),c=r(537),u=r(59023),m=r(55904),g=r(23791),p=e([i,g]);function b(){let{user:e,users:t,table:r,setTargetUser:s,database:n}=l().useContext(i.UsersContext),[p,b]=l().useState(!1);return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,a.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(u.A,{}),(0,a.jsxs)("h1",{className:"text-3xl m-0",children:["Users in ",n.db_name]})]}),r?.tableName&&(0,a.jsxs)(m.A,{children:[(0,a.jsxs)("a",{href:`/admin/${e?.id}/databases/${n.db_slug}/users/add-user`,className:"gap-2 button",children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add New User"})]}),(0,a.jsx)("a",{href:`/admin/${e?.id}/databases/${n.db_slug}/users/add-social-logins`,className:"gap-2 button outlined",children:(0,a.jsx)("span",{children:"Social Logins"})})]})]}),(0,a.jsx)(o.A,{user:e})]}),n.active_clone?(0,a.jsx)(c.A,{database:n,user:e}):(0,a.jsx)(a.Fragment,{}),n.remote_connected?(0,a.jsx)(g.p,{database:n}):(0,a.jsx)(a.Fragment,{}),(0,a.jsx)("div",{className:"w-full grid grid-cols-1 items-start justify-start",children:(0,a.jsx)("div",{className:"flex-col items-stretch justify-start",children:(0,a.jsx)(d.A,{setTargetUser:s,user:e,users:t,table:r,database:n})})})]})}[i,g]=p.then?(await p)():p,s()}catch(e){s(e)}})},82722:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(8732),a=r(82015),n=r.n(a),l=r(46169),i=r(16757);function o({user:e,table:t,setTargetUser:r,users:a,database:o}){let{active_clone:d,active_clone_parent_db:c,remote_connected:u}=o,[m,g]=n().useState(!1);return(0,s.jsxs)(n().Fragment,{children:[m&&(0,s.jsx)(i.A,{}),a&&a[0]?(0,s.jsx)(n().Fragment,{children:a.map((t,r)=>(0,s.jsxs)("a",{href:`/admin/${e?.id}/databases/${o.db_slug}/users/${t.id}`,className:"card",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[(0,s.jsx)("img",{src:t.image_thumbnail,alt:"",className:"w-10 h-10 rounded-full object-cover bg-slate-200"}),(0,s.jsxs)("div",{className:"flex-col items-start gap-1",children:[(0,s.jsxs)("span",{className:"font-bold",children:[t.first_name," ",t.last_name]}),(0,s.jsx)("span",{className:"text-xs text-slate-500",children:t.date_created?.substring(0,16)})]}),(0,s.jsx)("button",{className:"ml-auto outlined gray pointer-events-none",children:"Edit User"})]},r+1))}):t?.tableName?(0,s.jsx)("section",{className:"paper",children:(0,s.jsx)("span",{children:"No Users Added Yet"})}):(0,s.jsx)("section",{className:"paper",children:(0,s.jsx)("span",{children:"No User Table Present"})}),!t?.tableName&&!c&&!u&&(0,s.jsxs)("button",{className:"gap-4 py-3",onClick:e=>{window.confirm(`Add users table to ${o.db_name}?`)&&(g(!0),(0,l.A)("/api/addUsersTableToDatabase",{method:"post",body:{dbFullName:o.db_full_name,dbSlug:o.db_slug,dbId:o.id}},!0).then(e=>{console.log(e),e.success&&window.location.reload(),setTimeout(()=>{g(!1)},500)}))},children:[(0,s.jsx)("span",{className:"symbol",children:"+"}),(0,s.jsx)("span",{children:"Add User Table"})]})]})}},22873:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(71205);async function a({request:e,databaseSlug:t,user:r,query:a}){try{let n=r.id,l=null;if(!a?.delegated)return{dbUserId:n};let i=a.dbUserId,o=`${process.env.DSQL_USER_DB_PREFIX}${i}_${t}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${o}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let r=(0,s.A)({encryptedString:e.cookies[d]});if(!r)throw Error("Invalid Token");if((l=JSON.parse(r)).databaseSlug===t)return{dbUserId:n=l.rootUserId,rootUserId:l.rootUserId,rootUserName:l.rootUserName,rootUserEmail:l.rootUserEmail,rootUserImage:l.rootUserImage,databaseFullName:l.databaseFullName,databaseSlug:l.databaseSlug,allowedTables:l.allowedTables,priviledges:l.priviledges,database:l.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},77047:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(29021),a=r.n(s);async function n({user:e,message:t,component:r,noMail:s,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],r=n.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],a=r||s||t||n.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +Error Message: ${t} +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(a+=` -URL: ${n.url}`),n?.body&&(a+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(a+=` -IP: ${i}`),a+=` +User Email: ${e?.email}`),n?.url&&(s+=` +URL: ${n.url}`),n?.body&&(s+=` +Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(s+=` +IP: ${i}`),s+=` Date: ${l.toDateString()} -========================================`,r.existsSync("./.tmp/error.log")||r.writeFileSync("./.tmp/error.log","","utf-8");let o=r.readFileSync("./.tmp/error.log","utf-8");r.writeFileSync("./.tmp/error.log",a),r.appendFileSync("./.tmp/error.log",` +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let o=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",s),a().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},90378:(e,s,t)=>{t(29021);let r=t(89545),a=t(22373),n=t(67216),l=t(1231),i=t(88896);e.exports=async function({queryString:e,queryValuesArray:s,database:t,tableSchema:o,useLocal:d}){let c;let u=!!d||!!t?.match(/^datasquirel$/),m=d?i:u?n:l;try{c=e&&s&&Array.isArray(s)&&s[0]?u?await m(e,s):await m({paradigm:"Full Access",database:t,queryString:e,queryValues:s}):u?await m(e):await m({paradigm:"Full Access",database:t,queryString:e})}catch(e){a({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&o)try{let e=c;return await r({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),a({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},1231:(e,s,t)=>{let r=t(29021);t(33873);let a=t(9973),n=t(31976),l=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:s,queryString:t,queryValues:i}){try{return new Promise((o,d)=>{let c=!!e?.match(/full.access|^fa$/i);try{function u(e){l.end(),o(JSON.parse(JSON.stringify(e)))}function m(e){l.end(),o({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}l=c?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:s,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:s,ssl:n()}}),i&&Array.isArray(i)&&i[0]?l.query(t,i).then(u).catch(m):l.query(t).then(u).catch(m)}catch(e){r.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),o({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,s,t)=>{let r=t(9973),a=t(31976);async function n(...e){let s=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await s.query(...e);return await s.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},53702:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{UsersContext:()=>D,default:()=>f,getServerSideProps:()=>v});var a=t(8732),n=t(82015),l=t.n(n),i=t(95222),o=t(20048),d=t.n(o),c=t(84312),u=t(90378),m=t.n(u),p=t(25969),g=t(64098),b=t(31651),h=t.n(b),x=t(67216),_=t.n(x),S=e([p,g]);[p,g]=S.then?(await S)():S;let y=t(29021),D=l().createContext({});function f({user:e,database:s,table:t,dbSchemaData:r,users:n,query:o,confirmedDelegetedUser:d}){let u=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Users | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[m,b]=l().useState(null),[h,x]=l().useState(null);return(0,a.jsx)(D.Provider,{value:{user:e,users:n,targetUser:h,setTargetUser:x,database:s,table:t,dbSchemaData:r,query:o,confirmedDelegetedUser:d},children:(0,a.jsxs)(l().Fragment,{children:[(0,a.jsx)(i.A,{head:u,user:e,extraHeaderContent:(0,a.jsx)(g.A,{database:s,query:o,confirmedDelegetedUser:d,user:e}),children:(0,a.jsx)(p.A,{})}),(0,a.jsx)(c.A,{targetUser:h,user:e,setTargetUser:x})]})})}async function v({req:e,res:s,query:t}){try{let r=await d()(e,s);if(!r?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let a=await h()({request:e,user:r,databaseSlug:t.single,query:t});if(!a)throw Error("No Db Object Found!");let{dbUserId:n,rootUserId:l}=a,i=await _()(`SELECT * FROM user_databases WHERE user_id='${n}' AND db_slug='${t.single}'`);if(!i||!i[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let o=JSON.parse(y.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${n}/main.json`,"utf-8")),c=(o.filter(e=>e.dbFullName===i[0].db_full_name)[0]?.tables).filter(e=>"users"===e.tableName)[0],u=await m()({database:i[0].db_full_name,queryString:"SELECT * FROM users LIMIT 20",tableSchema:c});return{props:{user:r,database:i[0],table:c||{},dbSchemaData:o,users:u?.error?[]:u,query:t,confirmedDelegetedUser:a}}}catch(e){return console.log("Db Users Error =>",e.message),{redirect:{destination:"/admin",permanent:!1}}}}r()}catch(e){r(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var s=require("../../../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,6521,9600,7070,5134,9621,4312],()=>t(74468));module.exports=r})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(71205);let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:t}){let r=[];try{for(let n=0;n",t.message),e}}var l=r(77047),i=r(71934),o=r(43651),d=r(16175);async function c({queryString:e,queryValuesArray:t,database:r,tableSchema:s,useLocal:a}){let c;let u=!!a||!!r?.match(/^datasquirel$/),m=a?d.A:u?i.A:o.A;try{c=e&&t&&Array.isArray(t)&&t[0]?u?await m(e,t):await m({paradigm:"Full Access",queryString:e,queryValues:t}):u?await m(e):await m({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,l.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&s)try{let e=c;return await n({unparsedResults:e,tableSchema:s})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",r,e),(0,l.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},43651:(e,t,r)=>{async function s(e,t,r){try{if("string"==typeof t){let s=await e.query(a(t),r);return JSON.parse(JSON.stringify(s))}if("object"!=typeof t)return null;{let r=[];for(let s=0;sn})},16175:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(9973),a=r.n(s),n=r(29021),l=r.n(n);async function i(...e){let t=a()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!l().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},41972:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{UsersContext:()=>x,default:()=>S,getServerSideProps:()=>_});var a=r(8732),n=r(29021),l=r.n(n),i=r(82015),o=r.n(i),d=r(25562),c=r(92702),u=r(55954),m=r(52854),g=r(61235),p=r(55880),b=r(22873),f=r(71934),h=e([g,p]);[g,p]=h.then?(await h)():h;let x=o().createContext({});function S({user:e,database:t,table:r,dbSchemaData:s,users:n,query:l,confirmedDelegetedUser:i}){let c=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Users | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[m,b]=o().useState(null),[f,h]=o().useState();return(0,a.jsx)(x.Provider,{value:{user:e,users:n,targetUser:f,setTargetUser:h,database:t,table:r,dbSchemaData:s,query:l,confirmedDelegetedUser:i},children:(0,a.jsxs)(o().Fragment,{children:[(0,a.jsx)(d.A,{head:c,user:e,extraHeaderContent:(0,a.jsx)(p.A,{database:t,query:l,confirmedDelegetedUser:i,user:e}),children:(0,a.jsx)(g.A,{})}),f&&(0,a.jsx)(u.A,{targetUser:f,user:e,setTargetUser:h})]})})}async function _({req:e,res:t,query:r}){try{let s=await (0,c.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let a=await (0,b.A)({request:e,user:s,databaseSlug:r.single,query:r});if(!a)throw Error("No Db Object Found!");let{dbUserId:n,rootUserId:i}=a,o=await (0,f.A)(`SELECT * FROM user_databases WHERE user_id='${n}' AND db_slug='${r.single}'`);if(!o||!o[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let d=JSON.parse(l().readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${n}/main.json`,"utf-8")),u=(d.filter(e=>e.dbFullName===o[0].db_full_name)[0]?.tables).filter(e=>"users"===e.tableName)[0],g=await (0,m.A)({database:o[0].db_full_name,queryString:`SELECT * FROM ${o[0].db_full_name}.users LIMIT 20`,tableSchema:u});return{props:{user:s,database:o[0],table:u||{},dbSchemaData:d,users:g?.error?[]:g,query:r,confirmedDelegetedUser:a}}}catch(e){return console.log("Db Users Error =>",e.message),{redirect:{destination:"/admin",permanent:!1}}}}s()}catch(e){s(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,6521,9796,5392,3634,3791,5954],()=>r(66234));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js.nft.json index 5a24e23..9f3d0f5 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../jsonData/userPriviledges.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1614.js","../../../../../chunks/2414.js","../../../../../chunks/2451.js","../../../../../chunks/2996.js","../../../../../chunks/3247.js","../../../../../chunks/3460.js","../../../../../chunks/3737.js","../../../../../chunks/3932.js","../../../../../chunks/4050.js","../../../../../chunks/4312.js","../../../../../chunks/4333.js","../../../../../chunks/4385.js","../../../../../chunks/45.js","../../../../../chunks/5134.js","../../../../../chunks/5212.js","../../../../../chunks/5264.js","../../../../../chunks/5421.js","../../../../../chunks/5664.js","../../../../../chunks/5674.js","../../../../../chunks/6521.js","../../../../../chunks/7070.js","../../../../../chunks/7640.js","../../../../../chunks/8540.js","../../../../../chunks/8613.js","../../../../../chunks/883.js","../../../../../chunks/8842.js","../../../../../chunks/9600.js","../../../../../chunks/9621.js","../../../../../chunks/9732.js","../../../../../chunks/9821.js","../../../../../chunks/9914.js","../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../jsonData/userPriviledges.json","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1251.js","../../../../../chunks/1579.js","../../../../../chunks/194.js","../../../../../chunks/2282.js","../../../../../chunks/3155.js","../../../../../chunks/3474.js","../../../../../chunks/3496.js","../../../../../chunks/3634.js","../../../../../chunks/3704.js","../../../../../chunks/3791.js","../../../../../chunks/4627.js","../../../../../chunks/5392.js","../../../../../chunks/5839.js","../../../../../chunks/5954.js","../../../../../chunks/6160.js","../../../../../chunks/6202.js","../../../../../chunks/6521.js","../../../../../chunks/6622.js","../../../../../chunks/6903.js","../../../../../chunks/725.js","../../../../../chunks/7713.js","../../../../../chunks/8704.js","../../../../../chunks/8760.js","../../../../../chunks/883.js","../../../../../chunks/9796.js","../../../../../chunks/9821.js","../../../../../chunks/9901.js","../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js index 1a7df6d..3a57f95 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2602,e.ids=[2602],e.modules={68126:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>P,default:()=>l,getServerSideProps:()=>S,getStaticPaths:()=>g,getStaticProps:()=>c,reportWebVitals:()=>m,routeModule:()=>_,unstable_getServerProps:()=>M,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>x,unstable_getStaticProps:()=>b});var a=r(63865),i=r(9455),u=r(30671),o=r(49407),p=r(89600),n=r(87730),d=e([n]);n=(d.then?(await d)():d)[0];let l=(0,u.M)(n,"default"),c=(0,u.M)(n,"getStaticProps"),g=(0,u.M)(n,"getStaticPaths"),S=(0,u.M)(n,"getServerSideProps"),P=(0,u.M)(n,"config"),m=(0,u.M)(n,"reportWebVitals"),b=(0,u.M)(n,"unstable_getStaticProps"),x=(0,u.M)(n,"unstable_getStaticPaths"),q=(0,u.M)(n,"unstable_getStaticParams"),M=(0,u.M)(n,"unstable_getServerProps"),v=(0,u.M)(n,"unstable_getServerSideProps"),_=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]",pathname:"/admin/[user_id]/databases/[single]/users/[user]",bundlePath:"",filename:""},components:{App:p.default,Document:o.default},userland:n});s()}catch(e){s(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,5134,1614,9914],()=>r(68126));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2602,e.ids=[2602],e.modules={82960:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>m,default:()=>l,getServerSideProps:()=>S,getStaticPaths:()=>g,getStaticProps:()=>c,reportWebVitals:()=>P,routeModule:()=>v,unstable_getServerProps:()=>M,unstable_getServerSideProps:()=>f,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>x});var a=r(63865),i=r(9455),u=r(30671),o=r(5583),n=r(19796),p=r(50264),d=e([p]);p=(d.then?(await d)():d)[0];let l=(0,u.M)(p,"default"),c=(0,u.M)(p,"getStaticProps"),g=(0,u.M)(p,"getStaticPaths"),S=(0,u.M)(p,"getServerSideProps"),m=(0,u.M)(p,"config"),P=(0,u.M)(p,"reportWebVitals"),x=(0,u.M)(p,"unstable_getStaticProps"),b=(0,u.M)(p,"unstable_getStaticPaths"),q=(0,u.M)(p,"unstable_getStaticParams"),M=(0,u.M)(p,"unstable_getServerProps"),f=(0,u.M)(p,"unstable_getServerSideProps"),v=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]",pathname:"/admin/[user_id]/databases/[single]/users/[user]",bundlePath:"",filename:""},components:{App:n.default,Document:o.default},userland:p});s()}catch(e){s(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,3634,3474],()=>r(82960));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js.nft.json index e1cf0cd..113cdc3 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1614.js","../../../../../../chunks/2414.js","../../../../../../chunks/2451.js","../../../../../../chunks/2996.js","../../../../../../chunks/3247.js","../../../../../../chunks/3460.js","../../../../../../chunks/3737.js","../../../../../../chunks/3932.js","../../../../../../chunks/4050.js","../../../../../../chunks/4312.js","../../../../../../chunks/4333.js","../../../../../../chunks/4385.js","../../../../../../chunks/45.js","../../../../../../chunks/5134.js","../../../../../../chunks/5212.js","../../../../../../chunks/5264.js","../../../../../../chunks/5421.js","../../../../../../chunks/5664.js","../../../../../../chunks/5674.js","../../../../../../chunks/6521.js","../../../../../../chunks/7070.js","../../../../../../chunks/7640.js","../../../../../../chunks/8540.js","../../../../../../chunks/8613.js","../../../../../../chunks/883.js","../../../../../../chunks/8842.js","../../../../../../chunks/9600.js","../../../../../../chunks/9621.js","../../../../../../chunks/9732.js","../../../../../../chunks/9821.js","../../../../../../chunks/9914.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1251.js","../../../../../../chunks/1579.js","../../../../../../chunks/194.js","../../../../../../chunks/2282.js","../../../../../../chunks/3155.js","../../../../../../chunks/3474.js","../../../../../../chunks/3496.js","../../../../../../chunks/3634.js","../../../../../../chunks/3704.js","../../../../../../chunks/3791.js","../../../../../../chunks/4627.js","../../../../../../chunks/5392.js","../../../../../../chunks/5839.js","../../../../../../chunks/5954.js","../../../../../../chunks/6160.js","../../../../../../chunks/6202.js","../../../../../../chunks/6521.js","../../../../../../chunks/6622.js","../../../../../../chunks/6903.js","../../../../../../chunks/725.js","../../../../../../chunks/7713.js","../../../../../../chunks/8704.js","../../../../../../chunks/8760.js","../../../../../../chunks/883.js","../../../../../../chunks/9796.js","../../../../../../chunks/9821.js","../../../../../../chunks/9901.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js index 961ff34..db0792e 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6377,e.ids=[6377],e.modules={50609:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{config:()=>x,default:()=>c,getServerSideProps:()=>g,getStaticPaths:()=>m,getStaticProps:()=>p,reportWebVitals:()=>h,routeModule:()=>b,unstable_getServerProps:()=>P,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>w});var a=t(63865),i=t(9455),n=t(30671),d=t(49407),l=t(89600),o=t(65956),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,n.M)(o,"default"),p=(0,n.M)(o,"getStaticProps"),m=(0,n.M)(o,"getStaticPaths"),g=(0,n.M)(o,"getServerSideProps"),x=(0,n.M)(o,"config"),h=(0,n.M)(o,"reportWebVitals"),w=(0,n.M)(o,"unstable_getStaticProps"),f=(0,n.M)(o,"unstable_getStaticPaths"),v=(0,n.M)(o,"unstable_getStaticParams"),P=(0,n.M)(o,"unstable_getServerProps"),S=(0,n.M)(o,"unstable_getServerSideProps"),b=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]/change-password",pathname:"/admin/[user_id]/databases/[single]/users/[user]/change-password",bundlePath:"",filename:""},components:{App:l.default,Document:d.default},userland:o});r()}catch(e){r(e)}})},91736:(e,s,t)=>{t.d(s,{A:()=>u});var r=t(8732),a=t(82015),i=t.n(a),n=t(58548),d=t(46437),l=t(63715),o=t(32415);function u({singleUser:e,database:s,user:t}){let[a,u]=i().useState(!1);return(0,r.jsxs)(i().Fragment,{children:[a&&(0,r.jsx)(o.A,{width:"20px"}),(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(d.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Change Password For"," ",(0,r.jsxs)("u",{children:[e.first_name," ",e.last_name]})]})]})}),(0,r.jsx)(n.A,{user:t})]}),(0,r.jsx)("section",{className:"paper",children:(0,r.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,r.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:r=>{r.preventDefault(),u(!0);let a=document.getElementById("password"),i=document.getElementById("password-repeat"),n=RegExp(`${a.value}`);if(!i?.value?.match(n)){window.alert("Passwords dont Match!");return}if(!window.confirm("change this User's password?")){u(!1);return}(0,l.A)("/api/changeDbUserPassword",{method:"POST",body:{userId:e.id,password:a.value,dbId:s.id}},!0).then(r=>{r.success&&(window.location.pathname=`/admin/${t?.id}/databases/${s.db_slug}/users/${e.id}`)}).catch(e=>{console.log(e.message)}).finally(()=>{setTimeout(()=>{u(!1)},2e3)})},children:[(0,r.jsx)("input",{id:"password",name:"password",type:"password",placeholder:"New Password",required:!0}),(0,r.jsx)("input",{id:"password-repeat",name:"password-repeat",type:"password",placeholder:"Repeat New Password",onInput:e=>{let s=document.getElementById("password"),t=document.getElementById("password-repeat"),r=s?.value?RegExp(`${s.value}`):null;r&&(t?.value?.match(r)?t.classList.remove("warning"):t.classList.add("warning"))},required:!0}),(0,r.jsx)("button",{children:"Change Password"})]})})})]})}},65956:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{default:()=>u,getServerSideProps:()=>c});var a=t(8732);t(82015);var i=t(95222),n=t(64098),d=t(87730),l=t(91736),o=e([n,d]);function u({user:e,database:s,table:t,dbSchemaData:r,singleUser:d,query:o,confirmedDelegetedUser:u}){let c=`${d.first_name} ${d.last_name} Users | Datasquirel"`,p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:c}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,a.jsx)(i.A,{head:p,user:e,extraHeaderContent:(0,a.jsx)(n.A,{database:s,query:o,confirmedDelegetedUser:u,user:e}),children:(0,a.jsx)(l.A,{singleUser:d,database:s,user:e})})}[n,d]=o.then?(await o)():o;let c=d.getServerSideProps;r()}catch(e){r(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var s=require("../../../../../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,9600,7070,5134,1614,9914],()=>t(50609));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6377,e.ids=[6377],e.modules={6231:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{config:()=>g,default:()=>c,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>p,reportWebVitals:()=>h,routeModule:()=>b,unstable_getServerProps:()=>P,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>w});var a=t(63865),i=t(9455),d=t(30671),n=t(5583),l=t(19796),o=t(58262),u=e([o]);o=(u.then?(await u)():u)[0];let c=(0,d.M)(o,"default"),p=(0,d.M)(o,"getStaticProps"),m=(0,d.M)(o,"getStaticPaths"),x=(0,d.M)(o,"getServerSideProps"),g=(0,d.M)(o,"config"),h=(0,d.M)(o,"reportWebVitals"),w=(0,d.M)(o,"unstable_getStaticProps"),f=(0,d.M)(o,"unstable_getStaticPaths"),v=(0,d.M)(o,"unstable_getStaticParams"),P=(0,d.M)(o,"unstable_getServerProps"),S=(0,d.M)(o,"unstable_getServerSideProps"),b=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/[user]/change-password",pathname:"/admin/[user_id]/databases/[single]/users/[user]/change-password",bundlePath:"",filename:""},components:{App:l.default,Document:n.default},userland:o});r()}catch(e){r(e)}})},63378:(e,s,t)=>{t.d(s,{A:()=>u});var r=t(8732),a=t(82015),i=t.n(a),d=t(53926),n=t(59023),l=t(46169),o=t(16757);function u({singleUser:e,database:s,user:t}){let[a,u]=i().useState(!1);return(0,r.jsxs)(i().Fragment,{children:[a&&(0,r.jsx)(o.A,{width:"20px"}),(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(n.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Change Password For"," ",(0,r.jsxs)("u",{children:[e.first_name," ",e.last_name]})]})]})}),(0,r.jsx)(d.A,{user:t})]}),(0,r.jsx)("section",{className:"paper",children:(0,r.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,r.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:r=>{r.preventDefault(),u(!0);let a=document.getElementById("password"),i=document.getElementById("password-repeat"),d=RegExp(`${a.value}`);if(!i?.value?.match(d)){window.alert("Passwords dont Match!");return}if(!window.confirm("change this User's password?")){u(!1);return}(0,l.A)("/api/changeDbUserPassword",{method:"POST",body:{userId:e.id,password:a.value,dbId:s.id}},!0).then(r=>{r.success&&(window.location.pathname=`/admin/${t?.id}/databases/${s.db_slug}/users/${e.id}`)}).catch(e=>{console.log(e.message)}).finally(()=>{setTimeout(()=>{u(!1)},2e3)})},children:[(0,r.jsx)("input",{id:"password",name:"password",type:"password",placeholder:"New Password",required:!0}),(0,r.jsx)("input",{id:"password-repeat",name:"password-repeat",type:"password",placeholder:"Repeat New Password",onInput:e=>{let s=document.getElementById("password"),t=document.getElementById("password-repeat"),r=s?.value?RegExp(`${s.value}`):null;r&&(t?.value?.match(r)?t.classList.remove("warning"):t.classList.add("warning"))},required:!0}),(0,r.jsx)("button",{children:"Change Password"})]})})})]})}},58262:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{default:()=>u,getServerSideProps:()=>c});var a=t(8732);t(82015);var i=t(25562),d=t(55880),n=t(50264),l=t(63378),o=e([d,n]);function u({user:e,database:s,table:t,dbSchemaData:r,singleUser:n,query:o,confirmedDelegetedUser:u}){let c=`${n.first_name} ${n.last_name} Users | Datasquirel"`,p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:c}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,a.jsx)(i.A,{head:p,user:e,extraHeaderContent:(0,a.jsx)(d.A,{database:s,query:o,confirmedDelegetedUser:u,user:e}),children:(0,a.jsx)(l.A,{singleUser:n,database:s,user:e})})}[d,n]=o.then?(await o)():o;let c=n.getServerSideProps;r()}catch(e){r(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var s=require("../../../../../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,9796,5392,3634,3474],()=>t(6231));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js.nft.json index 11a59de..cd80c7c 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/[user]/change-password.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1614.js","../../../../../../../chunks/2414.js","../../../../../../../chunks/2451.js","../../../../../../../chunks/2996.js","../../../../../../../chunks/3247.js","../../../../../../../chunks/3460.js","../../../../../../../chunks/3737.js","../../../../../../../chunks/3932.js","../../../../../../../chunks/4050.js","../../../../../../../chunks/4312.js","../../../../../../../chunks/4333.js","../../../../../../../chunks/4385.js","../../../../../../../chunks/45.js","../../../../../../../chunks/5134.js","../../../../../../../chunks/5212.js","../../../../../../../chunks/5264.js","../../../../../../../chunks/5421.js","../../../../../../../chunks/5664.js","../../../../../../../chunks/5674.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/7070.js","../../../../../../../chunks/7640.js","../../../../../../../chunks/8540.js","../../../../../../../chunks/8613.js","../../../../../../../chunks/883.js","../../../../../../../chunks/8842.js","../../../../../../../chunks/9600.js","../../../../../../../chunks/9621.js","../../../../../../../chunks/9732.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9914.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../../node_modules/client-only/index.js","../../../../../../../../../node_modules/client-only/package.json","../../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../../node_modules/inherits/package.json","../../../../../../../../../node_modules/isarray/index.js","../../../../../../../../../node_modules/isarray/package.json","../../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../../node_modules/lodash/package.json","../../../../../../../../../node_modules/mysql/index.js","../../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../../node_modules/mysql/package.json","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../../node_modules/next/head.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../../package.json","../../../../../../../../package.json","../../../../../../../chunks/1251.js","../../../../../../../chunks/1579.js","../../../../../../../chunks/194.js","../../../../../../../chunks/2282.js","../../../../../../../chunks/3155.js","../../../../../../../chunks/3474.js","../../../../../../../chunks/3496.js","../../../../../../../chunks/3634.js","../../../../../../../chunks/3704.js","../../../../../../../chunks/3791.js","../../../../../../../chunks/4627.js","../../../../../../../chunks/5392.js","../../../../../../../chunks/5839.js","../../../../../../../chunks/5954.js","../../../../../../../chunks/6160.js","../../../../../../../chunks/6202.js","../../../../../../../chunks/6521.js","../../../../../../../chunks/6622.js","../../../../../../../chunks/6903.js","../../../../../../../chunks/725.js","../../../../../../../chunks/7713.js","../../../../../../../chunks/8704.js","../../../../../../../chunks/8760.js","../../../../../../../chunks/883.js","../../../../../../../chunks/9796.js","../../../../../../../chunks/9821.js","../../../../../../../chunks/9901.js","../../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js index df2de6c..2740606 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=201,e.ids=[201],e.modules={3589:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{config:()=>h,default:()=>m,getServerSideProps:()=>x,getStaticPaths:()=>p,getStaticProps:()=>u,reportWebVitals:()=>g,routeModule:()=>b,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>y,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>w,unstable_getStaticProps:()=>f});var s=t(63865),r=t(9455),i=t(30671),n=t(49407),o=t(89600),d=t(85012),c=e([d]);d=(c.then?(await c)():c)[0];let m=(0,i.M)(d,"default"),u=(0,i.M)(d,"getStaticProps"),p=(0,i.M)(d,"getStaticPaths"),x=(0,i.M)(d,"getServerSideProps"),h=(0,i.M)(d,"config"),g=(0,i.M)(d,"reportWebVitals"),f=(0,i.M)(d,"unstable_getStaticProps"),w=(0,i.M)(d,"unstable_getStaticPaths"),v=(0,i.M)(d,"unstable_getStaticParams"),j=(0,i.M)(d,"unstable_getServerProps"),y=(0,i.M)(d,"unstable_getServerSideProps"),b=new s.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/add-social-logins",pathname:"/admin/[user_id]/databases/[single]/users/add-social-logins",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:d});l()}catch(e){l(e)}})},84851:(e,a,t)=>{let l;t.d(a,{A:()=>u});var s=t(8732),r=t(82015),i=t.n(r),n=t(63715),o=t(64535),d=t(32415),c=t(13737),m=t(77826);function u({targetDb:e,database:a,user:t,userImage:r,setUserImage:u}){let[p,x]=i().useState(null),[h,g]=i().useState(!1);return(0,s.jsxs)(i().Fragment,{children:[h&&(0,s.jsx)(d.A,{}),p&&(0,s.jsx)(o.A,{message:p}),(0,s.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User information"}),(0,s.jsx)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:(0,s.jsx)(c.A,{title:"First Name",inputType:"text",name:"first_name",autoComplete:"given-name",onInputHandler:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),x(null)):a.classList.add("warning")},required:!0})}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"last_name",children:"Last Name"}),(0,s.jsx)("input",{type:"text",name:"last_name",id:"last_name",placeholder:"Last Name",autoComplete:"family-name",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),x(null)):a.classList.add("warning")},required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"username",children:"Username"}),(0,s.jsx)("input",{type:"text",name:"username",id:"username",placeholder:"Username",autoComplete:"username",onInput:a=>{let t=a.target;t.value.match(/./)?(t.classList.remove("warning"),x(null)):t.classList.add("warning"),window.clearTimeout(l),l=setTimeout(()=>{(0,n.A)(`/api/checkDuplicateData?type=username&value=${t.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(x("Username Already Exists"),t.classList.add("warning")):(x(null),t.classList.remove("warning"))})},300)}})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"email_address",children:"Email Address"}),(0,s.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",onInput:a=>{window.clearTimeout(l);let t=a.target;l=setTimeout(()=>{(0,n.A)(`/api/checkDuplicateData?type=email&value=${t.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(x("Email Already Exists"),t.classList.add("warning")):(x(null),t.classList.remove("warning"))})},300)},required:!0})]}),(0,s.jsx)(c.A,{title:"Phone Number",inputType:"text",name:"phone",autoComplete:"tel"}),(0,s.jsx)(c.A,{title:"Address",name:"address",autoComplete:"address"}),(0,s.jsxs)("div",{className:"flex-wrap xl:flex-nowrap",children:[(0,s.jsx)(c.A,{title:"City",name:"city",autoComplete:"city"}),(0,s.jsx)(c.A,{title:"State",name:"state",autoComplete:"state"}),(0,s.jsx)(c.A,{title:"Country",name:"country",autoComplete:"country"}),(0,s.jsx)(c.A,{title:"Zip Code",name:"zip_code",autoComplete:"zip_code"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"password",children:"Password"}),(0,s.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password",required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"confirm_password",children:"Confirm Password"}),(0,s.jsx)("input",{type:"password",name:"confirm_password",id:"confirm_password",placeholder:"Confirm Password",onInput:e=>{let a=e.target;a.closest("form")?.password.value===a.value?a.classList.remove("warning"):a.classList.add("warning")},required:!0})]}),(0,s.jsxs)("div",{className:"paper",children:[(0,s.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"User Image"}),(0,s.jsx)(m.A,{userImage:r,setUserImage:u,className:"w-full"})]})]})}},26860:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.d(a,{A:()=>h});var s=t(8732),r=t(82015),i=t.n(r),n=t(58548),o=t(46437),d=t(63715),c=t(32415);t(84851);var m=t(85012),u=t(43656),p=t(58403),x=e([m]);function h(e){let{user:a,database:t,socialLogins:l}=i().useContext(m.AddSocialLoginsContext),[r,x]=i().useState(!1),[h,g]=i().useState(l&&l[0]?.paradigm?.match(/personal/i)?"personal":"datasquirel"),[f,w]=i().useState(l&&l[0]?l:[]),v=h?.match(/datasquirel/i)?(0,s.jsxs)("span",{children:["All social media logins on your site will be done using datasquirel credentials. Please note that you ",(0,s.jsx)("b",{children:"MUST"})," ","add your domain for this to work."]}):h?.match(/personal/i)?(0,s.jsx)("span",{children:"You need to setup your credentials in respective providers and put those credentials in the appropriate fields provided."}):"";return(0,s.jsxs)(i().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(o.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:["Add Social Logins to ",t.db_name]})]})}),(0,s.jsx)(n.A,{user:a})]}),(0,s.jsxs)("section",{className:"paper",children:[r&&(0,s.jsx)(c.A,{screen:!0}),(0,s.jsx)(u.A,{radioValues:[{title:"Use Datasquirel Credentials",payload:"datasquirel",default:!!h?.match(/datasquirel/i)},{title:"Use Your Own Credentials",payload:"personal",default:!!h?.match(/personal/i)}],flexRow:!0,name:"select-paradigm",onChangeHandler:e=>{g(null),setTimeout(()=>{g(e.target.value)},500)}}),(0,s.jsxs)("div",{className:"max-w-2xl w-full flex-col items-start",children:[(0,s.jsx)("div",{className:"info gray font-normal mb-4",children:v}),h?(0,s.jsx)(p.A,{checkBoxValues:["Github","Google"].map((e,a)=>{let t=l?.filter(a=>a.platform===e.toLocaleLowerCase()),r=t&&t[0]?t[0]:null;return{title:e,payload:e.toLowerCase(),className:"w-full",jsx:(0,s.jsxs)("div",{className:"card grow",children:[(0,s.jsx)("img",{src:`/images/${e.toLowerCase()}.png`,alt:`${e} icon`,className:"avatar small"}),(0,s.jsxs)("div",{className:"content",children:[(0,s.jsx)("span",{className:"title",children:e}),h?.match(/personal/)?(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("input",{type:"text",name:`${e.toLowerCase()}-client-id`,id:`${e.toLowerCase()}-client-id`,placeholder:"Client Id",onInput:a=>{let t=a.target,l=f.filter(a=>a.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].clientId=t.value)},defaultValue:r?.clientId?r.clientId:void 0}),(0,s.jsx)("input",{type:"text",name:`${e.toLowerCase()}-client-secret`,id:`${e.toLowerCase()}-client-secret`,placeholder:"Client Secret",onInput:a=>{let t=a.target,l=f.filter(a=>a.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].clientSecret=t.value)},defaultValue:r?.clientSecret?r.clientSecret:void 0}),(0,s.jsx)("input",{type:"text",name:`${e.toLowerCase()}-callback-url`,id:`${e.toLowerCase()}-callback-url`,placeholder:"Callback URL",onInput:a=>{let t=a.target,l=f.filter(a=>a.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].callbackUrl=t.value)},defaultValue:r?.callbackUrl?r.callbackUrl:void 0})]}):(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("input",{type:"text",name:`${e.toLowerCase()}-domain-1`,id:`${e.toLowerCase()}-domain-1`,placeholder:"Domain 1",onInput:a=>{let t=a.target,l=f.filter(a=>a.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].domain1=t.value)},defaultValue:r?.domain1?r.domain1:void 0}),(0,s.jsx)("input",{type:"text",name:`${e.toLowerCase()}-domain-2`,id:`${e.toLowerCase()}-domain-2`,placeholder:"Domain 2",onInput:a=>{let t=a.target,l=f.filter(a=>a.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].domain2=t.value)},defaultValue:r?.domain2?r.domain2:void 0})]})]})]}),onChangeHandler:a=>{let t=a.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-client-id']`)?.value,l=a.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-client-secret']`)?.value,s=a.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-callback-url']`)?.value,r=a.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-domain-1']`)?.value,i=a.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-domain2']`)?.value,n={platform:e.toLowerCase(),clientId:t,clientSecret:l,callbackUrl:s,domain1:r,domain2:i};a.target.checked?w(e=>[...e,n]):w(e=>e.filter(e=>e.platform!==n.platform))},default:!!r}}),name:"social-platforms",className:"w-full"}):(0,s.jsx)("div",{className:"w-full p-10",children:(0,s.jsx)(c.A,{position:"relative",width:"20px"})}),f&&f[0]&&(0,s.jsx)("button",{className:"w-full more-padding",onClick:e=>{x(!0);let a={dbFullName:t.db_full_name,dbSlug:t.db_slug,paradigm:h,platforms:f};(0,d.A)("/api/addSocialLogin",{method:"post",body:a},!0).then(e=>{e?.success?window.location.reload():window.alert(e.msg),setTimeout(()=>{x(!1)},1e3)})},children:"Add Social Logins"})]})]})]})}m=(x.then?(await x)():x)[0],l()}catch(e){l(e)}})},58403:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({name:e,checkBoxValues:a,setAlert:t,labelColor:s,flexRow:r,baseText:i,smallText:n,className:o}){return(0,l.jsx)("div",{className:"flex items-start gap-x-4"+(r?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(o||""),children:a.map((a,r)=>{let{payload:o,title:d,onChangeHandler:c,fixed:m,jsx:u}=a,p=a.name?`${e}-${a.name}`:o?e+"-"+o:e;return(0,l.jsxs)("div",{className:"flex items-center"+(a.default&&m?" pointer-events-none":"")+(n?" gap-1 ":" gap-2 ")+(a?.className?a.className:""),children:[(0,l.jsx)("input",{className:"m-0"+(n?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!a.default,name:p,id:p,onChange:e=>{t&&t(null),c&&c(e,a)},value:o,style:{minWidth:"20px"},...a.props}),u||(0,l.jsx)("label",{htmlFor:p,className:"m-0 "+(s||"text-slate-800 dark:text-white/80")+(i||n?" text-base":" text-lg"),children:d})]},r+1)})})}t(82015)},43656:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({radioValues:e,name:a,onChangeHandler:t,setAlert:s,flexRow:r,labelColor:i,baseText:n,smallText:o,className:d}){try{return(0,l.jsx)("div",{className:"flex items-start gap-4 flex-wrap "+(r?"":" flex-col ")+(d||""),children:e.map((e,r)=>{let{payload:d,title:c,jsx:m}=e,u=!1===d?d:d||c||null;return(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("input",{className:"m-0"+(n?" w-5 h-5":o?" w-4 h-4":" w-6 h-6"),type:"radio",defaultChecked:!!e.default,name:a,id:a+"_"+u,onChange:a=>{s&&s(null),e.onChangeHandler?e.onChangeHandler(a):t&&t(a)},value:"string"==typeof u?u:void 0}),m||(0,l.jsx)("label",{htmlFor:a+"_"+u,className:"text-lg m-0 "+(i||"text-slate-800")+(n?" text-base":o?" text-sm":" text-lg"),children:c})]},r+1)})})}catch(e){return console.log("ERROR in FormRadio =>",e),(0,l.jsx)("div",{children:"Form Radio Error"})}}t(82015)},64535:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(8732);function s({message:e}){return(0,l.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,l.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,l.jsx)("span",{children:e})]})}t(82015)},96089:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},25088:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},71296:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},98136:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},85012:(e,a,t)=>{t.a(e,async(e,l)=>{try{t.r(a),t.d(a,{AddSocialLoginsContext:()=>w,default:()=>h,getServerSideProps:()=>g});var s=t(8732),r=t(82015),i=t.n(r),n=t(95222),o=t(20048),d=t.n(o),c=t(64098),m=t(26860),u=t(67216),p=t.n(u),x=e([c,m]);[c,m]=x.then?(await x)():x;let f=t(29021),w=i().createContext({});function h({user:e,database:a,query:t,socialLogins:l}){let r=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Social Logins | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,s.jsx)(n.A,{head:r,user:e,extraHeaderContent:(0,s.jsx)(c.A,{database:a,query:t,user:e}),children:(0,s.jsx)(w.Provider,{value:{user:e,database:a,query:t,socialLogins:l},children:(0,s.jsx)(m.A,{})})})}async function g({req:e,res:a,query:t}){let l=await d()(e,a);if(!l?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};try{let e=await p()(`SELECT * FROM user_databases WHERE user_id='${l.id}' AND db_slug='${t.single}'`);if(!e||!e[0])return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};JSON.parse(f.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l.id}/main.json`,"utf-8"));let a=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l.id}/env.json`;f.existsSync(a)||f.writeFileSync(a,"{}","utf-8");let s=JSON.parse(f.readFileSync(a,"utf-8"))[e[0].db_full_name]?.social;return{props:{user:l,database:e[0],socialLogins:s||[],query:t}}}catch(e){return console.log("Error in 'add-social-logins; page component =>",e.message),{redirect:{destination:"/admin",permanent:!1}}}}l()}catch(e){l(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var a=require("../../../../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),l=a.X(0,[883,9821,9600,7070,5134,3737,1614],()=>t(3589));module.exports=l})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=201,e.ids=[201],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},20291:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.r(t),a.d(t,{config:()=>x,default:()=>p,getServerSideProps:()=>h,getStaticPaths:()=>m,getStaticProps:()=>u,reportWebVitals:()=>y,routeModule:()=>k,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>f});var r=a(63865),s=a(9455),i=a(30671),n=a(5583),o=a(19796),d=a(80390),c=e([d]);d=(c.then?(await c)():c)[0];let p=(0,i.M)(d,"default"),u=(0,i.M)(d,"getStaticProps"),m=(0,i.M)(d,"getStaticPaths"),h=(0,i.M)(d,"getServerSideProps"),x=(0,i.M)(d,"config"),y=(0,i.M)(d,"reportWebVitals"),f=(0,i.M)(d,"unstable_getStaticProps"),g=(0,i.M)(d,"unstable_getStaticPaths"),v=(0,i.M)(d,"unstable_getStaticParams"),A=(0,i.M)(d,"unstable_getServerProps"),w=(0,i.M)(d,"unstable_getServerSideProps"),k=new r.PagesRouteModule({definition:{kind:s.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/add-social-logins",pathname:"/admin/[user_id]/databases/[single]/users/add-social-logins",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:d});l()}catch(e){l(e)}})},95598:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.d(t,{A:()=>x});var r=a(8732),s=a(82015),i=a.n(s),n=a(53926),o=a(59023),d=a(46169),c=a(16757),p=a(80390),u=a(1346),m=a(2913),h=e([p]);function x(){let{user:e,database:t,socialLogins:a}=i().useContext(p.AddSocialLoginsContext),[l,s]=i().useState(!1),[h,x]=i().useState(a&&a[0]?.paradigm?.match(/personal/i)?"personal":"datasquirel"),[y,f]=i().useState(a&&a[0]?a:[]),g=h?.match(/datasquirel/i)?(0,r.jsxs)("span",{children:["All social media logins on your site will be done using datasquirel credentials. Please note that you ",(0,r.jsx)("b",{children:"MUST"})," ","add your domain for this to work."]}):h?.match(/personal/i)?(0,r.jsx)("span",{children:"You need to setup your credentials in respective providers and put those credentials in the appropriate fields provided."}):"";return(0,r.jsxs)(i().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(o.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Add Social Logins to ",t?.db_name]})]})}),(0,r.jsx)(n.A,{user:e})]}),(0,r.jsxs)("section",{className:"paper",children:[l&&(0,r.jsx)(c.A,{screen:!0}),(0,r.jsx)(u.A,{radioValues:[{title:"Use Datasquirel Credentials",payload:"datasquirel",default:!!h?.match(/datasquirel/i)},{title:"Use Your Own Credentials",payload:"personal",default:!!h?.match(/personal/i)}],flexRow:!0,name:"select-paradigm",onChangeHandler:e=>{x(null),setTimeout(()=>{x(e.target.value)},500)}}),(0,r.jsxs)("div",{className:"max-w-2xl w-full flex-col items-start",children:[(0,r.jsx)("div",{className:"info gray font-normal mb-4",children:g}),h?(0,r.jsx)(m.A,{checkBoxValues:["Github","Google"].map((e,t)=>{let l=a?.filter(t=>t.platform===e.toLocaleLowerCase()),s=l&&l[0]?l[0]:null;return{title:e,payload:e.toLowerCase(),className:"w-full",jsx:(0,r.jsxs)("div",{className:"card grow",children:[(0,r.jsx)("img",{src:`/images/${e.toLowerCase()}.png`,alt:`${e} icon`,className:"avatar small"}),(0,r.jsxs)("div",{className:"content",children:[(0,r.jsx)("span",{className:"title",children:e}),h?.match(/personal/)?(0,r.jsxs)("div",{className:"flex-col items-start",children:[(0,r.jsx)("input",{type:"text",name:`${e.toLowerCase()}-client-id`,id:`${e.toLowerCase()}-client-id`,placeholder:"Client Id",onInput:t=>{let a=t.target,l=y.filter(t=>t.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].clientId=a.value)},defaultValue:s?.clientId?s.clientId:void 0}),(0,r.jsx)("input",{type:"text",name:`${e.toLowerCase()}-client-secret`,id:`${e.toLowerCase()}-client-secret`,placeholder:"Client Secret",onInput:t=>{let a=t.target,l=y.filter(t=>t.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].clientSecret=a.value)},defaultValue:s?.clientSecret?s.clientSecret:void 0}),(0,r.jsx)("input",{type:"text",name:`${e.toLowerCase()}-callback-url`,id:`${e.toLowerCase()}-callback-url`,placeholder:"Callback URL",onInput:t=>{let a=t.target,l=y.filter(t=>t.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].callbackUrl=a.value)},defaultValue:s?.callbackUrl?s.callbackUrl:void 0})]}):(0,r.jsxs)("div",{className:"flex-col items-start",children:[(0,r.jsx)("input",{type:"text",name:`${e.toLowerCase()}-domain-1`,id:`${e.toLowerCase()}-domain-1`,placeholder:"Domain 1",onInput:t=>{let a=t.target,l=y.filter(t=>t.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].domain1=a.value)},defaultValue:s?.domain1?s.domain1:void 0}),(0,r.jsx)("input",{type:"text",name:`${e.toLowerCase()}-domain-2`,id:`${e.toLowerCase()}-domain-2`,placeholder:"Domain 2",onInput:t=>{let a=t.target,l=y.filter(t=>t.platform===e.toLocaleLowerCase());l&&l[0]&&(l[0].domain2=a.value)},defaultValue:s?.domain2?s.domain2:void 0})]})]})]}),onChangeHandler:t=>{let a=t.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-client-id']`),l=a?.value,r=t.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-client-secret']`)?.value,s=t.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-callback-url']`)?.value,i=t.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-domain-1']`)?.value,n=t.target.parentNode?.querySelector(`input[name='${e.toLowerCase()}-domain2']`)?.value,o={platform:e.toLowerCase(),clientId:l,clientSecret:r,callbackUrl:s,domain1:i,domain2:n};t.target.checked?f(e=>[...e,o]):f(e=>e.filter(e=>e.platform!==o.platform))},default:!!s}}),name:"social-platforms",className:"w-full"}):(0,r.jsx)("div",{className:"w-full p-10",children:(0,r.jsx)(c.A,{position:"relative",width:"20px"})}),y&&y[0]&&(0,r.jsx)("button",{className:"w-full more-padding",onClick:e=>{s(!0);let a={dbFullName:t?.db_full_name,dbSlug:t?.db_slug,paradigm:h,platforms:y};(0,d.A)("/api/addSocialLogin",{method:"post",body:a},!0).then(e=>{e?.success?window.location.reload():window.alert(e.msg),setTimeout(()=>{s(!1)},1e3)})},children:"Add Social Logins"})]})]})]})}p=(h.then?(await h)():h)[0],l()}catch(e){l(e)}})},2913:(e,t,a)=>{a.d(t,{A:()=>r});var l=a(8732);function r({name:e,checkBoxValues:t,setAlert:a,labelColor:r,flexRow:s,baseText:i,smallText:n,className:o}){return(0,l.jsx)("div",{className:"flex items-start gap-x-4"+(s?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(o||""),children:t.map((t,s)=>{let{payload:o,title:d,onChangeHandler:c,fixed:p,jsx:u}=t,m=t.name?`${e}-${t.name}`:o?e+"-"+o:e;return(0,l.jsxs)("div",{className:"flex items-center"+(t.default&&p?" pointer-events-none":"")+(n?" gap-1 ":" gap-2 ")+(t?.className?t.className:""),children:[(0,l.jsx)("input",{className:"m-0"+(n?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!t.default,name:m,id:m,onChange:e=>{a&&a(null),c&&c(e,t)},value:o,style:{minWidth:"20px"},...t.props}),u||(0,l.jsx)("label",{htmlFor:m,className:"m-0 "+(r||"text-slate-800 dark:text-white/80")+(i||n?" text-base":" text-lg"),children:d})]},s+1)})})}a(82015)},1346:(e,t,a)=>{a.d(t,{A:()=>r});var l=a(8732);function r({radioValues:e,name:t,onChangeHandler:a,setAlert:r,flexRow:s,labelColor:i,baseText:n,smallText:o,className:d}){try{return(0,l.jsx)("div",{className:"flex items-start gap-4 flex-wrap "+(s?"":" flex-col ")+(d||""),children:e.map((e,s)=>{let{payload:d,title:c,jsx:p}=e,u=!1===d?d:d||c||null;return(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("input",{className:"m-0"+(n?" w-5 h-5":o?" w-4 h-4":" w-6 h-6"),type:"radio",defaultChecked:!!e.default,name:t,id:t+"_"+u,onChange:t=>{r&&r(null),e.onChangeHandler?e.onChangeHandler(t):a&&a(t)},value:"string"==typeof u?u:void 0}),p||(0,l.jsx)("label",{htmlFor:t+"_"+u,className:"text-lg m-0 "+(i||"text-slate-800")+(n?" text-base":o?" text-sm":" text-lg"),children:c})]},s+1)})})}catch(e){return console.log("ERROR in FormRadio =>",e),(0,l.jsx)("div",{children:"Form Radio Error"})}}a(82015)},23293:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},80390:(e,t,a)=>{a.a(e,async(e,l)=>{try{a.r(t),a.d(t,{AddSocialLoginsContext:()=>y,default:()=>m,getServerSideProps:()=>h});var r=a(8732),s=a(82015),i=a.n(s),n=a(25562),o=a(92702),d=a(55880),c=a(95598),p=a(71934),u=e([d,c]);[d,c]=u.then?(await u)():u;let x=a(29021),y=i().createContext({});function m({user:e,database:t,query:a,socialLogins:l}){let s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"Social Logins | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(n.A,{head:s,user:e,extraHeaderContent:(0,r.jsx)(d.A,{database:t,query:a,user:e}),children:(0,r.jsx)(y.Provider,{value:{user:e,database:t,query:a,socialLogins:l},children:(0,r.jsx)(c.A,{})})})}async function h({req:e,res:t,query:a}){let l=await (0,o.default)(e,t);if(!l?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};try{let e=await (0,p.A)(`SELECT * FROM user_databases WHERE user_id='${l.id}' AND db_slug='${a.single}'`);if(!e||!e[0])return{redirect:{destination:`/admin/${l?.id}/databases`,permanent:!1}};JSON.parse(x.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l.id}/main.json`,"utf-8"));let t=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l.id}/env.json`;x.existsSync(t)||x.writeFileSync(t,"{}","utf-8");let r=JSON.parse(x.readFileSync(t,"utf-8"))[e[0].db_full_name]?.social;return{props:{user:l,database:e[0],socialLogins:r||[],query:a}}}catch(e){return console.log("Error in 'add-social-logins; page component =>",e.message),{redirect:{destination:"/admin",permanent:!1}}}}l()}catch(e){l(e)}})},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),l=t.X(0,[883,9821,9796,5392,3634],()=>a(20291));module.exports=l})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js.nft.json index e1cf0cd..74f323a 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-social-logins.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1614.js","../../../../../../chunks/2414.js","../../../../../../chunks/2451.js","../../../../../../chunks/2996.js","../../../../../../chunks/3247.js","../../../../../../chunks/3460.js","../../../../../../chunks/3737.js","../../../../../../chunks/3932.js","../../../../../../chunks/4050.js","../../../../../../chunks/4312.js","../../../../../../chunks/4333.js","../../../../../../chunks/4385.js","../../../../../../chunks/45.js","../../../../../../chunks/5134.js","../../../../../../chunks/5212.js","../../../../../../chunks/5264.js","../../../../../../chunks/5421.js","../../../../../../chunks/5664.js","../../../../../../chunks/5674.js","../../../../../../chunks/6521.js","../../../../../../chunks/7070.js","../../../../../../chunks/7640.js","../../../../../../chunks/8540.js","../../../../../../chunks/8613.js","../../../../../../chunks/883.js","../../../../../../chunks/8842.js","../../../../../../chunks/9600.js","../../../../../../chunks/9621.js","../../../../../../chunks/9732.js","../../../../../../chunks/9821.js","../../../../../../chunks/9914.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1251.js","../../../../../../chunks/1579.js","../../../../../../chunks/194.js","../../../../../../chunks/2282.js","../../../../../../chunks/3155.js","../../../../../../chunks/3474.js","../../../../../../chunks/3496.js","../../../../../../chunks/3634.js","../../../../../../chunks/3704.js","../../../../../../chunks/3791.js","../../../../../../chunks/4627.js","../../../../../../chunks/5392.js","../../../../../../chunks/5839.js","../../../../../../chunks/5954.js","../../../../../../chunks/6160.js","../../../../../../chunks/6202.js","../../../../../../chunks/6521.js","../../../../../../chunks/6622.js","../../../../../../chunks/6903.js","../../../../../../chunks/725.js","../../../../../../chunks/7713.js","../../../../../../chunks/8704.js","../../../../../../chunks/8760.js","../../../../../../chunks/883.js","../../../../../../chunks/9796.js","../../../../../../chunks/9821.js","../../../../../../chunks/9901.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js index e22b4b9..d910e97 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=9582,e.ids=[9582],e.modules={44219:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{config:()=>h,default:()=>c,getServerSideProps:()=>g,getStaticPaths:()=>p,getStaticProps:()=>m,reportWebVitals:()=>x,routeModule:()=>w,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>b,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>f});var r=a(63865),l=a(9455),n=a(30671),i=a(49407),o=a(89600),d=a(12403),u=e([d]);d=(u.then?(await u)():u)[0];let c=(0,n.M)(d,"default"),m=(0,n.M)(d,"getStaticProps"),p=(0,n.M)(d,"getStaticPaths"),g=(0,n.M)(d,"getServerSideProps"),h=(0,n.M)(d,"config"),x=(0,n.M)(d,"reportWebVitals"),f=(0,n.M)(d,"unstable_getStaticProps"),_=(0,n.M)(d,"unstable_getStaticPaths"),b=(0,n.M)(d,"unstable_getStaticParams"),y=(0,n.M)(d,"unstable_getServerProps"),S=(0,n.M)(d,"unstable_getServerSideProps"),w=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/add-user",pathname:"/admin/[user_id]/databases/[single]/users/add-user",bundlePath:"",filename:""},components:{App:o.default,Document:i.default},userland:d});s()}catch(e){s(e)}})},16975:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.d(t,{A:()=>g});var r=a(8732),l=a(82015),n=a.n(l),i=a(58548),o=a(46437),d=a(63715),u=a(32415),c=a(84851),m=a(12403),p=e([m]);function g(e){let{user:t,database:s,table:l,query:p,confirmedDelegetedUser:g}=n().useContext(m.AddNewDbUserContext);a(49436);let[h,x]=n().useState("invitation"),[f,_]=n().useState(!1),[b,y]=n().useState(!1),[S,w]=n().useState(["Edit"]),[v,D]=n().useState(s.db_slug),[A,j]=n().useState(null),[E,N]=n().useState(null),[L,U]=n().useState([]),[$,R]=n().useState([]);return(0,r.jsxs)(n().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(o.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:["Add A New User to ",s.db_name]})]})}),(0,r.jsx)(i.A,{user:t})]}),(0,r.jsxs)("section",{className:"paper",children:[f&&(0,r.jsx)(u.A,{}),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),_(!0);let a=e.target,r=Array.from(a),l={};r.forEach(e=>{!e.nodeName?.match(/button/i)&&e.name&&e.value?.match(/./)&&(l[e.name]=e.value)});let n={payload:l,dbFullName:s.db_full_name,dbId:s.id};(0,d.A)("/api/addDbUser",{method:"post",body:n},!0).then(e=>{e.success?E?(E.imageName=`${v}-user-${e.newUserId}`,E.mimeType="jpeg",delete E.imageBase64Full,(0,d.A)("/api/addUserMedia",{method:"post",body:{media:[E],folder:v.replace(/_/g,"-"),type:"image"}},!0).then(a=>{(0,d.A)("/api/updateDbUser",{method:"post",body:{dbFullName:s.db_full_name,payload:{id:e.newUserId,image:a.mediaData[0].media_url,image_thumbnail:a.mediaData[0].media_thumbnail_url}}},!0).then(e=>{e.success&&(window.location.pathname=`/admin/${t?.id}/databases/${s.db_slug}/users`),setTimeout(()=>{_(!1)},500)})})):window.location.pathname=`/admin/${t?.id}/databases/${s.db_slug}/users`:setTimeout(()=>{_(!1)},500)})},className:"w-full flex flex-col items-stretch gap-4",children:[(0,r.jsx)(c.A,{user:t,targetDb:s.db_full_name,database:s,userImage:E,setUserImage:N}),(0,r.jsx)("button",{children:"Add User"})]})]})]})}m=(p.then?(await p)():p)[0],s()}catch(e){s(e)}})},84851:(e,t,a)=>{let s;a.d(t,{A:()=>m});var r=a(8732),l=a(82015),n=a.n(l),i=a(63715),o=a(64535),d=a(32415),u=a(13737),c=a(77826);function m({targetDb:e,database:t,user:a,userImage:l,setUserImage:m}){let[p,g]=n().useState(null),[h,x]=n().useState(!1);return(0,r.jsxs)(n().Fragment,{children:[h&&(0,r.jsx)(d.A,{}),p&&(0,r.jsx)(o.A,{message:p}),(0,r.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User information"}),(0,r.jsx)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:(0,r.jsx)(u.A,{title:"First Name",inputType:"text",name:"first_name",autoComplete:"given-name",onInputHandler:e=>{let t=e.target;t.value.match(/./)?(t.classList.remove("warning"),g(null)):t.classList.add("warning")},required:!0})}),(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,r.jsx)("label",{htmlFor:"last_name",children:"Last Name"}),(0,r.jsx)("input",{type:"text",name:"last_name",id:"last_name",placeholder:"Last Name",autoComplete:"family-name",onInput:e=>{let t=e.target;t.value.match(/./)?(t.classList.remove("warning"),g(null)):t.classList.add("warning")},required:!0})]}),(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,r.jsx)("label",{htmlFor:"username",children:"Username"}),(0,r.jsx)("input",{type:"text",name:"username",id:"username",placeholder:"Username",autoComplete:"username",onInput:t=>{let a=t.target;a.value.match(/./)?(a.classList.remove("warning"),g(null)):a.classList.add("warning"),window.clearTimeout(s),s=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=username&value=${a.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(g("Username Already Exists"),a.classList.add("warning")):(g(null),a.classList.remove("warning"))})},300)}})]}),(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,r.jsx)("label",{htmlFor:"email_address",children:"Email Address"}),(0,r.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",onInput:t=>{window.clearTimeout(s);let a=t.target;s=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=email&value=${a.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(g("Email Already Exists"),a.classList.add("warning")):(g(null),a.classList.remove("warning"))})},300)},required:!0})]}),(0,r.jsx)(u.A,{title:"Phone Number",inputType:"text",name:"phone",autoComplete:"tel"}),(0,r.jsx)(u.A,{title:"Address",name:"address",autoComplete:"address"}),(0,r.jsxs)("div",{className:"flex-wrap xl:flex-nowrap",children:[(0,r.jsx)(u.A,{title:"City",name:"city",autoComplete:"city"}),(0,r.jsx)(u.A,{title:"State",name:"state",autoComplete:"state"}),(0,r.jsx)(u.A,{title:"Country",name:"country",autoComplete:"country"}),(0,r.jsx)(u.A,{title:"Zip Code",name:"zip_code",autoComplete:"zip_code"})]}),(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,r.jsx)("label",{htmlFor:"password",children:"Password"}),(0,r.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password",required:!0})]}),(0,r.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,r.jsx)("label",{htmlFor:"confirm_password",children:"Confirm Password"}),(0,r.jsx)("input",{type:"password",name:"confirm_password",id:"confirm_password",placeholder:"Confirm Password",onInput:e=>{let t=e.target;t.closest("form")?.password.value===t.value?t.classList.remove("warning"):t.classList.add("warning")},required:!0})]}),(0,r.jsxs)("div",{className:"paper",children:[(0,r.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"User Image"}),(0,r.jsx)(c.A,{userImage:l,setUserImage:m,className:"w-full"})]})]})}},64535:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732);function r({message:e}){return(0,s.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:e})]})}a(82015)},31651:(e,t,a)=>{a(81630);let s=a(77463);e.exports=async function({request:e,databaseSlug:t,user:a,query:r}){try{let l=a.id,n=null;if(!r?.delegated)return{dbUserId:l};let i=r.dbUserId,o=`${process.env.DSQL_USER_DB_PREFIX}${i}_${t}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${o}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let a=s({encryptedString:e.cookies[d]});if(!a)throw Error("Invalid Token");if((n=JSON.parse(a)).databaseSlug===t)return{dbUserId:l=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},96089:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},68743:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},89545:(e,t,a)=>{let s=a(77463),r=a(68743);e.exports=async function({unparsedResults:e,tableSchema:t}){let a=[];try{for(let l=0;l",t.message),e}}},22373:(e,t,a)=>{let s=a(29021),{IncomingMessage:r}=a(81630);e.exports=async function({user:e,message:t,component:a,noMail:r,req:l}){let n=new Date,i=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],t=l.headers["x-real-ip"],a=l.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],r=a||s||t||l.socket.remoteAddress;if(!r)return null;return String(r)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=9582,e.ids=[9582],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},5621:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>g,default:()=>u,getServerSideProps:()=>h,getStaticPaths:()=>p,getStaticProps:()=>m,reportWebVitals:()=>y,routeModule:()=>w,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>b,unstable_getStaticPaths:()=>x,unstable_getStaticProps:()=>f});var s=a(63865),l=a(9455),n=a(30671),i=a(5583),d=a(19796),o=a(70193),c=e([o]);o=(c.then?(await c)():c)[0];let u=(0,n.M)(o,"default"),m=(0,n.M)(o,"getStaticProps"),p=(0,n.M)(o,"getStaticPaths"),h=(0,n.M)(o,"getServerSideProps"),g=(0,n.M)(o,"config"),y=(0,n.M)(o,"reportWebVitals"),f=(0,n.M)(o,"unstable_getStaticProps"),x=(0,n.M)(o,"unstable_getStaticPaths"),b=(0,n.M)(o,"unstable_getStaticParams"),A=(0,n.M)(o,"unstable_getServerProps"),v=(0,n.M)(o,"unstable_getServerSideProps"),w=new s.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/[single]/users/add-user",pathname:"/admin/[user_id]/databases/[single]/users/add-user",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:o});r()}catch(e){r(e)}})},30565:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>h});var s=a(8732),l=a(82015),n=a.n(l),i=a(53926),d=a(59023),o=a(46169),c=a(16757),u=a(49585),m=a(70193),p=e([m]);function h(){let{user:e,database:t,table:r,query:l,confirmedDelegetedUser:p}=n().useContext(m.AddNewDbUserContext);a(49436);let[h,g]=n().useState("invitation"),[y,f]=n().useState(!1),[x,b]=n().useState(!1),[A,v]=n().useState(["Edit"]),[w,_]=n().useState(t.db_slug),[S,j]=n().useState(null),[D,k]=n().useState(null),[N,E]=n().useState([]),[M,P]=n().useState([]);return(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(d.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:["Add A New User to ",t.db_name]})]})}),(0,s.jsx)(i.A,{user:e})]}),(0,s.jsxs)("section",{className:"paper",children:[y&&(0,s.jsx)(c.A,{}),(0,s.jsxs)("form",{onSubmit:a=>{a.preventDefault(),f(!0);let r=a.target,s=Array.from(r),l={};s.forEach(e=>{!e.nodeName?.match(/button/i)&&e.name&&e.value?.match(/./)&&(l[e.name]=e.value)});let n={payload:l,dbFullName:t.db_full_name,dbId:t.id};(0,o.A)("/api/addDbUser",{method:"post",body:n},!0).then(a=>{a.success?D?(D.imageName=`${w}-user-${a.newUserId}`,D.mimeType="jpeg",delete D.imageBase64Full,(0,o.A)("/api/addUserMedia",{method:"post",body:{media:[D],folder:w.replace(/_/g,"-"),type:"image"}},!0).then(r=>{(0,o.A)("/api/updateDbUser",{method:"post",body:{dbFullName:t.db_full_name,payload:{id:a.newUserId,image:r.mediaData[0].media_url,image_thumbnail:r.mediaData[0].media_thumbnail_url}}},!0).then(a=>{a.success&&(window.location.pathname=`/admin/${e?.id}/databases/${t.db_slug}/users`),setTimeout(()=>{f(!1)},500)})})):window.location.pathname=`/admin/${e?.id}/databases/${t.db_slug}/users`:setTimeout(()=>{f(!1)},500)})},className:"w-full flex flex-col items-stretch gap-4",children:[(0,s.jsx)(u.A,{user:e,targetDb:t.db_full_name,database:t,userImage:D,setUserImage:k}),(0,s.jsx)("button",{children:"Add User"})]})]})]})}m=(p.then?(await p)():p)[0],r()}catch(e){r(e)}})},49585:(e,t,a)=>{let r;a.d(t,{A:()=>m});var s=a(8732),l=a(82015),n=a.n(l),i=a(46169),d=a(10621),o=a(16757),c=a(83155),u=a(20136);function m({targetDb:e,database:t,user:a,userImage:l,setUserImage:m}){let[p,h]=n().useState(null),[g,y]=n().useState(!1);return(0,s.jsxs)(n().Fragment,{children:[g&&(0,s.jsx)(o.A,{}),p&&(0,s.jsx)(d.A,{message:p}),(0,s.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User information"}),(0,s.jsx)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:(0,s.jsx)(c.A,{title:"First Name",inputType:"text",name:"first_name",autoComplete:"given-name",onInputHandler:e=>{let t=e.target;t.value.match(/./)?(t.classList.remove("warning"),h(null)):t.classList.add("warning")},required:!0})}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"last_name",children:"Last Name"}),(0,s.jsx)("input",{type:"text",name:"last_name",id:"last_name",placeholder:"Last Name",autoComplete:"family-name",onInput:e=>{let t=e.target;t.value.match(/./)?(t.classList.remove("warning"),h(null)):t.classList.add("warning")},required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"username",children:"Username"}),(0,s.jsx)("input",{type:"text",name:"username",id:"username",placeholder:"Username",autoComplete:"username",onInput:t=>{let a=t.target;a.value.match(/./)?(a.classList.remove("warning"),h(null)):a.classList.add("warning"),window.clearTimeout(r),r=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=username&value=${a.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(h("Username Already Exists"),a.classList.add("warning")):(h(null),a.classList.remove("warning"))})},300)}})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"email_address",children:"Email Address"}),(0,s.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",onInput:t=>{window.clearTimeout(r);let a=t.target;r=setTimeout(()=>{(0,i.A)(`/api/checkDuplicateData?type=email&value=${a.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(h("Email Already Exists"),a.classList.add("warning")):(h(null),a.classList.remove("warning"))})},300)},required:!0})]}),(0,s.jsx)(c.A,{title:"Phone Number",inputType:"text",name:"phone",autoComplete:"tel"}),(0,s.jsx)(c.A,{title:"Address",name:"address",autoComplete:"address"}),(0,s.jsxs)("div",{className:"flex-wrap xl:flex-nowrap",children:[(0,s.jsx)(c.A,{title:"City",name:"city",autoComplete:"city"}),(0,s.jsx)(c.A,{title:"State",name:"state",autoComplete:"state"}),(0,s.jsx)(c.A,{title:"Country",name:"country",autoComplete:"country"}),(0,s.jsx)(c.A,{title:"Zip Code",name:"zip_code",autoComplete:"zip_code"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"password",children:"Password"}),(0,s.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password",required:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,s.jsx)("label",{htmlFor:"confirm_password",children:"Confirm Password"}),(0,s.jsx)("input",{type:"password",name:"confirm_password",id:"confirm_password",placeholder:"Confirm Password",onInput:e=>{let t=e.target;t.closest("form")?.password.value===t.value?t.classList.remove("warning"):t.classList.add("warning")},required:!0})]}),(0,s.jsxs)("div",{className:"paper",children:[(0,s.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"User Image"}),(0,s.jsx)(u.A,{userImage:l,setUserImage:m})]})]})}},20136:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(8732),s=a(82015),l=a.n(s),n=a(65842);function i({user:e,userImage:t,setUserImage:a,database:s,className:i}){let d=l().useRef();return(0,r.jsxs)("div",{className:"card no-hover col"+(i?" "+i:""),children:[(0,r.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,r.jsx)("img",{src:t?"string"==typeof t?t:t.imageBase64Full:"/images/user-preset.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:d,"data-imagepreview":"image"})}),(0,r.jsxs)("div",{className:"w-full flex-col image-selector-wrapper",children:[(0,r.jsx)("div",{className:"button outlined secondary w-full whitespace-normal",onClick:e=>{e.target.closest(".image-selector-wrapper").querySelector("input").click()},children:"Upload Image"}),(0,r.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{let t=e.target.files?.[0];if(t){let e=await (0,n.A)({imageInputFile:t,maxWidth:400});a?.(e)}else window.alert("No File Provided!")}})]})]})}},10621:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s({message:e}){return(0,r.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,r.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:e})]})}a(82015)},22873:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(71205);async function s({request:e,databaseSlug:t,user:a,query:s}){try{let l=a.id,n=null;if(!s?.delegated)return{dbUserId:l};let i=s.dbUserId,d=`${process.env.DSQL_USER_DB_PREFIX}${i}_${t}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${d}`;try{if(!e.cookies?.[o])throw Error("Cookie not present");let a=(0,r.A)({encryptedString:e.cookies[o]});if(!a)throw Error("Invalid Token");if((n=JSON.parse(a)).databaseSlug===t)return{dbUserId:l=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:l}}catch(e){return null}}},65842:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(76102);let s=a.n(r)().media.imageInputFileToBase64},23293:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},25088:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},72935:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},71296:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},98136:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},77047:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(29021),s=a.n(r);async function l({user:e,message:t,component:a,noMail:r,req:l}){let n=new Date,i=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],t=l.headers["x-real-ip"],a=l.headers["cf-connecting-ip"],r=Array.isArray(e)?e[0]:e?.split(",")[0],s=a||r||t||l.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let r=`🚀 SERVER ERROR =========================== Error Message: ${t} Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(r+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${l.url}`),l?.body&&(r+=` Request Body: ${JSON.stringify(l.body,null,4)}`),i&&(r+=` IP: ${i}`),r+=` Date: ${n.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let o=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",r),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let d=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",r),s().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},90378:(e,t,a)=>{a(29021);let s=a(89545),r=a(22373),l=a(67216),n=a(1231),i=a(88896);e.exports=async function({queryString:e,queryValuesArray:t,database:a,tableSchema:o,useLocal:d}){let u;let c=!!d||!!a?.match(/^datasquirel$/),m=d?i:c?l:n;try{u=e&&t&&Array.isArray(t)&&t[0]?c?await m(e,t):await m({paradigm:"Full Access",database:a,queryString:e,queryValues:t}):c?await m(e):await m({paradigm:"Full Access",database:a,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&o)try{let e=u;return await s({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},1231:(e,t,a)=>{let s=a(29021);a(33873);let r=a(9973),l=a(31976),n=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:l()}});e.exports=function({paradigm:e,database:t,queryString:a,queryValues:i}){try{return new Promise((o,d)=>{let u=!!e?.match(/full.access|^fa$/i);try{function c(e){n.end(),o(JSON.parse(JSON.stringify(e)))}function m(e){n.end(),o({error:e.message,queryStringGenerated:a,queryValuesGenerated:i,sql:e.sql})}n=u?r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:l()}}):r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:l()}}),i&&Array.isArray(i)&&i[0]?n.query(a,i).then(c).catch(m):n.query(a).then(c).catch(m)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),o({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,t,a)=>{let s=a(9973),r=a(31976);async function l(...e){let t=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=l},12403:(e,t,a)=>{a.a(e,async(e,s)=>{try{a.r(t),a.d(t,{AddNewDbUserContext:()=>w,default:()=>b,getServerSideProps:()=>y});var r=a(8732),l=a(82015),n=a.n(l),i=a(95222),o=a(20048),d=a.n(o),u=a(16975),c=a(90378),m=a.n(c),p=a(64098),g=a(31651),h=a.n(g),x=a(67216),f=a.n(x),_=e([u,p]);[u,p]=_.then?(await _)():_;let S=a(29021),w=n().createContext({});function b({user:e,database:t,table:a,query:s,confirmedDelegetedUser:l}){let n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"Users | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(i.A,{head:n,user:e,extraHeaderContent:(0,r.jsx)(p.A,{database:t,query:s,confirmedDelegetedUser:l,user:e}),children:(0,r.jsx)(w.Provider,{value:{user:e,database:t,table:a,query:s,confirmedDelegetedUser:l},children:(0,r.jsx)(u.A,{})})})}async function y({req:e,res:t,query:a}){let s=await d()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await h()({request:e,user:s,databaseSlug:a.single,query:a});if(!r)return{redirect:{destination:"/admin",permanent:!1}};let{dbUserId:l,rootUserId:n}=r,i=await f()(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${a.single}'`);if(!i||!i[0])return{redirect:{destination:`/admin/${s?.id}/databases`,permanent:!1}};let o=JSON.parse(S.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l}/main.json`,"utf-8")),u=(o.filter(e=>e.dbFullName===i[0].db_full_name)[0]?.tables).filter(e=>"users"===e.tableName)[0];return await m()({database:i[0].db_full_name,queryString:"SELECT * FROM users LIMIT 20",tableSchema:u}),{props:{user:s,database:i[0],table:u||{},query:a,confirmedDelegetedUser:r}}}s()}catch(e){s(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")},49436:e=>{e.exports=JSON.parse('["Edit Tables","Update Entries","Create Table","Delete Entries","Delete Tables"]')}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,5134,3737,1614],()=>a(44219));module.exports=s})(); \ No newline at end of file +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},52854:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(71205);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function l({unparsedResults:e,tableSchema:t}){let a=[];try{for(let l=0;l",t.message),e}}var n=a(77047),i=a(71934),d=a(43651),o=a(16175);async function c({queryString:e,queryValuesArray:t,database:a,tableSchema:r,useLocal:s}){let c;let u=!!s||!!a?.match(/^datasquirel$/),m=s?o.A:u?i.A:d.A;try{c=e&&t&&Array.isArray(t)&&t[0]?u?await m(e,t):await m({paradigm:"Full Access",queryString:e,queryValues:t}):u?await m(e):await m({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,n.A)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&r)try{let e=c;return await l({unparsedResults:e,tableSchema:r})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",a,e),(0,n.A)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},43651:(e,t,a)=>{async function r(e,t,a){try{if("string"==typeof t){let r=await e.query(s(t),a);return JSON.parse(JSON.stringify(r))}if("object"!=typeof t)return null;{let a=[];for(let r=0;rl})},16175:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(9973),s=a.n(r),l=a(29021),n=a.n(l);async function i(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!n().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:n().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let a=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(a))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},70193:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{AddNewDbUserContext:()=>x,default:()=>g,getServerSideProps:()=>y});var s=a(8732),l=a(82015),n=a.n(l),i=a(25562),d=a(92702),o=a(30565),c=a(52854),u=a(55880),m=a(22873),p=a(71934),h=e([o,u]);[o,u]=h.then?(await h)():h;let f=a(29021),x=n().createContext({});function g({user:e,database:t,table:a,query:r,confirmedDelegetedUser:l}){let n=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Users | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,s.jsx)(i.A,{head:n,user:e,extraHeaderContent:(0,s.jsx)(u.A,{database:t,query:r,confirmedDelegetedUser:l,user:e}),children:(0,s.jsx)(x.Provider,{value:{user:e,database:t,table:a,query:r,confirmedDelegetedUser:l},children:(0,s.jsx)(o.A,{})})})}async function y({req:e,res:t,query:a}){let r=await (0,d.default)(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let s=await (0,m.A)({request:e,user:r,databaseSlug:a.single,query:a});if(!s)return{redirect:{destination:"/admin",permanent:!1}};let{dbUserId:l,rootUserId:n}=s,i=await (0,p.A)(`SELECT * FROM user_databases WHERE user_id='${l}' AND db_slug='${a.single}'`);if(!i||!i[0])return{redirect:{destination:`/admin/${r?.id}/databases`,permanent:!1}};let o=JSON.parse(f.readFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${l}/main.json`,"utf-8")),u=(o.filter(e=>e.dbFullName===i[0].db_full_name)[0]?.tables).filter(e=>"users"===e.tableName)[0];return await (0,c.A)({database:i[0].db_full_name,queryString:`SELECT * ${i[0].db_full_name}.FROM users LIMIT 20`,tableSchema:u}),{props:{user:r,database:i[0],table:u||{},query:a,confirmedDelegetedUser:s}}}r()}catch(e){r(e)}})},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")},49436:e=>{e.exports=JSON.parse('["Edit Tables","Update Entries","Create Table","Delete Entries","Delete Tables"]')}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,9796,5392,3634,3155],()=>a(5621));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js.nft.json index 3054ef5..ab92729 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/[single]/users/add-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../jsonData/userPriviledges.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1614.js","../../../../../../chunks/2414.js","../../../../../../chunks/2451.js","../../../../../../chunks/2996.js","../../../../../../chunks/3247.js","../../../../../../chunks/3460.js","../../../../../../chunks/3737.js","../../../../../../chunks/3932.js","../../../../../../chunks/4050.js","../../../../../../chunks/4312.js","../../../../../../chunks/4333.js","../../../../../../chunks/4385.js","../../../../../../chunks/45.js","../../../../../../chunks/5134.js","../../../../../../chunks/5212.js","../../../../../../chunks/5264.js","../../../../../../chunks/5421.js","../../../../../../chunks/5664.js","../../../../../../chunks/5674.js","../../../../../../chunks/6521.js","../../../../../../chunks/7070.js","../../../../../../chunks/7640.js","../../../../../../chunks/8540.js","../../../../../../chunks/8613.js","../../../../../../chunks/883.js","../../../../../../chunks/8842.js","../../../../../../chunks/9600.js","../../../../../../chunks/9621.js","../../../../../../chunks/9732.js","../../../../../../chunks/9821.js","../../../../../../chunks/9914.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../jsonData/userPriviledges.json","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/bignumber.js/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/safe-buffer/index.js","../../../../../../../../node_modules/safe-buffer/package.json","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../../../../node_modules/tailwind-merge/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1251.js","../../../../../../chunks/1579.js","../../../../../../chunks/194.js","../../../../../../chunks/2282.js","../../../../../../chunks/3155.js","../../../../../../chunks/3474.js","../../../../../../chunks/3496.js","../../../../../../chunks/3634.js","../../../../../../chunks/3704.js","../../../../../../chunks/3791.js","../../../../../../chunks/4627.js","../../../../../../chunks/5392.js","../../../../../../chunks/5839.js","../../../../../../chunks/5954.js","../../../../../../chunks/6160.js","../../../../../../chunks/6202.js","../../../../../../chunks/6521.js","../../../../../../chunks/6622.js","../../../../../../chunks/6903.js","../../../../../../chunks/725.js","../../../../../../chunks/7713.js","../../../../../../chunks/8704.js","../../../../../../chunks/8760.js","../../../../../../chunks/883.js","../../../../../../chunks/9796.js","../../../../../../chunks/9821.js","../../../../../../chunks/9901.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js index 3aa10bf..ceb5c60 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js @@ -1 +1,16 @@ -"use strict";(()=>{var e={};e.id=9718,e.ids=[9718],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},91293:(e,t,a)=>{a.r(t),a.d(t,{config:()=>y,default:()=>p,getServerSideProps:()=>u,getStaticPaths:()=>c,getStaticProps:()=>o,reportWebVitals:()=>h,routeModule:()=>b,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>k,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>m,unstable_getStaticProps:()=>x});var r=a(63865),l=a(9455),s=a(30671),n=a(49407),i=a(89600),d=a(2471);let p=(0,s.M)(d,"default"),o=(0,s.M)(d,"getStaticProps"),c=(0,s.M)(d,"getStaticPaths"),u=(0,s.M)(d,"getServerSideProps"),y=(0,s.M)(d,"config"),h=(0,s.M)(d,"reportWebVitals"),x=(0,s.M)(d,"unstable_getStaticProps"),m=(0,s.M)(d,"unstable_getStaticPaths"),f=(0,s.M)(d,"unstable_getStaticParams"),A=(0,s.M)(d,"unstable_getServerProps"),k=(0,s.M)(d,"unstable_getServerSideProps"),b=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/databases/add-database",pathname:"/admin/[user_id]/databases/add-database",bundlePath:"",filename:""},components:{App:i.default,Document:n.default},userland:d})},46437:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732),l=a(23293);function s(){return(0,r.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,r.jsx)(l.A,{})})}a(82015)},55158:(e,t,a)=>{a.d(t,{Ay:()=>i,PB:()=>d,fs:()=>p});var r=a(8732),l=a(58150),s=a(82015),n=a.n(s);function i({children:e,title:t,data:a,fullPage:s,wrapperClasses:i,closePopupDispatch:d,wrapperStyle:o,noContainer:c}){return s?(0,r.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":t||null,style:o,children:[c?(0,r.jsx)(n().Fragment,{children:e}):(0,r.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,r.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{p(),d&&d()},children:(0,r.jsx)(l.A,{color:"white",size:20})}),(0,r.jsx)("div",{className:"popup-canceller",onClick:e=>{p(),d&&d()}})]}):(0,r.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[c?(0,r.jsx)(n().Fragment,{children:e}):(0,r.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,r.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{p(),d&&d()},children:(0,r.jsx)("span",{className:"font-normal",children:"✖"})})]}),c&&(0,r.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{p(),d&&d()},children:(0,r.jsx)("span",{className:"font-normal",children:"✖"})}),(0,r.jsx)("div",{className:"popup-canceller",onClick:e=>{p(),d&&d()}})]})}function d(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t&&t(a))}function p(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},62506:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(8732),l=a(82015),s=a.n(l);function n({children:e,column:t,className:a}){let l=s().useRef();return(0,r.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:l,children:e})}},23293:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,9600,7070,3737,8613,2996],()=>a(91293));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9718,e.ids=[9718],e.modules={72952:(e,t,r)=>{r.r(t),r.d(t,{config:()=>w,default:()=>P,getServerSideProps:()=>N,getStaticPaths:()=>D,getStaticProps:()=>q,reportWebVitals:()=>R,routeModule:()=>H,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>O,unstable_getStaticParams:()=>F,unstable_getStaticPaths:()=>C,unstable_getStaticProps:()=>$});var a={};r.r(a),r.d(a,{AddDatabaseContext:()=>v,default:()=>E,getServerSideProps:()=>M});var s=r(63865),n=r(9455),i=r(30671),l=r(5583),d=r(19796),o=r(8732),u=r(82015),c=r.n(u),m=r(25562),p=r(92702),g=r(19134),x=r(59023),f=r(53926),b=r(16757),S=r(61347),h=r(89088);function A(){let{user:e,dbImage:t,setDbImage:r,query:a}=c().useContext(v);if(!e)return(0,o.jsx)(c().Fragment,{});let[s,n]=c().useState(null),[i,l]=c().useState(!1);return(0,o.jsx)("section",{className:"card",children:(0,o.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[i&&(0,o.jsx)(b.A,{}),(0,o.jsxs)("div",{className:"flex-col items-start",children:[(0,o.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"New Database Information"}),e&&t&&r&&(0,o.jsx)(S.A,{user:e,dbImage:t,setDbImage:r,setLoading:l,query:a})]}),e&&t&&r&&(0,o.jsx)(h.A,{user:e,dbImage:t,setDbImage:r})]})})}function j(){let{query:e,duplicateDb:t,user:r}=c().useContext(v),a=e?.duplicate?(0,o.jsxs)("span",{children:["Duplicate"," ",(0,o.jsx)("a",{href:`/admin/${r?.id}/databases/${t?.db_slug}`,target:"_blank",children:t?.db_name})," ","Database"]}):"Add A New Database";return(0,o.jsxs)(c().Fragment,{children:[(0,o.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,o.jsxs)("div",{className:"flex-wrap",children:[(0,o.jsx)(x.A,{}),(0,o.jsx)("h1",{className:"text-3xl m-0",children:a})]}),(0,o.jsx)(f.A,{user:r})]}),(0,o.jsx)(A,{})]})}var _=r(37195),y=r(71934);let v=c().createContext({});function E({user:e,databases:t,query:r,duplicateDb:a}){let s=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"Add Database | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Add a database"})]}),[n,i]=c().useState("/images/database-placeholder.png");return(0,o.jsx)(v.Provider,{value:{user:e,databases:t,dbImage:n,setDbImage:i,query:r,duplicateDb:a},children:(0,o.jsxs)(c().Fragment,{children:[(0,o.jsx)(m.A,{head:s,user:e,children:(0,o.jsx)(j,{})}),(0,o.jsx)(_.A,{setDbImage:i})]})})}async function M({req:e,res:t,query:r}){let a=await (0,p.default)(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};if(!a?.verification_status?.toString()?.match(/1/))return{redirect:{destination:"/admin",permanent:!1}};let s=await (0,g.A)(`SELECT SCHEMA_NAME AS dbFullName FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'user_${a.id}%'`),n={};if(r.duplicate){let e=await (0,y.A)(`SELECT * FROM user_databases WHERE db_full_name='${r.duplicate}'`);e&&e[0]&&(n=e[0])}return{props:{user:a,databases:s,query:r,duplicateDb:n}}}let P=(0,i.M)(a,"default"),q=(0,i.M)(a,"getStaticProps"),D=(0,i.M)(a,"getStaticPaths"),N=(0,i.M)(a,"getServerSideProps"),w=(0,i.M)(a,"config"),R=(0,i.M)(a,"reportWebVitals"),$=(0,i.M)(a,"unstable_getStaticProps"),C=(0,i.M)(a,"unstable_getStaticPaths"),F=(0,i.M)(a,"unstable_getStaticParams"),I=(0,i.M)(a,"unstable_getServerProps"),O=(0,i.M)(a,"unstable_getServerSideProps"),H=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/databases/add-database",pathname:"/admin/[user_id]/databases/add-database",bundlePath:"",filename:""},components:{App:d.default,Document:l.default},userland:a})},59023:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(8732),s=r(23293);function n(){return(0,a.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,a.jsx)(s.A,{})})}r(82015)},19134:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(29021),s=r.n(a),n=r(77047);async function i(e){let t;"production".match(/dev/)&&s().appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{t=await function(...e){let t=global.DSQL_DB_CONN;try{return new Promise((r,a)=>{t.query(...e).then(e=>{t.end(),r(JSON.parse(JSON.stringify(e)))}).catch(e=>{t.end(),r({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}(e)}catch(e){(0,n.A)({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return t||null}},77047:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(29021),s=r.n(a);async function n({user:e,message:t,component:r,noMail:a,req:n}){let i=new Date,l=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],r=n.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||a||t||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +Error Message: ${t} +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),n?.url&&(a+=` +URL: ${n.url}`),n?.body&&(a+=` +Request Body: ${JSON.stringify(n.body,null,4)}`),l&&(a+=` +IP: ${l}`),a+=` +Date: ${i.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let d=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` + + + + +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,5392,1579,194],()=>r(72952));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js.nft.json index a0efa8c..350172f 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/databases/add-database.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/client.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package-shared/data/dataTypes.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js index 29d9ff6..1e8941b 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9326,e.ids=[9326],e.modules={53088:(e,t,s)=>{s.r(t),s.d(t,{config:()=>W,default:()=>R,getServerSideProps:()=>I,getStaticPaths:()=>H,getStaticProps:()=>k,reportWebVitals:()=>B,routeModule:()=>X,unstable_getServerProps:()=>U,unstable_getServerSideProps:()=>G,unstable_getStaticParams:()=>Q,unstable_getStaticPaths:()=>O,unstable_getStaticProps:()=>$});var r={};s.r(r),s.d(r,{MediaContext:()=>T,default:()=>D,getServerSideProps:()=>V});var a=s(63865),i=s(9455),n=s(30671),d=s(49407),o=s(89600),l=s(8732),u=s(82015),c=s.n(u),p=s(95222),x=s(20048),m=s.n(x),g=s(58548),S=s(55158),j=s(24671),h=s(82747),f=s(62506);function b(e){let{media:t,setTargetMedia:s,user:r,folders:a,staticHost:i}=c().useContext(T);return(0,l.jsxs)(c().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsx)("h1",{className:"text-3xl m-0",children:"Media"}),(0,l.jsxs)(f.A,{children:[(0,l.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,S.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Media"})]}),(0,l.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,S.PB)("add-folder-popoup")},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Folder"})]})]})]}),(0,l.jsx)(g.A,{user:r})]}),r?.verification_status?.toString().match(/1/)?(0,l.jsxs)(c().Fragment,{children:[(0,l.jsx)(h.A,{media:t,setTargetMedia:s,folders:a,staticHost:i,user:r}),t&&t[0]&&(0,l.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,S.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,l.jsx)(j.A,{})]})}var P=s(83531),M=s(81156),v=s(98009),A=s(30180),_=s(31700),N=s(99486),w=s(32415),y=s(67216),q=s.n(y),F=s(33873),C=s.n(F),E=s(65693);let L=s(29021),T=c().createContext({});function D({user:e,media:t,folders:s,staticHost:r}){let a=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[i,n]=c().useState(null),[d,o]=c().useState(null),[u,x]=c().useState(null),[m,g]=c().useState(!1),[S,j]=c().useState(null);return(0,l.jsx)(T.Provider,{value:{user:e,media:t,targetMedia:S,setTargetMedia:j,folders:s,staticHost:r},children:(0,l.jsxs)(c().Fragment,{children:[(0,l.jsxs)(p.A,{head:a,user:e,children:[m&&(0,l.jsx)(w.A,{screen:!0,title:"Processing Files ..."}),(0,l.jsx)(b,{}),(0,l.jsx)(P.A,{setNewMedia:n,setLoading:g}),(0,l.jsx)(_.A,{setNewFile:o,setLoading:g}),(0,l.jsx)(E.A,{setNewVideo:x,setLoading:g})]}),(0,l.jsx)(M.A,{newMedia:i,setNewMedia:n,newFile:d,setNewFile:o,newVideo:u,setNewVideo:x}),(0,l.jsx)(v.A,{targetMedia:S,setTargetMedia:j,staticHost:r,media:t}),(0,l.jsx)(A.A,{}),(0,l.jsx)(N.A,{user:e})]})})}async function V({req:e,res:t,query:s}){let r=await m()(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let a=await q()(`SELECT * FROM user_media WHERE user_id='${r.id}' AND folder IS NULL`),i=process.env.DSQL_STATIC_SERVER_DIR;if(!i)return console.log("Static File ENV not Found!"),{redirect:{destination:"/admin",permanent:!1}};let n=C().join(i,`images/user-images/user-${r.id}/`);return L.existsSync(n)?{props:{user:r,media:a,folders:L.readdirSync(n).filter(e=>!e.match(/\..{3,4}$/)),staticHost:process.env.DSQL_STATIC_HOST||""}}:{redirect:{destination:"/admin",permanent:!1}}}let R=(0,n.M)(r,"default"),k=(0,n.M)(r,"getStaticProps"),H=(0,n.M)(r,"getStaticPaths"),I=(0,n.M)(r,"getServerSideProps"),W=(0,n.M)(r,"config"),B=(0,n.M)(r,"reportWebVitals"),$=(0,n.M)(r,"unstable_getStaticProps"),O=(0,n.M)(r,"unstable_getStaticPaths"),Q=(0,n.M)(r,"unstable_getStaticParams"),U=(0,n.M)(r,"unstable_getServerProps"),G=(0,n.M)(r,"unstable_getServerSideProps"),X=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/media",pathname:"/admin/[user_id]/media",bundlePath:"",filename:""},components:{App:o.default,Document:d.default},userland:r})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600,7070,7640],()=>s(53088));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9326,e.ids=[9326],e.modules={37750:(e,t,s)=>{s.r(t),s.d(t,{config:()=>I,default:()=>V,getServerSideProps:()=>H,getStaticPaths:()=>k,getStaticProps:()=>R,reportWebVitals:()=>W,routeModule:()=>G,unstable_getServerProps:()=>Q,unstable_getServerSideProps:()=>U,unstable_getStaticParams:()=>O,unstable_getStaticPaths:()=>$,unstable_getStaticProps:()=>B});var r={};s.r(r),s.d(r,{MediaContext:()=>L,default:()=>T,getServerSideProps:()=>D});var a=s(63865),i=s(9455),n=s(30671),d=s(5583),l=s(19796),o=s(8732),u=s(82015),c=s.n(u),p=s(29021),x=s.n(p),m=s(25562),g=s(92702),S=s(53926),j=s(91140),h=s(66485),f=s(91692),b=s(55904);function P(){let{media:e,setTargetMedia:t,user:s,folders:r,staticHost:a}=c().useContext(L);return(0,o.jsxs)(c().Fragment,{children:[(0,o.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,o.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,o.jsx)("h1",{className:"text-3xl m-0",children:"Media"}),(0,o.jsxs)(b.A,{children:[(0,o.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,j.PB)("choose-media-type-popoup")},children:[(0,o.jsx)("span",{className:"symbol",children:"+"}),(0,o.jsx)("span",{children:"Add Media"})]}),(0,o.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,j.PB)("add-folder-popoup")},children:[(0,o.jsx)("span",{className:"symbol",children:"+"}),(0,o.jsx)("span",{children:"Add Folder"})]})]})]}),(0,o.jsx)(S.A,{user:s})]}),s?.verification_status?.toString().match(/1/)?(0,o.jsxs)(c().Fragment,{children:[(0,o.jsx)(f.A,{media:e,setTargetMedia:t,folders:r,staticHost:a,user:s}),e&&e[0]&&(0,o.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,j.PB)("choose-media-type-popoup")},children:[(0,o.jsx)("span",{className:"symbol",children:"+"}),(0,o.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,o.jsx)(h.A,{})]})}var M=s(81145),A=s(87081),v=s(14865),_=s(94198),N=s(43430),w=s(67325),q=s(16757),y=s(71934),F=s(33873),C=s.n(F),E=s(10839);let L=c().createContext({});function T({user:e,media:t,folders:s,staticHost:r}){let a=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[i,n]=c().useState(null),[d,l]=c().useState(null),[u,p]=c().useState(null),[x,g]=c().useState(!1),[S,j]=c().useState(null);return(0,o.jsx)(L.Provider,{value:{user:e,media:t,targetMedia:S,setTargetMedia:j,folders:s,staticHost:r},children:(0,o.jsxs)(c().Fragment,{children:[(0,o.jsxs)(m.A,{head:a,user:e,children:[x&&(0,o.jsx)(q.A,{screen:!0,title:"Processing Files ..."}),(0,o.jsx)(P,{}),(0,o.jsx)(M.A,{setNewMedia:n,setLoading:g}),(0,o.jsx)(N.A,{setNewFile:l,setLoading:g}),(0,o.jsx)(E.A,{setNewVideo:p,setLoading:g})]}),(0,o.jsx)(A.A,{newMedia:i,setNewMedia:n,newFile:d,setNewFile:l,newVideo:u,setNewVideo:p}),(0,o.jsx)(v.A,{targetMedia:S,setTargetMedia:j,staticHost:r,media:t}),(0,o.jsx)(_.A,{}),(0,o.jsx)(w.A,{user:e})]})})}async function D({req:e,res:t,query:s}){let r=await (0,g.default)(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let a=await (0,y.A)(`SELECT * FROM user_media WHERE user_id='${r.id}' AND folder IS NULL`),i=process.env.DSQL_STATIC_SERVER_DIR;if(!i)return console.log("Static File ENV not Found!"),{redirect:{destination:"/admin",permanent:!1}};let n=C().join(i,`images/user-images/user-${r.id}/`);return x().existsSync(n)?{props:{user:r,media:a,folders:x().readdirSync(n).filter(e=>!e.match(/\..{3,4}$/)),staticHost:process.env.DSQL_STATIC_HOST||""}}:{redirect:{destination:"/admin",permanent:!1}}}let V=(0,n.M)(r,"default"),R=(0,n.M)(r,"getStaticProps"),k=(0,n.M)(r,"getStaticPaths"),H=(0,n.M)(r,"getServerSideProps"),I=(0,n.M)(r,"config"),W=(0,n.M)(r,"reportWebVitals"),B=(0,n.M)(r,"unstable_getStaticProps"),$=(0,n.M)(r,"unstable_getStaticPaths"),O=(0,n.M)(r,"unstable_getStaticParams"),Q=(0,n.M)(r,"unstable_getServerProps"),U=(0,n.M)(r,"unstable_getServerSideProps"),G=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/media",pathname:"/admin/[user_id]/media",bundlePath:"",filename:""},components:{App:l.default,Document:d.default},userland:r})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796,5392,5839],()=>s(37750));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js.nft.json index 21d1675..daeacea 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/media.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js b/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js index d4c893a..fcdf845 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=431,e.ids=[431],e.modules={55840:(e,t,r)=>{r.r(t),r.d(t,{config:()=>W,default:()=>I,getServerSideProps:()=>Q,getStaticPaths:()=>O,getStaticProps:()=>B,reportWebVitals:()=>z,routeModule:()=>Y,unstable_getServerProps:()=>J,unstable_getServerSideProps:()=>K,unstable_getStaticParams:()=>X,unstable_getStaticPaths:()=>G,unstable_getStaticProps:()=>U});var s={};r.r(s),r.d(s,{MediaContext:()=>V,default:()=>H,getServerSideProps:()=>L});var i=r(63865),a=r(9455),n=r(30671),o=r(49407),d=r(89600),l=r(8732),u=r(82015),c=r.n(u),p=r(95222),x=r(20048),m=r.n(x),f=r(83531),h=r(81156),g=r(98009),S=r(30180),j=r(46437),v=r(58548),y=r(55158),A=r(24671),P=r(82747),b=r(62506),_=r(96089);function M(e){let{media:t,setTargetMedia:r,user:s,folders:i,query:a,staticHost:n,folder:o}=c().useContext(V);return(0,l.jsxs)(c().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j.A,{}),(0,l.jsx)(_.A,{size:20}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:a.folder[a.folder.length-1]})]}),(0,l.jsxs)(b.A,{children:[(0,l.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,y.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Media"})]}),(0,l.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,y.PB)("add-folder-popoup",e=>{e?.querySelector("input")?.focus()})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Folder"})]})]})]}),(0,l.jsx)(v.A,{user:s})]}),s?.verification_status?.toString().match(/1/)?(0,l.jsxs)(c().Fragment,{children:[(0,l.jsx)(P.A,{media:t,setTargetMedia:r,folders:i,folder:o,staticHost:n,user:s}),t&&t[0]&&(0,l.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,y.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,l.jsx)(A.A,{})]})}var w=r(31700),N=r(99486),q=r(32415),F=r(67216),$=r.n(F),C=r(33873),T=r.n(C),E=r(65693),k=r(67735),D=r.n(k);let R=r(29021),V=c().createContext({});function H({user:e,media:t,folders:r,query:s,staticHost:i,folderNameFull:a}){let n=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[o,d]=c().useState(null),[u,x]=c().useState(null),[m,j]=c().useState(null),[v,y]=c().useState(!1),[A,P]=c().useState(null);return(0,l.jsx)(V.Provider,{value:{user:e,media:t,targetMedia:A,setTargetMedia:P,folders:r,query:s,staticHost:i,folder:a},children:(0,l.jsxs)(c().Fragment,{children:[(0,l.jsxs)(p.A,{head:n,user:e,children:[v&&(0,l.jsx)(q.A,{screen:!0,title:"Processing Files ..."}),(0,l.jsx)(M,{}),(0,l.jsx)(f.A,{setNewMedia:d,setLoading:y}),(0,l.jsx)(w.A,{setNewFile:x,setLoading:y}),(0,l.jsx)(E.A,{setNewVideo:j,setLoading:y})]}),(0,l.jsx)(h.A,{newMedia:o,setNewMedia:d,newFile:u,setNewFile:x,folder:a,newVideo:m,setNewVideo:j}),(0,l.jsx)(g.A,{targetMedia:A,staticHost:i,setTargetMedia:P,media:t}),(0,l.jsx)(S.A,{folder:a}),(0,l.jsx)(N.A,{user:e})]})})}async function L({req:e,res:t,query:r}){try{let s=await m()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let i=r.folder.join("/"),a=await $()(`SELECT * FROM user_media WHERE user_id='${s.id}' AND folder='${i}'`),n=D()({isPrivate:!1,userId:s.id,folder:i,video:!1,pathOnly:!0});if(!n)return console.log("Static File ENV not Found!"),{redirect:{destination:"/",permanent:!1}};let o=n.fileRootPath,d=R.readdirSync(o).filter(e=>!R.statSync(T().normalize(`${o}/${e}`)).isFile());return{props:{user:s,media:a,folders:d,query:r,staticHost:process.env.DSQL_STATIC_HOST||"",folderNameFull:i}}}catch(e){return{redirect:{destination:"/admin",permanent:!1}}}}let I=(0,n.M)(s,"default"),B=(0,n.M)(s,"getStaticProps"),O=(0,n.M)(s,"getStaticPaths"),Q=(0,n.M)(s,"getServerSideProps"),W=(0,n.M)(s,"config"),z=(0,n.M)(s,"reportWebVitals"),U=(0,n.M)(s,"unstable_getStaticProps"),G=(0,n.M)(s,"unstable_getStaticPaths"),X=(0,n.M)(s,"unstable_getStaticParams"),J=(0,n.M)(s,"unstable_getServerProps"),K=(0,n.M)(s,"unstable_getServerSideProps"),Y=new i.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/admin/[user_id]/media/[...folder]",pathname:"/admin/[user_id]/media/[...folder]",bundlePath:"",filename:""},components:{App:d.default,Document:o.default},userland:s})},46437:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(8732),i=r(23293);function a(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(i.A,{})})}r(82015)},67735:(e,t,r)=>{let s=r(29021),i=r(33873);e.exports=function({isPrivate:e,userId:t,folder:r,video:a,pathOnly:n}){"production".match(/production/);let o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)return console.log("Static File ENV not Found!"),null;let d=e?`@/${a?"videos":"media"}/${r?r+"/":""}`:a?`/videos/user-videos/user-${t}/${r?r+"/":""}`:`/images/user-images/user-${t}/${r?r+"/":""}`,l=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t}/media/${r?r+"/":""}`:i.join(o,d);return s.existsSync(l)||n||s.mkdirSync(l,{recursive:!0}),{fileRootPath:l,urlRootPath:e?`@/media/${r?r+"/":""}`:`${process.env.DSQL_STATIC_HOST}${d}`,relativePath:d}}},96089:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,7640],()=>r(55840));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=431,e.ids=[431],e.modules={29568:(e,t,r)=>{r.r(t),r.d(t,{config:()=>B,default:()=>V,getServerSideProps:()=>I,getStaticPaths:()=>L,getStaticProps:()=>H,reportWebVitals:()=>O,routeModule:()=>X,unstable_getServerProps:()=>U,unstable_getServerSideProps:()=>G,unstable_getStaticParams:()=>z,unstable_getStaticPaths:()=>W,unstable_getStaticProps:()=>Q});var s={};r.r(s),r.d(s,{MediaContext:()=>k,default:()=>D,getServerSideProps:()=>R});var i=r(63865),a=r(9455),n=r(30671),o=r(5583),d=r(19796),l=r(8732),u=r(82015),c=r.n(u),p=r(29021),x=r.n(p),m=r(25562),f=r(92702),h=r(81145),g=r(87081),S=r(14865),j=r(94198),v=r(59023),A=r(53926),y=r(91140),P=r(66485),b=r(91692),_=r(55904),M=r(96089);function w(e){let{media:t,setTargetMedia:r,user:s,folders:i,query:a,staticHost:n,folder:o}=c().useContext(k);return(0,l.jsxs)(c().Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v.A,{}),(0,l.jsx)(M.A,{size:20}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:a.folder[a.folder.length-1]})]}),(0,l.jsxs)(_.A,{children:[(0,l.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,y.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Media"})]}),(0,l.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,y.PB)("add-folder-popoup",e=>{e?.querySelector("input")?.focus()})},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add Folder"})]})]})]}),(0,l.jsx)(A.A,{user:s})]}),s?.verification_status?.toString().match(/1/)?(0,l.jsxs)(c().Fragment,{children:[(0,l.jsx)(b.A,{media:t,setTargetMedia:r,folders:i,folder:o,staticHost:n,user:s}),t&&t[0]&&(0,l.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,y.PB)("choose-media-type-popoup")},children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,l.jsx)(P.A,{})]})}var N=r(43430),q=r(67325),F=r(16757),$=r(71934),C=r(33873),T=r.n(C),E=r(10839);let k=c().createContext({});function D({user:e,media:t,folders:r,query:s,staticHost:i,folderNameFull:a}){let n=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[o,d]=c().useState(null),[u,p]=c().useState(null),[x,f]=c().useState(null),[v,A]=c().useState(!1),[y,P]=c().useState(null);return(0,l.jsx)(k.Provider,{value:{user:e,media:t,targetMedia:y,setTargetMedia:P,folders:r,query:s,staticHost:i,folder:a},children:(0,l.jsxs)(c().Fragment,{children:[(0,l.jsxs)(m.A,{head:n,user:e,children:[v&&(0,l.jsx)(F.A,{screen:!0,title:"Processing Files ..."}),(0,l.jsx)(w,{}),(0,l.jsx)(h.A,{setNewMedia:d,setLoading:A}),(0,l.jsx)(N.A,{setNewFile:p,setLoading:A}),(0,l.jsx)(E.A,{setNewVideo:f,setLoading:A})]}),(0,l.jsx)(g.A,{newMedia:o,setNewMedia:d,newFile:u,setNewFile:p,folder:a,newVideo:x,setNewVideo:f}),(0,l.jsx)(S.A,{targetMedia:y,staticHost:i,setTargetMedia:P,media:t}),(0,l.jsx)(j.A,{folder:a}),(0,l.jsx)(q.A,{user:e})]})})}async function R({req:e,res:t,query:r}){try{let s=await (0,f.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let i=r.folder.join("/"),a=await (0,$.A)(`SELECT * FROM user_media WHERE user_id='${s.id}' AND folder='${i}'`),n=function({isPrivate:e,userId:t,folder:r,video:s,pathOnly:i}){"production".match(/production/);let a=process.env.DSQL_STATIC_SERVER_DIR;if(!a)return console.log("Static File ENV not Found!"),null;let n=e?`@/${s?"videos":"media"}/${r?r+"/":""}`:s?`/videos/user-videos/user-${t}/${r?r+"/":""}`:`/images/user-images/user-${t}/${r?r+"/":""}`,o=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t}/media/${r?r+"/":""}`:T().join(a,n);return x().existsSync(o)||i||x().mkdirSync(o,{recursive:!0}),{fileRootPath:o,urlRootPath:e?`@/media/${r?r+"/":""}`:`${process.env.DSQL_STATIC_HOST}${n}`,relativePath:n}}({isPrivate:!1,userId:s.id,folder:i,video:!1,pathOnly:!0});if(!n)return console.log("Static File ENV not Found!"),{redirect:{destination:"/",permanent:!1}};let o=n.fileRootPath,d=x().readdirSync(o).filter(e=>!x().statSync(T().normalize(`${o}/${e}`)).isFile());return{props:{user:s,media:a,folders:d,query:r,staticHost:process.env.DSQL_STATIC_HOST||"",folderNameFull:i}}}catch(e){return{redirect:{destination:"/admin",permanent:!1}}}}let V=(0,n.M)(s,"default"),H=(0,n.M)(s,"getStaticProps"),L=(0,n.M)(s,"getStaticPaths"),I=(0,n.M)(s,"getServerSideProps"),B=(0,n.M)(s,"config"),O=(0,n.M)(s,"reportWebVitals"),Q=(0,n.M)(s,"unstable_getStaticProps"),W=(0,n.M)(s,"unstable_getStaticPaths"),z=(0,n.M)(s,"unstable_getStaticParams"),U=(0,n.M)(s,"unstable_getServerProps"),G=(0,n.M)(s,"unstable_getServerSideProps"),X=new i.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/admin/[user_id]/media/[...folder]",pathname:"/admin/[user_id]/media/[...folder]",bundlePath:"",filename:""},components:{App:d.default,Document:o.default},userland:s})},59023:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(8732),i=r(23293);function a(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(i.A,{})})}r(82015)},96089:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,5839],()=>r(29568));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js.nft.json index ca76456..350172f 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/media/[...folder].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js index a9810e2..ae3b532 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=8591,e.ids=[8591],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},23133:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>x,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>p,getStaticProps:()=>h,reportWebVitals:()=>y,routeModule:()=>j,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>g,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>f});var s=a(63865),n=a(9455),l=a(30671),i=a(49407),c=a(89600),d=a(74094),o=e([d]);d=(o.then?(await o)():o)[0];let u=(0,l.M)(d,"default"),h=(0,l.M)(d,"getStaticProps"),p=(0,l.M)(d,"getStaticPaths"),m=(0,l.M)(d,"getServerSideProps"),x=(0,l.M)(d,"config"),y=(0,l.M)(d,"reportWebVitals"),f=(0,l.M)(d,"unstable_getStaticProps"),v=(0,l.M)(d,"unstable_getStaticPaths"),g=(0,l.M)(d,"unstable_getStaticParams"),A=(0,l.M)(d,"unstable_getServerProps"),b=(0,l.M)(d,"unstable_getServerSideProps"),j=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/schema",pathname:"/admin/[user_id]/schema",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:d});r()}catch(e){r(e)}})},74223:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>x});var s=a(8732),n=a(82015),l=a.n(n),i=a(58548),c=a(51548),d=a(74094),o=a(40942);a(63715),a(34844);var u=a(89788),h=a(56248),p=a.n(h),m=e([d,o,u]);function x(e){let{dbSchemaData:t,user:a}=l().useContext(d.UserSchemaContext),[r,n]=l().useState(t),[o,h]=l().useState(null),[m,x]=l().useState(null),[y,f]=l().useState(null);return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsx)("div",{className:"",children:(0,s.jsx)("h1",{className:"text-3xl m-0",children:"User Schema"})}),(0,s.jsx)(i.A,{user:a})]}),(0,s.jsx)("section",{className:"paper",children:(0,s.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Database SCHEMA JSON"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.A,{required:!0,selectOptions:[{title:"All Databases",payload:"none"},...t.map((e,t)=>({title:e.dbName,payload:e.dbFullName,name:e.dbFullName}))],name:"databases",onChangeHandler:e=>{e.target.value?.match(/^none$/)?h(null):h(e.target.value)}}),m&&m[0]&&(0,s.jsx)(c.A,{required:!0,selectOptions:[{title:"All Tables",payload:"none"},...m.map((e,t)=>({title:e.tableFullName,payload:e.tableName,name:e.tableName}))],name:"database_tables",onChangeHandler:e=>{e.target.value?.match(/^none$/)?f(null):f(e.target.value)}})]})]}),(0,s.jsx)(u.A,{content:p().stringify(r,null,4),readOnly:!0,options:{wrap:!0},wrapperProps:{className:"h-[60vh]"}})]})})]})}[d,o,u]=m.then?(await m)():m,r()}catch(e){r(e)}})},40942:(e,t,a)=>{a.a(e,async(e,t)=>{try{a(8732),a(82015);var r=a(74094),s=e([r]);r=(s.then?(await s)():s)[0],t()}catch(e){t(e)}})},84759:(e,t,a)=>{a.d(t,{A:()=>r});function r({editorHTMLElementRef:e,fieldObject:t,setRefresh:a,language:r="javascript",entry:s,jsonTextEditors:n,editorRef:l,readOnly:i,initialContent:c,options:d}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{a?.(e=>e+1)},1e3);return}let o=ace.edit(e.current);o.setOptions({mode:"ace/mode/"+r,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&s?.[t.fieldName]?(()=>{if("json"!==r)return s[t.fieldName];try{return JSON.stringify(JSON.parse(s[t.fieldName]),null,4)}catch(e){return s[t.fieldName]}})():""),placeholder:"json"==r?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...d}),l&&t?.fieldName&&(n?.current.push({fieldName:t.fieldName,ref:l}),l.current=o);try{ace.require("ace/ext/beautify").beautify(o.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},51548:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(8732),s=a(58526);function n({selectOptions:e,name:t,onChangeHandler:a,required:n,setAlert:l,title:i,defaultValue:c,info:d,id:o}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,r.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(d?" pr-8":""),children:[i&&(0,r.jsxs)("label",{htmlFor:t,children:[i,n?"":" (optional)"]}),(0,r.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,r.jsx)("select",{name:t,id:o||t,className:"w-full bg-white",required:n,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:a,title:s}=e;return(0,r.jsx)("option",{value:a,selected:!!e.default,children:s},t+1)})}),(0,r.jsx)(s.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),d&&(0,r.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,r.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,r.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,r.jsx)("span",{children:d})}),(0,r.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,r.jsx)("div",{children:"Form Select Error"})}}a(82015)},89788:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>d});var s=a(8732);a(63715);var n=a(82015),l=a.n(n);a(84759);var i=a(75979),c=e([i]);function d({editorRef:e,content:t,readOnly:a,language:r="javascript",options:n,wrapperProps:c}){try{let e=l().useRef(),[t,a]=l().useState(0);return(0,s.jsx)("div",{...c,ref:e,className:(0,i.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}i=(c.then?(await c)():c)[0],r()}catch(e){r(e)}})},34844:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(8732),s=a(82015),n=a.n(s),l=a(96089);function i({content:e,language:t,style:a,showCopy:s}){let[i,c]=n().useState(!1),d=()=>{c(!0)},o={};return(0,r.jsxs)("pre",{className:`language-${t||"javascript"} w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center`,style:a?{...a,...o}:o,children:[(0,r.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:e}),(0,r.jsx)("button",{className:"outlined copy-code "+(s?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:t=>{navigator.clipboard.writeText(e).then(()=>{d()})},children:(0,r.jsx)(l.A,{className:"text-white",size:20})})]})}},24671:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s(e){return(0,r.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,r.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,r.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}a(82015)},23293:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},96089:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},56248:e=>{e.exports={parse:function(e,t){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,t)}catch(e){return}}},stringify:function(e,t,a){try{return JSON.stringify(e,t,a)}catch(e){return}}}},74094:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{UserSchemaContext:()=>f,default:()=>m,getServerSideProps:()=>x});var s=a(8732),n=a(82015),l=a.n(n),i=a(95222),c=a(20048),d=a.n(c),o=a(74223),u=a(24671),h=a(58548),p=e([o]);o=(p.then?(await p)():p)[0];let y=a(29021),f=l().createContext({});function m({user:e,query:t,dbSchemaData:a}){let r=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]});return(0,s.jsx)(i.A,{head:r,user:e,aceEditor:!0,children:(0,s.jsx)(f.Provider,{value:{user:e,dbSchemaData:a},children:e?.verification_status?.toString().match(/1/)?(0,s.jsx)(l().Fragment,{children:(0,s.jsx)(o.A,{})}):(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsx)("div",{className:"",children:(0,s.jsx)("h1",{className:"text-3xl m-0",children:"User Schema"})}),(0,s.jsx)(h.A,{user:e})]}),(0,s.jsx)(u.A,{})]})})})}async function x({req:e,res:t,query:a}){let r=await d()(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r.id}/main.json`;if(!y.existsSync(s))return{redirect:{destination:"/admin",permanent:!1}};let n=JSON.parse(y.readFileSync(s,"utf-8"));return{props:{user:r,query:a,dbSchemaData:n||[]}}}r()}catch(e){r(e)}})},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,9600,7070],()=>a(23133));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8591,e.ids=[8591],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},25355:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{config:()=>f,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>p,getStaticProps:()=>h,reportWebVitals:()=>x,routeModule:()=>j,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>g,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>y});var s=a(63865),n=a(9455),l=a(30671),i=a(5583),c=a(19796),d=a(2207),o=e([d]);d=(o.then?(await o)():o)[0];let u=(0,l.M)(d,"default"),h=(0,l.M)(d,"getStaticProps"),p=(0,l.M)(d,"getStaticPaths"),m=(0,l.M)(d,"getServerSideProps"),f=(0,l.M)(d,"config"),x=(0,l.M)(d,"reportWebVitals"),y=(0,l.M)(d,"unstable_getStaticProps"),v=(0,l.M)(d,"unstable_getStaticPaths"),g=(0,l.M)(d,"unstable_getStaticParams"),A=(0,l.M)(d,"unstable_getServerProps"),b=(0,l.M)(d,"unstable_getServerSideProps"),j=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/schema",pathname:"/admin/[user_id]/schema",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:d});r()}catch(e){r(e)}})},61637:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>p});var s=a(8732),n=a(82015),l=a.n(n),i=a(53926),c=a(80830),d=a(2207);a(46169);var o=a(84894),u=a(60374),h=e([d,o]);function p(){let{dbSchemaData:e,user:t}=l().useContext(d.UserSchemaContext),[a,r]=l().useState(e),[n,h]=l().useState(null),[p,m]=l().useState(null),[f,x]=l().useState(null);return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsx)("div",{className:"",children:(0,s.jsx)("h1",{className:"text-3xl m-0",children:"User Schema"})}),(0,s.jsx)(i.A,{user:t})]}),(0,s.jsx)("section",{className:"paper",children:(0,s.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Database SCHEMA JSON"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.A,{required:!0,selectOptions:[{title:"All Databases",payload:"none"},...e.map((e,t)=>({title:e.dbName,payload:e.dbFullName,name:e.dbFullName}))],name:"databases",onChangeHandler:e=>{e.target.value?.match(/^none$/)?h(null):h(e.target.value)}}),p&&p[0]&&(0,s.jsx)(c.A,{required:!0,selectOptions:[{title:"All Tables",payload:"none"},...p.map((e,t)=>({title:e.tableFullName,payload:e.tableName,name:e.tableName}))],name:"database_tables",onChangeHandler:e=>{e.target.value?.match(/^none$/)?x(null):x(e.target.value)}})]})]}),(0,s.jsx)(o.A,{content:u.A.stringify(a,null,4),readOnly:!0,options:{wrap:!0},wrapperProps:{className:"h-[60vh]"}})]})})]})}[d,o]=h.then?(await h)():h,r()}catch(e){r(e)}})},6789:(e,t,a)=>{a.d(t,{A:()=>r});function r({editorHTMLElementRef:e,fieldObject:t,setRefresh:a,language:r="javascript",entry:s,jsonTextEditors:n,editorRef:l,readOnly:i,initialContent:c,options:d}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{a?.(e=>e+1)},1e3);return}let o=ace.edit(e.current);o.setOptions({mode:"ace/mode/"+r,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&s?.[t.fieldName]?(()=>{if("json"!==r)return s[t.fieldName];try{return JSON.stringify(JSON.parse(s[t.fieldName]),null,4)}catch(e){return s[t.fieldName]}})():""),placeholder:"json"==r?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...d}),l&&t?.fieldName&&(n?.current.push({fieldName:t.fieldName,ref:l}),l.current=o);try{ace.require("ace/ext/beautify").beautify(o.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},80830:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(8732),s=a(58526);function n({selectOptions:e,name:t,onChangeHandler:a,required:n,setAlert:l,title:i,defaultValue:c,info:d,id:o}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,r.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(d?" pr-8":""),children:[i&&(0,r.jsxs)("label",{htmlFor:t,children:[i,n?"":" (optional)"]}),(0,r.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,r.jsx)("select",{name:t,id:o||t,className:"w-full bg-white",required:n,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:a,title:s}=e;return(0,r.jsx)("option",{value:a,selected:!!e.default,children:s},t+1)})}),(0,r.jsx)(s.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),d&&(0,r.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,r.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,r.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,r.jsx)("span",{children:d})}),(0,r.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,r.jsx)("div",{children:"Form Select Error"})}}a(82015)},84894:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.d(t,{A:()=>d});var s=a(8732);a(46169);var n=a(82015),l=a.n(n);a(6789);var i=a(75979),c=e([i]);function d({editorRef:e,content:t,readOnly:a,language:r="javascript",options:n,wrapperProps:c}){try{let e=l().useRef(),[t,a]=l().useState(0);return(0,s.jsx)("div",{...c,ref:e,className:(0,i.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,s.jsx)(l().Fragment,{children:(0,s.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}i=(c.then?(await c)():c)[0],r()}catch(e){r(e)}})},66485:(e,t,a)=>{a.d(t,{A:()=>s});var r=a(8732);function s(){return(0,r.jsxs)("a",{href:"/email-verification",className:"card w-full items-center justify-center py-4 gap-2",children:[(0,r.jsx)("img",{src:"/images/warning.png",alt:"Down Arrow",width:25,className:""}),(0,r.jsx)("span",{children:"Your Account is not verified. Please verify your account."})]})}a(82015)},23293:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},60374:(e,t,a)=>{a.d(t,{A:()=>r});let r={parse:function(e,t){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,t)}catch(e){return}}},stringify:function(e,t,a){try{return JSON.stringify(e,t||void 0,a)}catch(e){return}}}},2207:(e,t,a)=>{a.a(e,async(e,r)=>{try{a.r(t),a.d(t,{UserSchemaContext:()=>x,default:()=>p,getServerSideProps:()=>m});var s=a(8732),n=a(82015),l=a.n(n),i=a(25562),c=a(92702),d=a(61637),o=a(66485),u=a(53926),h=e([d]);d=(h.then?(await h)():h)[0];let f=a(29021),x=l().createContext({});function p({user:e,query:t,dbSchemaData:a}){let r=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]});return(0,s.jsx)(i.A,{head:r,user:e,aceEditor:!0,children:(0,s.jsx)(x.Provider,{value:{user:e,dbSchemaData:a},children:e?.verification_status?.toString().match(/1/)?(0,s.jsx)(l().Fragment,{children:(0,s.jsx)(d.A,{})}):(0,s.jsxs)(l().Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsx)("div",{className:"",children:(0,s.jsx)("h1",{className:"text-3xl m-0",children:"User Schema"})}),(0,s.jsx)(u.A,{user:e})]}),(0,s.jsx)(o.A,{})]})})})}async function m({req:e,res:t,query:a}){let r=await (0,c.default)(e,t);if(!r?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let s=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r.id}/main.json`;if(!f.existsSync(s))return{redirect:{destination:"/admin",permanent:!1}};let n=JSON.parse(f.readFileSync(s,"utf-8"));return{props:{user:r,query:a,dbSchemaData:n||[]}}}r()}catch(e){r(e)}})},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[883,9821,9796,5392],()=>a(25355));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js.nft.json index 0669205..68cc884 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../node_modules/tailwind-merge/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../node_modules/tailwind-merge/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js index baf6add..ddc66e0 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=189,e.ids=[189],e.modules={19881:(e,t,s)=>{s.r(t),s.d(t,{config:()=>U,default:()=>E,getServerSideProps:()=>D,getStaticPaths:()=>C,getStaticProps:()=>R,reportWebVitals:()=>I,routeModule:()=>k,unstable_getServerProps:()=>O,unstable_getServerSideProps:()=>W,unstable_getStaticParams:()=>H,unstable_getStaticPaths:()=>F,unstable_getStaticProps:()=>L});var a={};s.r(a),s.d(a,{SettingsContext:()=>A,default:()=>q,getServerSideProps:()=>M});var r=s(63865),i=s(9455),l=s(30671),n=s(49407),o=s(89600),c=s(8732),u=s(82015),d=s.n(u),m=s(95222),p=s(20048),g=s.n(p);s(26295);var h=s(58548),x=s(70045),f=s(79100),j=s(55158),S=s(62506);function w({user:e,image:t,setImage:s}){let a=d().useRef();return(0,c.jsxs)("div",{className:"paper w-full items-center",children:[(0,c.jsx)("h2",{className:"m-0 text-xl",children:"User Image"}),(0,c.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,c.jsx)("img",{src:t?"string"==typeof t?t:t.imageBase64Full:"/images/database-placeholder.png",alt:"User Image",width:100,className:"w-full h-full object-cover",ref:a,"data-imagepreview":"image"})}),(0,c.jsxs)("div",{className:"w-full flex-col",id:"upload-user-image-options",children:[(0,c.jsxs)(S.A,{column:!0,className:"w-full",children:[(0,c.jsx)("button",{className:"outlined gray w-full whitespace-normal",onClick:e=>{(0,j.PB)("user-media-popup")},children:"Choose image From your Uploads"}),(0,c.jsx)("button",{className:"secondary w-full whitespace-normal",onClick:e=>{let t=e.target;t.closest("#upload-user-image-options")?.querySelector("input")?.click()},children:(0,c.jsx)("span",{children:"Choose image From your Computer"})})]}),(0,c.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Image",className:"hidden",onChange:async e=>{let t=e.target,a=t?.files?.[0];a&&s(await (0,f.A)({imageInputFile:a,maxWidth:400}))}})]})]})}function v(e){let{user:t,image:s,setImage:a,activeUser:r}=d().useContext(A),[i,l]=d().useState(!1);return(0,c.jsxs)(d().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,c.jsx)("h1",{className:"text-3xl m-0",children:"Settings"}),(0,c.jsx)("div",{children:!t?.social_login&&(0,c.jsx)("a",{href:"/send-password-reset-link",className:"button outlined",children:"Reset Password"})})]}),(0,c.jsx)(h.A,{user:t})]}),(0,c.jsx)("section",{className:"p-0",children:(0,c.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-8 items-stretch",children:[(0,c.jsxs)("div",{className:"paper w-full",children:[(0,c.jsx)("h2",{className:"m-0 text-xl",children:"Account Information"}),(0,c.jsxs)("div",{className:"flex flex-row w-full",children:[(0,c.jsx)("span",{children:"USER ID"}),(0,c.jsx)("b",{className:"info w-auto",children:t.id})]}),(0,c.jsx)(x.A,{user:r,image:s})]}),(0,c.jsx)("div",{className:"items-stretch",children:(0,c.jsx)(w,{image:s,setImage:a})})]})}),!1]})}s(32415);var b=s(42105),N=s(41658),_=s.n(N),y=s(67216),P=s.n(y);let A=d().createContext({});function q({user:e,databases:t,activeUser:s}){let a=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[r,i]=d().useState(s.image);return(0,c.jsx)(m.A,{head:a,user:e,children:(0,c.jsxs)(A.Provider,{value:{user:e,image:r,setImage:i,activeUser:s},children:[(0,c.jsx)(v,{}),(0,c.jsx)(b.A,{setDbImage:i})]})})}async function M({req:e,res:t,query:s}){let a=await g()(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await _()(`SELECT SCHEMA_NAME AS dbFullName FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'user_${a.id}%'`),i=await P()(`SELECT first_name,last_name,username,email,image,image_thumbnail FROM users WHERE id='${a.id}'`);return{props:{user:a,databases:r,activeUser:i[0]}}}let E=(0,l.M)(a,"default"),R=(0,l.M)(a,"getStaticProps"),C=(0,l.M)(a,"getStaticPaths"),D=(0,l.M)(a,"getServerSideProps"),U=(0,l.M)(a,"config"),I=(0,l.M)(a,"reportWebVitals"),L=(0,l.M)(a,"unstable_getStaticProps"),F=(0,l.M)(a,"unstable_getStaticPaths"),H=(0,l.M)(a,"unstable_getStaticParams"),O=(0,l.M)(a,"unstable_getServerProps"),W=(0,l.M)(a,"unstable_getServerSideProps"),k=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/settings",pathname:"/admin/[user_id]/settings",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:a})},42105:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(8732),r=s(82015),i=s.n(r);s(63715);var l=s(55158),n=s(32415);function o({setDbImage:e}){let[t,s]=i().useState(!0),[r,o]=i().useState(null);return(0,a.jsxs)(l.Ay,{title:"user-media-popup",children:[t&&(0,a.jsx)(n.A,{width:"20px"}),(0,a.jsx)("h4",{className:"m-0 text-lg",children:"Your Uploaded Images"}),(0,a.jsx)("div",{className:"grid grid-cols-2",children:r&&r[0]&&r.filter(e=>"image"==e.media_type).map((t,s)=>(0,a.jsx)("div",{className:"w-full h-44 cursor-pointer hover:opacity-70",onClick:s=>{e(t.media_thumbnail_url||null),(0,l.fs)()},children:(0,a.jsx)("img",{src:t.media_thumbnail_url,alt:"User Media",className:"w-full h-full object-contain"})},s+1))})]})}s(64417)},79100:(e,t,s)=>{s.d(t,{A:()=>a});async function a({imageInputFile:e,maxWidth:t}){let s,a,r=document.querySelector("[data-imagepreview='image']"),i=e.name.replace(/\..*/,""),l=document.createElement("canvas"),n=e.type,o=t||null,c=URL.createObjectURL(e),u=new Image;return u.src=c,s=await new Promise((e,t)=>{u.onerror=function(){URL.revokeObjectURL(this.src),console.log("Cannot load image")},u.onload=function(){if(URL.revokeObjectURL(this.src),o){let e=o/u.naturalWidth;l.width=u.naturalWidth{e.src=s}),e(s)}}),a=await new Promise((e,t)=>{l.toBlob(t=>{e(t?.size)},n,.95)}),{imageBase64:s.replace(/.*?base64,/,""),imageBase64Full:s,imageName:i,imageSize:a}}},41658:(e,t,s)=>{let a=s(29021),r=s(22373),i=s(13608);e.exports=async function(e){let t;"production".match(/dev/)&&a.appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{t=await i(e)}catch(e){r({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return t||null}},13608:(e,t,s)=>{let a=s(9973),r=s(31976),i=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,charset:"utf8mb4",ssl:r()}});e.exports=function(...e){try{return new Promise((t,s)=>{i.query(...e).then(e=>{i.end(),t(JSON.parse(JSON.stringify(e)))}).catch(e=>{i.end(),t({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},1976:e=>{e.exports=require("react-dom/client")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9600,7070,3737,8613,3460,2414,3247,45],()=>s(19881));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=189,e.ids=[189],e.modules={47766:(e,t,s)=>{s.r(t),s.d(t,{config:()=>E,default:()=>M,getServerSideProps:()=>C,getStaticPaths:()=>y,getStaticProps:()=>q,reportWebVitals:()=>D,routeModule:()=>k,unstable_getServerProps:()=>H,unstable_getServerSideProps:()=>O,unstable_getStaticParams:()=>I,unstable_getStaticPaths:()=>F,unstable_getStaticProps:()=>R});var a={};s.r(a),s.d(a,{SettingsContext:()=>P,default:()=>_,getServerSideProps:()=>A});var r=s(63865),i=s(9455),l=s(30671),n=s(5583),o=s(19796),c=s(8732),d=s(82015),u=s.n(d),m=s(25562),p=s(92702),g=s(53926),x=s(57660),h=s(65842),f=s(91140),j=s(55904);function S({user:e,image:t,setImage:s}){let a=u().useRef();return(0,c.jsxs)("div",{className:"paper w-full items-center",children:[(0,c.jsx)("h2",{className:"m-0 text-xl",children:"User Image"}),(0,c.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,c.jsx)("img",{src:t?"string"==typeof t?t:t.imageBase64Full:"/images/database-placeholder.png",alt:"User Image",width:100,className:"w-full h-full object-cover",ref:a,"data-imagepreview":"image"})}),(0,c.jsxs)("div",{className:"w-full flex-col",id:"upload-user-image-options",children:[(0,c.jsxs)(j.A,{column:!0,className:"w-full",children:[(0,c.jsx)("button",{className:"outlined gray w-full whitespace-normal",onClick:e=>{(0,f.PB)("user-media-popup")},children:"Choose image From your Uploads"}),(0,c.jsx)("button",{className:"secondary w-full whitespace-normal",onClick:e=>{let t=e.target;t.closest("#upload-user-image-options")?.querySelector("input")?.click()},children:(0,c.jsx)("span",{children:"Choose image From your Computer"})})]}),(0,c.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Image",className:"hidden",onChange:async e=>{let t=e.target,a=t?.files?.[0];a&&s(await (0,h.A)({imageInputFile:a,maxWidth:400}))}})]})]})}function b(){let{user:e,image:t,setImage:s,activeUser:a}=u().useContext(P),[r,i]=u().useState(!1);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,c.jsx)("h1",{className:"text-3xl m-0",children:"Settings"}),(0,c.jsx)("div",{children:!e?.social_login&&(0,c.jsx)("a",{href:"/send-password-reset-link",className:"button outlined",children:"Reset Password"})})]}),(0,c.jsx)(g.A,{user:e})]}),(0,c.jsx)("section",{className:"p-0",children:(0,c.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-8 items-stretch",children:[(0,c.jsxs)("div",{className:"paper w-full",children:[(0,c.jsx)("h2",{className:"m-0 text-xl",children:"Account Information"}),(0,c.jsxs)("div",{className:"flex flex-row w-full",children:[(0,c.jsx)("span",{children:"USER ID"}),(0,c.jsx)("b",{className:"info w-auto",children:e.id})]}),(0,c.jsx)(x.A,{user:a,image:t})]}),(0,c.jsx)("div",{className:"items-stretch",children:(0,c.jsx)(S,{image:t,setImage:s})})]})}),!1]})}s(16757),s(46169);var v=s(37195),w=s(19134),N=s(71934);let P=u().createContext({});function _({user:e,databases:t,activeUser:s}){let a=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[r,i]=u().useState(s.image);return(0,c.jsx)(m.A,{head:a,user:e,children:(0,c.jsxs)(P.Provider,{value:{user:e,image:r,setImage:i,activeUser:s},children:[(0,c.jsx)(b,{}),(0,c.jsx)(v.A,{setDbImage:i})]})})}async function A({req:e,res:t,query:s}){let a=await (0,p.default)(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/login",permanent:!1}};let r=await (0,w.A)(`SELECT SCHEMA_NAME AS dbFullName FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'user_${a.id}%'`),i=await (0,N.A)(`SELECT first_name,last_name,username,email,image,image_thumbnail FROM users WHERE id='${a.id}'`);return{props:{user:a,databases:r,activeUser:i[0]}}}let M=(0,l.M)(a,"default"),q=(0,l.M)(a,"getStaticProps"),y=(0,l.M)(a,"getStaticPaths"),C=(0,l.M)(a,"getServerSideProps"),E=(0,l.M)(a,"config"),D=(0,l.M)(a,"reportWebVitals"),R=(0,l.M)(a,"unstable_getStaticProps"),F=(0,l.M)(a,"unstable_getStaticPaths"),I=(0,l.M)(a,"unstable_getStaticParams"),H=(0,l.M)(a,"unstable_getServerProps"),O=(0,l.M)(a,"unstable_getServerSideProps"),k=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/settings",pathname:"/admin/[user_id]/settings",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:a})},19134:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(29021),r=s.n(a),i=s(77047);async function l(e){let t;"production".match(/dev/)&&r().appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{t=await function(...e){let t=global.DSQL_DB_CONN;try{return new Promise((s,a)=>{t.query(...e).then(e=>{t.end(),s(JSON.parse(JSON.stringify(e)))}).catch(e=>{t.end(),s({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}(e)}catch(e){(0,i.A)({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return t||null}},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9796,5392,1579,8760],()=>s(47766));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js.nft.json index b758400..daeacea 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/settings.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/client.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package-shared/data/dataTypes.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js index c8b59bf..bc095ff 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5662,e.ids=[5662],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},67777:(e,t,s)=>{s.r(t),s.d(t,{config:()=>C,default:()=>P,getServerSideProps:()=>q,getStaticPaths:()=>E,getStaticProps:()=>M,reportWebVitals:()=>O,routeModule:()=>$,unstable_getServerProps:()=>R,unstable_getServerSideProps:()=>T,unstable_getStaticParams:()=>I,unstable_getStaticPaths:()=>F,unstable_getStaticProps:()=>U});var a={};s.r(a),s.d(a,{UsersContext:()=>w,default:()=>k,getServerSideProps:()=>S});var i=s(63865),r=s(9455),n=s(30671),l=s(49407),d=s(89600),c=s(8732),o=s(82015),u=s.n(o),m=s(95222),p=s(20048),x=s.n(p),h=s(84312),v=s(58548),f=s(21347);function y({user:e,setTargetUser:t,users:s,adminUsers:a,invitedAccounts:i}){return(0,c.jsx)(u().Fragment,{children:(0,c.jsxs)("section",{className:"paper",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Users List"}),(0,c.jsxs)("div",{className:"card no-hover items-center w-full justify-between",children:[(0,c.jsxs)("div",{className:"gap-2",children:[(0,c.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden",children:(0,c.jsx)("img",{src:e.image_thumbnail,alt:"Main User Image",width:40,className:"w-full h-full object-cover"})}),(0,c.jsxs)("span",{className:"font-semibold",children:[e.first_name," ",e.last_name]})]}),(0,c.jsx)("span",{className:"text-sm font-semibold",children:"Super User (Owner)"})]}),(0,c.jsxs)("div",{className:"w-full flex-col items-stretch",children:[i&&i[0]&&(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)("h4",{className:"m-0 text-sm font-semibold text-slate-400",children:"Accounts that Invited you"}),i.map((e,s)=>(0,c.jsx)(f.A,{userObject:e,setTargetUser:t,paradigm:"invited"},s+1))]}),a&&a[0]&&(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)("h4",{className:"m-0 text-sm font-semibold text-slate-400",children:"Accounts you Invited"}),a.map((e,s)=>(0,c.jsx)(f.A,{userObject:e,setTargetUser:t},s+1))]})]})]})})}var j=s(63715),g=s(32415);function b({invitationObject:e}){let[t,s]=u().useState(!1);return(0,c.jsxs)("div",{className:"bg-slate-100 px-4 py-2 rounded w-full justify-between relative",children:[t&&(0,c.jsx)(g.A,{width:"20px"}),(0,c.jsxs)("span",{className:"text-sm font-semibold",children:[e.first_name," ",e.last_name," (",e.email,")"]}),(0,c.jsx)("button",{className:"py-1.5 px-3 text-sm secondary",onClick:t=>{s(!0),(0,j.A)("/api/acceptUserInvitation",{method:"post",body:{...e}},!0).then(e=>{e.success&&(window.alert("Invitation Accepted!"),window.location.reload()),setTimeout(()=>{s(!1)},500)})},children:"Accept Invitation"})]},e.id)}function A(e){let{user:t,databases:s,pendingInvitations:a,pendingInvitationsReceived:i,adminUsers:r,invitedAccounts:n,setTargetUser:l}=u().useContext(w),[d,o]=u().useState(!1);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,c.jsx)("h1",{className:"text-3xl m-0",children:"Users"}),(0,c.jsxs)("a",{href:`/admin/${t?.id}/users/add-user`,className:"flex items-center gap-2 whitespace-normal button",children:[(0,c.jsx)("span",{className:"symbol",children:"+"}),(0,c.jsx)("span",{children:"Add New User"})]})]}),(0,c.jsx)(v.A,{user:t})]}),(0,c.jsxs)("div",{className:"w-full grid grid-cols-1 items-start justify-start",children:[(0,c.jsx)("div",{className:"flex-col items-stretch justify-start",children:(0,c.jsx)(y,{setTargetUser:l,user:t,adminUsers:r,invitedAccounts:n})}),(0,c.jsxs)("div",{className:"flex-col items-stretch justify-start",children:[a&&a[0]&&(0,c.jsx)(u().Fragment,{children:(0,c.jsx)("section",{className:"p-4 items-start gap-4 overflow-visible",children:(0,c.jsxs)("div",{className:"flex-col w-full items-start",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Invitations Sent"}),a.map((e,t)=>(0,c.jsxs)("div",{className:"bg-slate-100 px-4 py-2 rounded w-full justify-between",children:[(0,c.jsx)("span",{className:"text-sm font-semibold",children:e.invited_user_email}),(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"text-sm text-slate-400",children:"Pending"}),(0,c.jsx)("span",{className:"text-sm text-orange-600 hover:opacity-50 cursor-pointer",onClick:t=>{window.confirm("Delete this invitation?")&&(0,j.A)("/api/deleteInvitation",{method:"POST",body:{id:e.id}},!0).finally(()=>{window.location.reload()})},children:"Delete Invitation"})]})]},e.id))]})})}),i&&i[0]&&(0,c.jsx)(u().Fragment,{children:(0,c.jsx)("section",{className:"p-4 items-start gap-4 overflow-visible",children:(0,c.jsxs)("div",{className:"flex-col w-full items-start",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Pending Invitations Received"}),i.map((e,t)=>(0,c.jsx)(b,{invitationObject:e},t+1))]})})})]})]})]})}var N=s(67216),_=s.n(N);let w=u().createContext({});function k({user:e,users:t,databases:s,pendingInvitations:a,pendingInvitationsReceived:i,adminUsers:r,invitedAccounts:n}){let l=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Users | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,o]=u().useState(null),[p,x]=u().useState(null),[v,f]=u().useState(null);return(0,c.jsx)(w.Provider,{value:{user:e,users:t,targetUser:p,setTargetUser:x,databases:s,pendingInvitations:a,pendingInvitationsReceived:i,adminUsers:r,invitedAccounts:n},children:(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)(m.A,{head:l,user:e,children:(0,c.jsx)(A,{})}),(0,c.jsx)(h.A,{targetUser:p,user:e,setTargetUser:x})]})})}async function S({req:e,res:t,query:s}){let a=await x()(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let i=await _()(`SELECT * FROM delegated_users WHERE user_id='${a.id}'`),r=await _()(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${a.id}'`),n=await _()(`SELECT * FROM invitations WHERE inviting_user_id='${a.id}' AND invitation_status='Pending'`),l=await _()(`SELECT invitations.*,users.first_name,users.last_name,users.email FROM invitations JOIN users ON users.id=invitations.inviting_user_id WHERE invited_user_email='${a.email}' AND invitation_status='Pending'`),d=await _()(`SELECT * FROM user_users WHERE user_id='${a.id}' AND user_type='admin'`),c=await _()(`SELECT user_users.*,users.first_name AS inviteeFirstName,users.last_name AS inviteeLastName,users.email AS inviteeEmail, users.image_thumbnail AS inviteeImage FROM user_users JOIN users ON users.id=user_users.user_id WHERE user_users.email='${a.email}' AND user_users.user_type='admin'`);return{props:{user:a,users:i,databases:r,pendingInvitations:n,pendingInvitationsReceived:l,adminUsers:d,invitedAccounts:c}}}let P=(0,n.M)(a,"default"),M=(0,n.M)(a,"getStaticProps"),E=(0,n.M)(a,"getStaticPaths"),q=(0,n.M)(a,"getServerSideProps"),C=(0,n.M)(a,"config"),O=(0,n.M)(a,"reportWebVitals"),U=(0,n.M)(a,"unstable_getStaticProps"),F=(0,n.M)(a,"unstable_getStaticPaths"),I=(0,n.M)(a,"unstable_getStaticParams"),R=(0,n.M)(a,"unstable_getServerProps"),T=(0,n.M)(a,"unstable_getServerSideProps"),$=new i.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/users",pathname:"/admin/[user_id]/users",bundlePath:"",filename:""},components:{App:d.default,Document:l.default},userland:a})},21347:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(8732),i=s(82015),r=s.n(i),n=s(55158),l=s(63715),d=s(32415),c=s(62506);function o({userObject:e,setTargetUser:t,paradigm:s}){let i=s?.match(/invited/)?`${e.inviteeFirstName} ${e.inviteeLastName} (${e.inviteeEmail})`:`${e.first_name} ${e.last_name} (${e.email})`,o=s?.match(/invited/)?`${e.inviteeImage}`:`${e.image_thumbnail}`,[u,m]=r().useState(!1);return(0,a.jsxs)("div",{className:"card no-hover items-center "+(s?.match(/invited/)?" green green-bg":" primary"),children:[u&&(0,a.jsx)(d.A,{}),(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)("img",{src:o,className:"w-8 h-8 rounded-full object-cover bg-slate-200",onError:e=>{e.target.src="/images/user-preset-thumbnail.png"}}),(0,a.jsx)("span",{className:"text-sm font-semibold",children:i}),e?.user_priviledge?.match(/./)&&(0,a.jsxs)("span",{className:"text-sm ml-auto text-slate-900/50",children:["Priviledges:"," ",(0,a.jsx)("span",{className:"text-slate-600 font-semibold",children:e.user_priviledge.split("|").join(" | ")})]}),!s?.match(/invited/)&&(0,a.jsx)(r().Fragment,{children:(0,a.jsxs)(c.A,{children:[(0,a.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:s=>{t(e),setTimeout(()=>{(0,n.PB)("target-user-popup")},200)},children:"Edit User Access"}),(0,a.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:t=>{m(!0),window.confirm("Delete this user")&&(0,l.A)("/api/deleteUserUser",{method:"post",body:{...e}},!0).then(e=>{setTimeout(()=>{m(!1)},500),window.location.reload()})},children:"Delete User"})]})})]})]})}},55158:(e,t,s)=>{s.d(t,{Ay:()=>l,PB:()=>d,fs:()=>c});var a=s(8732),i=s(58150),r=s(82015),n=s.n(r);function l({children:e,title:t,data:s,fullPage:r,wrapperClasses:l,closePopupDispatch:d,wrapperStyle:o,noContainer:u}){return r?(0,a.jsxs)("div",{className:"popup-bg overflow-hidden "+(l||""),"data-popupid":t||null,style:o,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsx)("div",{className:"relative w-full h-full z-50","data-data":s?JSON.stringify(s):"",children:e}),(0,a.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),d&&d()},children:(0,a.jsx)(i.A,{color:"white",size:20})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]}):(0,a.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":s?JSON.stringify(s):"",children:[e,(0,a.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,a.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]})}function d(e,t){let s=document.querySelector(`[data-popupid='${e}']`);s&&(s.style.display="flex",t&&t(s))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},62506:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(8732),i=s(82015),r=s.n(i);function n({children:e,column:t,className:s}){let i=r().useRef();return(0,a.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:i,children:e})}},23293:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9600,7070,4312],()=>s(67777));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5662,e.ids=[5662],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},63425:(e,t,s)=>{s.r(t),s.d(t,{config:()=>C,default:()=>P,getServerSideProps:()=>q,getStaticPaths:()=>E,getStaticProps:()=>M,reportWebVitals:()=>O,routeModule:()=>$,unstable_getServerProps:()=>R,unstable_getServerSideProps:()=>T,unstable_getStaticParams:()=>I,unstable_getStaticPaths:()=>F,unstable_getStaticProps:()=>U});var a={};s.r(a),s.d(a,{UsersContext:()=>w,default:()=>k,getServerSideProps:()=>S});var i=s(63865),r=s(9455),n=s(30671),l=s(5583),d=s(19796),c=s(8732),o=s(82015),u=s.n(o),m=s(25562),p=s(92702),x=s(55954),h=s(53926),v=s(91140),f=s(46169),y=s(16757),j=s(55904);function g({userObject:e,setTargetUser:t,paradigm:s}){let a=s?.match(/invited/)?`${e.inviteeFirstName} ${e.inviteeLastName} (${e.inviteeEmail})`:`${e.first_name} ${e.last_name} (${e.email})`,i=s?.match(/invited/)?`${e.inviteeImage}`:`${e.image_thumbnail}`,[r,n]=u().useState(!1);return(0,c.jsxs)("div",{className:"card no-hover items-center "+(s?.match(/invited/)?" green green-bg":" primary"),children:[r&&(0,c.jsx)(y.A,{}),(0,c.jsxs)("div",{className:"w-full",children:[(0,c.jsx)("img",{src:i,className:"w-8 h-8 rounded-full object-cover bg-slate-200",onError:e=>{e.target.src="/images/user-preset-thumbnail.png"}}),(0,c.jsx)("span",{className:"text-sm font-semibold",children:a}),e?.user_priviledge?.match(/./)&&(0,c.jsxs)("span",{className:"text-sm ml-auto text-slate-900/50",children:["Priviledges:"," ",(0,c.jsx)("span",{className:"text-slate-600 font-semibold",children:e.user_priviledge.split("|").join(" | ")})]}),!s?.match(/invited/)&&(0,c.jsx)(u().Fragment,{children:(0,c.jsxs)(j.A,{children:[(0,c.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:s=>{t(e),setTimeout(()=>{(0,v.PB)("target-user-popup")},200)},children:"Edit User Access"}),(0,c.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:t=>{n(!0),window.confirm("Delete this user")&&(0,f.A)("/api/deleteUserUser",{method:"post",body:{...e}},!0).then(e=>{setTimeout(()=>{n(!1)},500),window.location.reload()})},children:"Delete User"})]})})]})]})}function A({user:e,setTargetUser:t,users:s,adminUsers:a,invitedAccounts:i}){return(0,c.jsx)(u().Fragment,{children:(0,c.jsxs)("section",{className:"paper",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Users List"}),(0,c.jsxs)("div",{className:"card no-hover items-center w-full justify-between",children:[(0,c.jsxs)("div",{className:"gap-2",children:[(0,c.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden",children:(0,c.jsx)("img",{src:e.image_thumbnail,alt:"Main User Image",width:40,className:"w-full h-full object-cover"})}),(0,c.jsxs)("span",{className:"font-semibold",children:[e.first_name," ",e.last_name]})]}),(0,c.jsx)("span",{className:"text-sm font-semibold",children:"Super User (Owner)"})]}),(0,c.jsxs)("div",{className:"w-full flex-col items-stretch",children:[i&&i[0]&&(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)("h4",{className:"m-0 text-sm font-semibold text-slate-400",children:"Accounts that Invited you"}),i.map((e,s)=>(0,c.jsx)(g,{userObject:e,setTargetUser:t,paradigm:"invited"},s+1))]}),a&&a[0]&&(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)("h4",{className:"m-0 text-sm font-semibold text-slate-400",children:"Accounts you Invited"}),a.map((e,s)=>(0,c.jsx)(g,{userObject:e,setTargetUser:t},s+1))]})]})]})})}function b({invitationObject:e}){let[t,s]=u().useState(!1);return(0,c.jsxs)("div",{className:"bg-slate-100 px-4 py-2 rounded w-full justify-between relative",children:[t&&(0,c.jsx)(y.A,{width:"20px"}),(0,c.jsxs)("span",{className:"text-sm font-semibold",children:[e.first_name," ",e.last_name," (",e.email,")"]}),(0,c.jsx)("button",{className:"py-1.5 px-3 text-sm secondary",onClick:t=>{s(!0),(0,f.A)("/api/acceptUserInvitation",{method:"post",body:{...e}},!0).then(e=>{e.success&&(window.alert("Invitation Accepted!"),window.location.reload()),setTimeout(()=>{s(!1)},500)})},children:"Accept Invitation"})]},e.id)}function N(){let{user:e,databases:t,pendingInvitations:s,pendingInvitationsReceived:a,adminUsers:i,invitedAccounts:r,setTargetUser:n}=u().useContext(w),[l,d]=u().useState(!1);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,c.jsx)("h1",{className:"text-3xl m-0",children:"Users"}),(0,c.jsxs)("a",{href:`/admin/${e?.id}/users/add-user`,className:"flex items-center gap-2 whitespace-normal button",children:[(0,c.jsx)("span",{className:"symbol",children:"+"}),(0,c.jsx)("span",{children:"Add New User"})]})]}),(0,c.jsx)(h.A,{user:e})]}),(0,c.jsxs)("div",{className:"w-full grid grid-cols-1 items-start justify-start",children:[(0,c.jsx)("div",{className:"flex-col items-stretch justify-start",children:e&&n&&(0,c.jsx)(A,{setTargetUser:n,user:e,adminUsers:i,invitedAccounts:r})}),(0,c.jsxs)("div",{className:"flex-col items-stretch justify-start",children:[s&&s[0]&&(0,c.jsx)(u().Fragment,{children:(0,c.jsx)("section",{className:"p-4 items-start gap-4 overflow-visible",children:(0,c.jsxs)("div",{className:"flex-col w-full items-start",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Invitations Sent"}),s.map((e,t)=>(0,c.jsxs)("div",{className:"bg-slate-100 px-4 py-2 rounded w-full justify-between",children:[(0,c.jsx)("span",{className:"text-sm font-semibold",children:e.invited_user_email}),(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"text-sm text-slate-400",children:"Pending"}),(0,c.jsx)("span",{className:"text-sm text-orange-600 hover:opacity-50 cursor-pointer",onClick:t=>{window.confirm("Delete this invitation?")&&(0,f.A)("/api/deleteInvitation",{method:"POST",body:{id:e.id}},!0).finally(()=>{window.location.reload()})},children:"Delete Invitation"})]})]},e.id))]})})}),a&&a[0]&&(0,c.jsx)(u().Fragment,{children:(0,c.jsx)("section",{className:"p-4 items-start gap-4 overflow-visible",children:(0,c.jsxs)("div",{className:"flex-col w-full items-start",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Pending Invitations Received"}),a.map((e,t)=>(0,c.jsx)(b,{invitationObject:e},t+1))]})})})]})]})]})}var _=s(71934);let w=u().createContext({});function k({user:e,users:t,databases:s,pendingInvitations:a,pendingInvitationsReceived:i,adminUsers:r,invitedAccounts:n}){let l=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Users | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,o]=u().useState();return(0,c.jsx)(w.Provider,{value:{user:e,users:t,targetUser:d,setTargetUser:o,databases:s,pendingInvitations:a,pendingInvitationsReceived:i,adminUsers:r,invitedAccounts:n},children:(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)(m.A,{head:l,user:e,children:(0,c.jsx)(N,{})}),(0,c.jsx)(x.A,{targetUser:d||void 0,user:e,setTargetUser:o})]})})}async function S({req:e,res:t,query:s}){let a=await (0,p.default)(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let i=await (0,_.A)(`SELECT * FROM delegated_users WHERE user_id='${a.id}'`),r=await (0,_.A)(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${a.id}'`),n=await (0,_.A)(`SELECT * FROM invitations WHERE inviting_user_id='${a.id}' AND invitation_status='Pending'`),l=await (0,_.A)(`SELECT invitations.*,users.first_name,users.last_name,users.email FROM invitations JOIN users ON users.id=invitations.inviting_user_id WHERE invited_user_email='${a.email}' AND invitation_status='Pending'`),d=await (0,_.A)(`SELECT * FROM user_users WHERE user_id='${a.id}' AND user_type='admin'`),c=await (0,_.A)(`SELECT user_users.*,users.first_name AS inviteeFirstName,users.last_name AS inviteeLastName,users.email AS inviteeEmail, users.image_thumbnail AS inviteeImage FROM user_users JOIN users ON users.id=user_users.user_id WHERE user_users.email='${a.email}' AND user_users.user_type='admin'`);return{props:{user:a,users:i,databases:r,pendingInvitations:n,pendingInvitationsReceived:l,adminUsers:d,invitedAccounts:c}}}let P=(0,n.M)(a,"default"),M=(0,n.M)(a,"getStaticProps"),E=(0,n.M)(a,"getStaticPaths"),q=(0,n.M)(a,"getServerSideProps"),C=(0,n.M)(a,"config"),O=(0,n.M)(a,"reportWebVitals"),U=(0,n.M)(a,"unstable_getStaticProps"),F=(0,n.M)(a,"unstable_getStaticPaths"),I=(0,n.M)(a,"unstable_getStaticParams"),R=(0,n.M)(a,"unstable_getServerProps"),T=(0,n.M)(a,"unstable_getServerSideProps"),$=new i.PagesRouteModule({definition:{kind:r.A.PAGES,page:"/admin/[user_id]/users",pathname:"/admin/[user_id]/users",bundlePath:"",filename:""},components:{App:d.default,Document:l.default},userland:a})},91140:(e,t,s)=>{s.d(t,{Ay:()=>l,PB:()=>d,fs:()=>c});var a=s(8732),i=s(58150),r=s(82015),n=s.n(r);function l({children:e,title:t,data:s,fullPage:r,wrapperClasses:l,closePopupDispatch:d,wrapperStyle:o,noContainer:u}){return r?(0,a.jsxs)("div",{className:"popup-bg overflow-hidden "+(l||""),"data-popupid":t||null,style:o,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsx)("div",{className:"relative w-full h-full z-50","data-data":s?JSON.stringify(s):"",children:e}),(0,a.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),d&&d()},children:(0,a.jsx)(i.A,{color:"white",size:20})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]}):(0,a.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[u?(0,a.jsx)(n().Fragment,{children:e}):(0,a.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":s?JSON.stringify(s):"",children:[e,(0,a.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,a.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,a.jsx)("span",{className:"font-normal",children:"✖"})}),(0,a.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]})}function d(e,t){let s=document.querySelector(`[data-popupid='${e}']`);s&&(s.style.display="flex",t?.(s))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},55904:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(8732),i=s(82015),r=s.n(i);function n({children:e,column:t,className:s}){let i=r().useRef();return(0,a.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:i,children:e})}},23293:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9796,5392,5954],()=>s(63425));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js.nft.json index b507a3f..bb143fa 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../jsonData/userPriviledges.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../jsonData/userPriviledges.json","../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js index 08882b4..8f9ec34 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2774,e.ids=[2774],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},36885:(e,t,a)=>{let s;a.r(t),a.d(t,{config:()=>C,default:()=>P,getServerSideProps:()=>q,getStaticPaths:()=>N,getStaticProps:()=>E,reportWebVitals:()=>T,routeModule:()=>R,unstable_getServerProps:()=>D,unstable_getServerSideProps:()=>H,unstable_getStaticParams:()=>L,unstable_getStaticPaths:()=>U,unstable_getStaticProps:()=>$});var l={};a.r(l),a.d(l,{AddNewUserContext:()=>_,default:()=>S,getServerSideProps:()=>M});var r=a(63865),i=a(9455),n=a(30671),d=a(49407),o=a(89600),c=a(8732),u=a(82015),m=a.n(u),h=a(95222),p=a(20048),x=a.n(p),g=a(58548),b=a(46437),f=a(51548),y=a(63715),v=a(32415),A=a(58403);function w(e){let{databases:t,user:l,query:r}=m().useContext(_),i=a(49436),[n,d]=m().useState("invitation"),[o,u]=m().useState(!1),[h,p]=m().useState(!1),[x,w]=m().useState(["Update Entries","Delete Entries"]),[j,k]=m().useState([]),[S,M]=m().useState(t&&t[0]?t[0].db_slug:null),[P,E]=m().useState(null),[N,q]=m().useState(null),[C,T]=m().useState([]),[$,U]=m().useState([]);return(0,c.jsxs)(m().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,c.jsxs)("div",{children:[(0,c.jsx)(b.A,{}),(0,c.jsxs)("h1",{className:"text-3xl m-0",children:["Add A New User",n?.match(/database/)&&S?` To ${S}`:""]})]})}),(0,c.jsx)(g.A,{user:l})]}),(0,c.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[o&&(0,c.jsx)(v.A,{}),(0,c.jsxs)("form",{onSubmit:e=>{e.preventDefault(),u(!0);let t=Array.from(e.target),a={};t.forEach(e=>{!e.nodeName?.match(/button/i)&&e.name&&e.value?.match(/./)&&(a[e.name]=e.value)});let s={...a,db_tables:j&&j[0]?$.join("|"):"",paradigm:n};n.match(/database/i)?s.database=S:(s.database_access=j.join("|"),s.priviledge=x.join("|")),(0,y.A)("/api/addUserUser",{method:"post",body:s},!0).then(e=>{e.success?N?(N.imageName=`${S}-user-${e.newUserId}`,N.mimeType="jpeg",delete N.imageBase64Full,(0,y.A)("/api/addUserMedia",{method:"post",body:{media:[N],folder:S?.replace(/_/g,"-"),type:"image"}},!0).then(t=>{(0,y.A)("/api/updateUserUser",{method:"post",body:{id:e.newUserId,user_type:n,image:t.mediaData[0].media_url,image_thumbnail:t.mediaData[0].media_thumbnail_url}},!0).then(e=>{e.success&&(n?.match(/database/)?window.location.pathname=`/admin/${l?.id}/users/databases/${S}`:window.location.pathname=`/admin/${l?.id}/users`),setTimeout(()=>{u(!1)},500)})})):n?.match(/database/)?window.location.pathname=`/admin/${l?.id}/users/databases/${S}`:window.location.pathname=`/admin/${l?.id}/users`:setTimeout(()=>{u(!1)},500)})},className:"w-full flex flex-col items-stretch gap-4",children:[(0,c.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,c.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User Email Address"}),(0,c.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",required:!0,onInput:e=>{let t=e.target;t.value.match(/./)?(t.classList.remove("warning"),E(null)):t.classList.add("warning"),window.clearTimeout(s),s=setTimeout(()=>{(0,y.A)(`/api/checkDuplicateData?type=email&value=${t.value}&tableName=user_users&userId=${l.id}&userType=invitation`).then(e=>{e?.result?(E("Email Already Exists"),t.classList.add("warning")):(E(null),t.classList.remove("warning"))})},300)}}),(0,c.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User Priviledges"}),(0,c.jsx)(A.A,{checkBoxValues:i.map(e=>({title:e,name:e,default:!!e.match(/entries/i),onChangeHandler:t=>{x.includes(e)?w([...x.filter(t=>t!=e)]):w(t=>[...t,e])}})),smallText:!0,flexRow:!0}),(0,c.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"Databases Access"}),(0,c.jsx)("span",{className:"button outlined gray px-4 py-1 -mt-2",onClick:e=>{h?(t.forEach(e=>{setTimeout(()=>{let t=document.getElementById(e.db_slug);t?.checked&&t.click()},200)}),p(!1)):(t.forEach(e=>{setTimeout(()=>{let t=document.getElementById(e.db_slug);t?.checked||t?.click()},200)}),p(!0))},children:h?"Deselect All":"Select All"}),(0,c.jsx)(A.A,{checkBoxValues:t.map(e=>({title:e.db_name,name:e.db_slug,onChangeHandler:a=>{j.includes(e.db_slug)?k([...j.filter(t=>t!=e.db_slug)]):k(t=>[...t,e.db_slug]),j.length===t.length?p(!0):p(!1)}})),smallText:!0,flexRow:!0,name:"db-select"}),j&&j[0]&&(0,c.jsxs)(m().Fragment,{children:[(0,c.jsx)("hr",{className:"my-6"}),(0,c.jsx)("h3",{className:"m-0 text-lg font-semibold mb-2 text-slate-600",children:"Database Tables"}),(0,c.jsx)(f.A,{required:!0,selectOptions:t.filter(e=>j.includes(e.db_slug)).map(e=>({title:e.db_name,payload:e.db_slug})),name:"databases",onChangeHandler:e=>{M(e.target.value)}}),C&&C[0]&&(0,c.jsx)(A.A,{checkBoxValues:C.map(e=>({title:e.table_name,name:e.table_slug,onChangeHandler:t=>{t.target.checked?U(t=>[...t,`${S}-${e.table_slug}`]):U([...$.filter(t=>t!=`${S}-${e.table_slug}`)])},default:!!$?.includes(`${S}-${e.table_slug}`)})),smallText:!0,flexRow:!0})]})]}),(0,c.jsx)("button",{children:n?.match(/database/)?"Add User":"Invite User"})]})]})]})}var j=a(67216),k=a.n(j);let _=m().createContext({});function S({user:e,users:t,databases:a,query:s}){let l=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Users | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[r,i]=m().useState(null),[n,d]=m().useState(null);return(0,c.jsx)(h.A,{head:l,user:e,children:(0,c.jsx)(_.Provider,{value:{user:e,users:t,databases:a,query:s},children:(0,c.jsx)(w,{})})})}async function M({req:e,res:t,query:a}){let s=await x()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let l=await k()(`SELECT * FROM delegated_users WHERE user_id='${s.id}'`),r=await k()(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${s.id}'`);return{props:{user:s,users:l,databases:r,query:a}}}let P=(0,n.M)(l,"default"),E=(0,n.M)(l,"getStaticProps"),N=(0,n.M)(l,"getStaticPaths"),q=(0,n.M)(l,"getServerSideProps"),C=(0,n.M)(l,"config"),T=(0,n.M)(l,"reportWebVitals"),$=(0,n.M)(l,"unstable_getStaticProps"),U=(0,n.M)(l,"unstable_getStaticPaths"),L=(0,n.M)(l,"unstable_getStaticParams"),D=(0,n.M)(l,"unstable_getServerProps"),H=(0,n.M)(l,"unstable_getServerSideProps"),R=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/users/add-user",pathname:"/admin/[user_id]/users/add-user",bundlePath:"",filename:""},components:{App:o.default,Document:d.default},userland:l})},58403:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732);function l({name:e,checkBoxValues:t,setAlert:a,labelColor:l,flexRow:r,baseText:i,smallText:n,className:d}){return(0,s.jsx)("div",{className:"flex items-start gap-x-4"+(r?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(d||""),children:t.map((t,r)=>{let{payload:d,title:o,onChangeHandler:c,fixed:u,jsx:m}=t,h=t.name?`${e}-${t.name}`:d?e+"-"+d:e;return(0,s.jsxs)("div",{className:"flex items-center"+(t.default&&u?" pointer-events-none":"")+(n?" gap-1 ":" gap-2 ")+(t?.className?t.className:""),children:[(0,s.jsx)("input",{className:"m-0"+(n?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!t.default,name:h,id:h,onChange:e=>{a&&a(null),c&&c(e,t)},value:d,style:{minWidth:"20px"},...t.props}),m||(0,s.jsx)("label",{htmlFor:h,className:"m-0 "+(l||"text-slate-800 dark:text-white/80")+(i||n?" text-base":" text-lg"),children:o})]},r+1)})})}a(82015)},51548:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732),l=a(58526);function r({selectOptions:e,name:t,onChangeHandler:a,required:r,setAlert:i,title:n,defaultValue:d,info:o,id:c}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[n&&(0,s.jsxs)("label",{htmlFor:t,children:[n,r?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:c||t,className:"w-full bg-white",required:r,onChange:e=>{i&&i(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:d||void 0,children:e.map((e,t)=>{let{payload:a,title:l}=e;return(0,s.jsx)("option",{value:a,selected:!!e.default,children:l},t+1)})}),(0,s.jsx)(l.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,s.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,s.jsx)("span",{children:o})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}a(82015)},46437:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732),l=a(23293);function r(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(l.A,{})})}a(82015)},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},49436:e=>{e.exports=JSON.parse('["Edit Tables","Update Entries","Create Table","Delete Entries","Delete Tables"]')}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070],()=>a(36885));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2774,e.ids=[2774],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},43402:(e,t,a)=>{let s;a.r(t),a.d(t,{config:()=>N,default:()=>S,getServerSideProps:()=>E,getStaticPaths:()=>P,getStaticProps:()=>M,reportWebVitals:()=>q,routeModule:()=>D,unstable_getServerProps:()=>U,unstable_getServerSideProps:()=>L,unstable_getStaticParams:()=>$,unstable_getStaticPaths:()=>T,unstable_getStaticProps:()=>C});var l={};a.r(l),a.d(l,{AddNewUserContext:()=>j,default:()=>k,getServerSideProps:()=>_});var r=a(63865),i=a(9455),n=a(30671),d=a(5583),c=a(19796),o=a(8732),u=a(82015),m=a.n(u),h=a(25562),p=a(92702),x=a(53926),g=a(59023),f=a(80830),b=a(46169),y=a(16757),v=a(2913);function A(e){let{databases:t,user:l,query:r}=m().useContext(j),i=a(49436),[n,d]=m().useState("invitation"),[c,u]=m().useState(!1),[h,p]=m().useState(!1),[A,w]=m().useState(["Update Entries","Delete Entries"]),[k,_]=m().useState([]),[S,M]=m().useState(t&&t[0]?t[0].db_slug:null),[P,E]=m().useState(null),[N,q]=m().useState(null),[C,T]=m().useState([]),[$,U]=m().useState([]);return(0,o.jsxs)(m().Fragment,{children:[(0,o.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,o.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,o.jsxs)("div",{children:[(0,o.jsx)(g.A,{}),(0,o.jsxs)("h1",{className:"text-3xl m-0",children:["Add A New User",n?.match(/database/)&&S?` To ${S}`:""]})]})}),(0,o.jsx)(x.A,{user:l})]}),(0,o.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[c&&(0,o.jsx)(y.A,{}),(0,o.jsxs)("form",{onSubmit:e=>{e.preventDefault(),u(!0);let t=Array.from(e.target),a={};t.forEach(e=>{!e.nodeName?.match(/button/i)&&e.name&&e.value?.match(/./)&&(a[e.name]=e.value)});let s={...a,db_tables:k&&k[0]?$.join("|"):"",paradigm:n};n.match(/database/i)?s.database=S:(s.database_access=k.join("|"),s.priviledge=A.join("|")),(0,b.A)("/api/addUserUser",{method:"post",body:s},!0).then(e=>{e.success?N?(N.imageName=`${S}-user-${e.newUserId}`,N.mimeType="jpeg",delete N.imageBase64Full,(0,b.A)("/api/addUserMedia",{method:"post",body:{media:[N],folder:S?.replace(/_/g,"-"),type:"image"}},!0).then(t=>{(0,b.A)("/api/updateUserUser",{method:"post",body:{id:e.newUserId,user_type:n,image:t.mediaData[0].media_url,image_thumbnail:t.mediaData[0].media_thumbnail_url}},!0).then(e=>{e.success&&(n?.match(/database/)?window.location.pathname=`/admin/${l?.id}/users/databases/${S}`:window.location.pathname=`/admin/${l?.id}/users`),setTimeout(()=>{u(!1)},500)})})):n?.match(/database/)?window.location.pathname=`/admin/${l?.id}/users/databases/${S}`:window.location.pathname=`/admin/${l?.id}/users`:setTimeout(()=>{u(!1)},500)})},className:"w-full flex flex-col items-stretch gap-4",children:[(0,o.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,o.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User Email Address"}),(0,o.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",required:!0,onInput:e=>{let t=e.target;t.value.match(/./)?(t.classList.remove("warning"),E(null)):t.classList.add("warning"),window.clearTimeout(s),s=setTimeout(()=>{(0,b.A)(`/api/checkDuplicateData?type=email&value=${t.value}&tableName=user_users&userId=${l.id}&userType=invitation`).then(e=>{e?.result?(E("Email Already Exists"),t.classList.add("warning")):(E(null),t.classList.remove("warning"))})},300)}}),(0,o.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User Priviledges"}),(0,o.jsx)(v.A,{checkBoxValues:i.map(e=>({title:e,name:e,default:!!e.match(/entries/i),onChangeHandler:t=>{A.includes(e)?w([...A.filter(t=>t!=e)]):w(t=>[...t,e])}})),smallText:!0,flexRow:!0}),(0,o.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"Databases Access"}),(0,o.jsx)("span",{className:"button outlined gray px-4 py-1 -mt-2",onClick:e=>{h?(t.forEach(e=>{setTimeout(()=>{let t=document.getElementById(e.db_slug);t?.checked&&t.click()},200)}),p(!1)):(t.forEach(e=>{setTimeout(()=>{let t=document.getElementById(e.db_slug);t?.checked||t?.click()},200)}),p(!0))},children:h?"Deselect All":"Select All"}),(0,o.jsx)(v.A,{checkBoxValues:t.map(e=>({title:e.db_name,name:e.db_slug,onChangeHandler:a=>{k.includes(e.db_slug)?_([...k.filter(t=>t!=e.db_slug)]):_(t=>[...t,e.db_slug]),k.length===t.length?p(!0):p(!1)}})),smallText:!0,flexRow:!0,name:"db-select"}),k&&k[0]&&(0,o.jsxs)(m().Fragment,{children:[(0,o.jsx)("hr",{className:"my-6"}),(0,o.jsx)("h3",{className:"m-0 text-lg font-semibold mb-2 text-slate-600",children:"Database Tables"}),(0,o.jsx)(f.A,{required:!0,selectOptions:t.filter(e=>k.includes(e.db_slug)).map(e=>({title:e.db_name,payload:e.db_slug})),name:"databases",onChangeHandler:e=>{M(e.target.value)}}),C&&C[0]&&(0,o.jsx)(v.A,{checkBoxValues:C.map(e=>({title:e.table_name,name:e.table_slug,onChangeHandler:t=>{t.target.checked?U(t=>[...t,`${S}-${e.table_slug}`]):U([...$.filter(t=>t!=`${S}-${e.table_slug}`)])},default:!!$?.includes(`${S}-${e.table_slug}`)})),smallText:!0,flexRow:!0})]})]}),(0,o.jsx)("button",{children:n?.match(/database/)?"Add User":"Invite User"})]})]})]})}var w=a(71934);let j=m().createContext({});function k({user:e,users:t,databases:a,query:s}){let l=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"Users | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[r,i]=m().useState(null),[n,d]=m().useState(null);return(0,o.jsx)(h.A,{head:l,user:e,children:(0,o.jsx)(j.Provider,{value:{user:e,users:t,databases:a,query:s},children:(0,o.jsx)(A,{})})})}async function _({req:e,res:t,query:a}){let s=await (0,p.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let l=await (0,w.A)(`SELECT * FROM delegated_users WHERE user_id='${s.id}'`),r=await (0,w.A)(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${s.id}'`);return{props:{user:s,users:l,databases:r,query:a}}}let S=(0,n.M)(l,"default"),M=(0,n.M)(l,"getStaticProps"),P=(0,n.M)(l,"getStaticPaths"),E=(0,n.M)(l,"getServerSideProps"),N=(0,n.M)(l,"config"),q=(0,n.M)(l,"reportWebVitals"),C=(0,n.M)(l,"unstable_getStaticProps"),T=(0,n.M)(l,"unstable_getStaticPaths"),$=(0,n.M)(l,"unstable_getStaticParams"),U=(0,n.M)(l,"unstable_getServerProps"),L=(0,n.M)(l,"unstable_getServerSideProps"),D=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/users/add-user",pathname:"/admin/[user_id]/users/add-user",bundlePath:"",filename:""},components:{App:c.default,Document:d.default},userland:l})},2913:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732);function l({name:e,checkBoxValues:t,setAlert:a,labelColor:l,flexRow:r,baseText:i,smallText:n,className:d}){return(0,s.jsx)("div",{className:"flex items-start gap-x-4"+(r?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(d||""),children:t.map((t,r)=>{let{payload:d,title:c,onChangeHandler:o,fixed:u,jsx:m}=t,h=t.name?`${e}-${t.name}`:d?e+"-"+d:e;return(0,s.jsxs)("div",{className:"flex items-center"+(t.default&&u?" pointer-events-none":"")+(n?" gap-1 ":" gap-2 ")+(t?.className?t.className:""),children:[(0,s.jsx)("input",{className:"m-0"+(n?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!t.default,name:h,id:h,onChange:e=>{a&&a(null),o&&o(e,t)},value:d,style:{minWidth:"20px"},...t.props}),m||(0,s.jsx)("label",{htmlFor:h,className:"m-0 "+(l||"text-slate-800 dark:text-white/80")+(i||n?" text-base":" text-lg"),children:c})]},r+1)})})}a(82015)},80830:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732),l=a(58526);function r({selectOptions:e,name:t,onChangeHandler:a,required:r,setAlert:i,title:n,defaultValue:d,info:c,id:o}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[n&&(0,s.jsxs)("label",{htmlFor:t,children:[n,r?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:o||t,className:"w-full bg-white",required:r,onChange:e=>{i&&i(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:d||void 0,children:e.map((e,t)=>{let{payload:a,title:l}=e;return(0,s.jsx)("option",{value:a,selected:!!e.default,children:l},t+1)})}),(0,s.jsx)(l.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,s.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,s.jsx)("span",{children:c})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}a(82015)},59023:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732),l=a(23293);function r(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(l.A,{})})}a(82015)},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},49436:e=>{e.exports=JSON.parse('["Edit Tables","Update Entries","Create Table","Delete Entries","Delete Tables"]')}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392],()=>a(43402));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js.nft.json index d76df41..1b21ead 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/add-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../jsonData/userPriviledges.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../jsonData/userPriviledges.json","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js index b745ca0..8423952 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3681,e.ids=[3681],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},31702:(e,t,a)=>{a.r(t),a.d(t,{config:()=>N,default:()=>P,getServerSideProps:()=>w,getStaticPaths:()=>_,getStaticProps:()=>S,reportWebVitals:()=>q,routeModule:()=>U,unstable_getServerProps:()=>z,unstable_getServerSideProps:()=>G,unstable_getStaticParams:()=>H,unstable_getStaticPaths:()=>C,unstable_getStaticProps:()=>E});var s={};a.r(s),a.d(s,{AllDatabasesUsersContext:()=>j,default:()=>k,getServerSideProps:()=>M});var r=a(63865),l=a(9455),n=a(30671),i=a(49407),d=a(89600),c=a(8732),o=a(82015),p=a.n(o),u=a(95222),h=a(20048),x=a.n(h),m=a(84312),y=a(58548);function f({databases:e,user:t}){return(0,c.jsx)(p().Fragment,{children:(0,c.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Database Users"}),(0,c.jsx)("div",{className:"flex flex-wrap gap-6",children:e&&e[0]?e.map((e,a)=>(0,c.jsxs)("a",{href:`/admin/${t?.id}/users/databases/${e.db_slug}`,className:"border border-slate-200 border-solid rounded px-6 py-4 hover:border-primary flex items-center gap-2",children:[(0,c.jsx)("img",{src:e.db_image,className:"w-8 h-8 rounded-full object-cover",alt:""}),e.db_name]},a+1)):(0,c.jsx)("span",{children:"No Databases Yet"})})]})})}var b=a(46437);function g(e){let{databases:t,user:a}=p().useContext(j);return(0,c.jsxs)(p().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(b.A,{}),(0,c.jsx)("h1",{className:"text-3xl m-0",children:"All Databases Users"})]}),(0,c.jsxs)("a",{href:`/admin/${a?.id}/users/add-user`,className:"flex items-center gap-2 whitespace-normal button",children:[(0,c.jsx)("span",{className:"symbol",children:"+"}),(0,c.jsx)("span",{children:"Add New User"})]})]}),(0,c.jsx)(y.A,{user:a})]}),(0,c.jsx)(f,{databases:t,user:a})]})}var A=a(67216),v=a.n(A);let j=p().createContext({});function k({user:e,users:t,databases:a}){let s=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Users | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[r,l]=p().useState(null),[n,i]=p().useState(null);return(0,c.jsx)(j.Provider,{value:{user:e,users:t,targetUser:n,setTargetUser:i,databases:a},children:(0,c.jsxs)(p().Fragment,{children:[(0,c.jsx)(u.A,{head:s,user:e,children:(0,c.jsx)(g,{})}),(0,c.jsx)(m.A,{targetUser:n,user:e,setTargetUser:i})]})})}async function M({req:e,res:t,query:a}){let s=await x()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await v()(`SELECT * FROM delegated_users WHERE user_id='${s.id}'`),l=await v()(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${s.id}'`);return{props:{user:s,users:r,databases:l}}}let P=(0,n.M)(s,"default"),S=(0,n.M)(s,"getStaticProps"),_=(0,n.M)(s,"getStaticPaths"),w=(0,n.M)(s,"getServerSideProps"),N=(0,n.M)(s,"config"),q=(0,n.M)(s,"reportWebVitals"),E=(0,n.M)(s,"unstable_getStaticProps"),C=(0,n.M)(s,"unstable_getStaticPaths"),H=(0,n.M)(s,"unstable_getStaticParams"),z=(0,n.M)(s,"unstable_getServerProps"),G=(0,n.M)(s,"unstable_getServerSideProps"),U=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/users/databases",pathname:"/admin/[user_id]/users/databases",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:s})},46437:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732),r=a(23293);function l(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(r.A,{})})}a(82015)},55158:(e,t,a)=>{a.d(t,{Ay:()=>i,PB:()=>d,fs:()=>c});var s=a(8732),r=a(58150),l=a(82015),n=a.n(l);function i({children:e,title:t,data:a,fullPage:l,wrapperClasses:i,closePopupDispatch:d,wrapperStyle:o,noContainer:p}){return l?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":t||null,style:o,children:[p?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),d&&d()},children:(0,s.jsx)(r.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[p?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]})}function d(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t&&t(a))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,4312],()=>a(31702));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3681,e.ids=[3681],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},23477:(e,t,a)=>{a.r(t),a.d(t,{config:()=>_,default:()=>k,getServerSideProps:()=>S,getStaticPaths:()=>P,getStaticProps:()=>M,reportWebVitals:()=>w,routeModule:()=>z,unstable_getServerProps:()=>C,unstable_getServerSideProps:()=>H,unstable_getStaticParams:()=>E,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>N});var s={};a.r(s),a.d(s,{AllDatabasesUsersContext:()=>A,default:()=>v,getServerSideProps:()=>j});var r=a(63865),l=a(9455),n=a(30671),i=a(5583),d=a(19796),c=a(8732),o=a(82015),u=a.n(o),p=a(25562),h=a(92702),x=a(55954),m=a(53926);function y({databases:e,user:t}){return(0,c.jsx)(u().Fragment,{children:(0,c.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Database Users"}),(0,c.jsx)("div",{className:"flex flex-wrap gap-6",children:e&&e[0]?e.map((e,a)=>(0,c.jsxs)("a",{href:`/admin/${t?.id}/users/databases/${e.db_slug}`,className:"border border-slate-200 border-solid rounded px-6 py-4 hover:border-primary flex items-center gap-2",children:[(0,c.jsx)("img",{src:e.db_image,className:"w-8 h-8 rounded-full object-cover",alt:""}),e.db_name]},a+1)):(0,c.jsx)("span",{children:"No Databases Yet"})})]})})}var f=a(59023);function b(){let{databases:e,user:t}=u().useContext(A);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(f.A,{}),(0,c.jsx)("h1",{className:"text-3xl m-0",children:"All Databases Users"})]}),(0,c.jsxs)("a",{href:`/admin/${t?.id}/users/add-user`,className:"flex items-center gap-2 whitespace-normal button",children:[(0,c.jsx)("span",{className:"symbol",children:"+"}),(0,c.jsx)("span",{children:"Add New User"})]})]}),(0,c.jsx)(m.A,{user:t})]}),(0,c.jsx)(y,{databases:e,user:t})]})}var g=a(71934);let A=u().createContext({});function v({user:e,users:t,databases:a}){let s=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Users | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[r,l]=u().useState(null),[n,i]=u().useState();return(0,c.jsx)(A.Provider,{value:{user:e,users:t,targetUser:n,setTargetUser:i,databases:a},children:(0,c.jsxs)(u().Fragment,{children:[(0,c.jsx)(p.A,{head:s,user:e,children:(0,c.jsx)(b,{})}),n&&(0,c.jsx)(x.A,{targetUser:n,user:e,setTargetUser:i})]})})}async function j({req:e,res:t,query:a}){let s=await (0,h.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await (0,g.A)(`SELECT * FROM delegated_users WHERE user_id='${s.id}'`),l=await (0,g.A)(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${s.id}'`);return{props:{user:s,users:r,databases:l}}}let k=(0,n.M)(s,"default"),M=(0,n.M)(s,"getStaticProps"),P=(0,n.M)(s,"getStaticPaths"),S=(0,n.M)(s,"getServerSideProps"),_=(0,n.M)(s,"config"),w=(0,n.M)(s,"reportWebVitals"),N=(0,n.M)(s,"unstable_getStaticProps"),q=(0,n.M)(s,"unstable_getStaticPaths"),E=(0,n.M)(s,"unstable_getStaticParams"),C=(0,n.M)(s,"unstable_getServerProps"),H=(0,n.M)(s,"unstable_getServerSideProps"),z=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/users/databases",pathname:"/admin/[user_id]/users/databases",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:s})},59023:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732),r=a(23293);function l(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(r.A,{})})}a(82015)},91140:(e,t,a)=>{a.d(t,{Ay:()=>i,PB:()=>d,fs:()=>c});var s=a(8732),r=a(58150),l=a(82015),n=a.n(l);function i({children:e,title:t,data:a,fullPage:l,wrapperClasses:i,closePopupDispatch:d,wrapperStyle:o,noContainer:u}){return l?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":t||null,style:o,children:[u?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),d&&d()},children:(0,s.jsx)(r.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[u?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]})}function d(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t?.(a))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,5954],()=>a(23477));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js.nft.json index d76df41..1b21ead 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../jsonData/userPriviledges.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../jsonData/userPriviledges.json","../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js index 31b66bb..5379b41 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4397,e.ids=[4397],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},59950:(e,t,a)=>{a.r(t),a.d(t,{config:()=>S,default:()=>P,getServerSideProps:()=>M,getStaticPaths:()=>_,getStaticProps:()=>N,reportWebVitals:()=>w,routeModule:()=>H,unstable_getServerProps:()=>C,unstable_getServerSideProps:()=>U,unstable_getStaticParams:()=>$,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>E});var s={};a.r(s),a.d(s,{SingleDatabaseUsersContext:()=>j,default:()=>A,getServerSideProps:()=>k});var r=a(63865),l=a(9455),n=a(30671),i=a(49407),d=a(89600),c=a(8732),o=a(82015),u=a.n(o),p=a(95222),m=a(20048),h=a.n(m),x=a(84312),y=a(58548);a(21347);var f=a(46437);function b(e){let{database:t,users:a,user:s}=u().useContext(j);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(f.A,{}),(0,c.jsxs)("h1",{className:"text-3xl m-0",children:[t.db_name," Users"]})]}),(0,c.jsxs)("a",{href:`/admin/${s?.id}/users/add-user?db=${t.db_slug}`,className:"flex items-center gap-2 whitespace-normal button",children:[(0,c.jsx)("span",{className:"symbol",children:"+"}),(0,c.jsx)("span",{children:"Add New User"})]})]}),(0,c.jsx)(y.A,{user:s})]}),(0,c.jsx)("div",{className:"paper w-full flex-col items-stretch",children:a&&a[0]?a.map(e=>(0,c.jsxs)("a",{href:`/admin/${s?.id}/users/databases/${t.db_slug}/${e.id}`,className:"w-full flex items-center gap-2 p-4 border border-solid border-slate-200 rounded cursor-pointer hover:border-slate-400 flex-wrap",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[(0,c.jsx)("img",{src:e.image_thumbnail,alt:"",className:"w-10 h-10 rounded-full object-cover bg-slate-200"}),(0,c.jsxs)("div",{className:"flex-col items-start gap-1",children:[(0,c.jsxs)("span",{className:"font-bold",children:[e.first_name," ",e.last_name]}),(0,c.jsx)("span",{className:"text-xs text-slate-500",children:e.date_created?.substring(0,16)})]}),(0,c.jsx)("button",{className:"ml-auto outlined gray pointer-events-none",children:"Edit User"})]})):(0,c.jsx)("span",{children:"No Users for this database yet"})})]})}var g=a(67216),v=a.n(g);let j=u().createContext({});function A({user:e,users:t,database:a}){let s=`${a.db_name} Users | Datasquirel"`,r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:s}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[l,n]=u().useState(null),[i,d]=u().useState(null);return(0,c.jsx)(j.Provider,{value:{user:e,users:t,targetUser:i,setTargetUser:d,database:a},children:(0,c.jsx)(u().Fragment,{children:(0,c.jsxs)(p.A,{head:r,user:e,children:[(0,c.jsx)(b,{}),(0,c.jsx)(x.A,{targetUser:i,user:e,setTargetUser:d})]})})})}async function k({req:e,res:t,query:a}){let s=await h()(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await v()(`SELECT * FROM user_users WHERE user_id='${s.id}' AND \`database\`='${a.database}'`),l=await v()(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${s.id}' AND db_slug='${a.database}'`);return l&&l[0]?{props:{user:s,users:r,database:l[0]}}:{redirect:{destination:`/admin/${s?.id}/users`,permanent:!1}}}let P=(0,n.M)(s,"default"),N=(0,n.M)(s,"getStaticProps"),_=(0,n.M)(s,"getStaticPaths"),M=(0,n.M)(s,"getServerSideProps"),S=(0,n.M)(s,"config"),w=(0,n.M)(s,"reportWebVitals"),E=(0,n.M)(s,"unstable_getStaticProps"),q=(0,n.M)(s,"unstable_getStaticPaths"),$=(0,n.M)(s,"unstable_getStaticParams"),C=(0,n.M)(s,"unstable_getServerProps"),U=(0,n.M)(s,"unstable_getServerSideProps"),H=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/users/databases/[database]",pathname:"/admin/[user_id]/users/databases/[database]",bundlePath:"",filename:""},components:{App:d.default,Document:i.default},userland:s})},21347:(e,t,a)=>{a.d(t,{A:()=>o});var s=a(8732),r=a(82015),l=a.n(r),n=a(55158),i=a(63715),d=a(32415),c=a(62506);function o({userObject:e,setTargetUser:t,paradigm:a}){let r=a?.match(/invited/)?`${e.inviteeFirstName} ${e.inviteeLastName} (${e.inviteeEmail})`:`${e.first_name} ${e.last_name} (${e.email})`,o=a?.match(/invited/)?`${e.inviteeImage}`:`${e.image_thumbnail}`,[u,p]=l().useState(!1);return(0,s.jsxs)("div",{className:"card no-hover items-center "+(a?.match(/invited/)?" green green-bg":" primary"),children:[u&&(0,s.jsx)(d.A,{}),(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsx)("img",{src:o,className:"w-8 h-8 rounded-full object-cover bg-slate-200",onError:e=>{e.target.src="/images/user-preset-thumbnail.png"}}),(0,s.jsx)("span",{className:"text-sm font-semibold",children:r}),e?.user_priviledge?.match(/./)&&(0,s.jsxs)("span",{className:"text-sm ml-auto text-slate-900/50",children:["Priviledges:"," ",(0,s.jsx)("span",{className:"text-slate-600 font-semibold",children:e.user_priviledge.split("|").join(" | ")})]}),!a?.match(/invited/)&&(0,s.jsx)(l().Fragment,{children:(0,s.jsxs)(c.A,{children:[(0,s.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:a=>{t(e),setTimeout(()=>{(0,n.PB)("target-user-popup")},200)},children:"Edit User Access"}),(0,s.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:t=>{p(!0),window.confirm("Delete this user")&&(0,i.A)("/api/deleteUserUser",{method:"post",body:{...e}},!0).then(e=>{setTimeout(()=>{p(!1)},500),window.location.reload()})},children:"Delete User"})]})})]})]})}},46437:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732),r=a(23293);function l(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(r.A,{})})}a(82015)},55158:(e,t,a)=>{a.d(t,{Ay:()=>i,PB:()=>d,fs:()=>c});var s=a(8732),r=a(58150),l=a(82015),n=a.n(l);function i({children:e,title:t,data:a,fullPage:l,wrapperClasses:i,closePopupDispatch:d,wrapperStyle:o,noContainer:u}){return l?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(i||""),"data-popupid":t||null,style:o,children:[u?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),d&&d()},children:(0,s.jsx)(r.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[u?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),d&&d()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),d&&d()}})]})}function d(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t&&t(a))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},62506:(e,t,a)=>{a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n({children:e,column:t,className:a}){let r=l().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:r,children:e})}},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{var a;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(a||(a={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9600,7070,4312],()=>a(59950));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4397,e.ids=[4397],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},50610:(e,t,a)=>{a.r(t),a.d(t,{config:()=>S,default:()=>j,getServerSideProps:()=>P,getStaticPaths:()=>M,getStaticProps:()=>k,reportWebVitals:()=>_,routeModule:()=>$,unstable_getServerProps:()=>E,unstable_getServerSideProps:()=>C,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>w,unstable_getStaticProps:()=>N});var s={};a.r(s),a.d(s,{SingleDatabaseUsersContext:()=>g,default:()=>A,getServerSideProps:()=>v});var r=a(63865),l=a(9455),n=a(30671),d=a(5583),i=a(19796),c=a(8732),o=a(82015),u=a.n(o),p=a(25562),h=a(92702),m=a(55954),x=a(53926),y=a(59023);function f(){let{database:e,users:t,user:a}=u().useContext(g);return(0,c.jsxs)(u().Fragment,{children:[(0,c.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,c.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(y.A,{}),(0,c.jsxs)("h1",{className:"text-3xl m-0",children:[e.db_name," Users"]})]}),(0,c.jsxs)("a",{href:`/admin/${a?.id}/users/add-user?db=${e.db_slug}`,className:"flex items-center gap-2 whitespace-normal button",children:[(0,c.jsx)("span",{className:"symbol",children:"+"}),(0,c.jsx)("span",{children:"Add New User"})]})]}),(0,c.jsx)(x.A,{user:a})]}),(0,c.jsx)("div",{className:"paper w-full flex-col items-stretch",children:t&&t[0]?t.map(t=>(0,c.jsxs)("a",{href:`/admin/${a?.id}/users/databases/${e.db_slug}/${t.id}`,className:"w-full flex items-center gap-2 p-4 border border-solid border-slate-200 rounded cursor-pointer hover:border-slate-400 flex-wrap",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[(0,c.jsx)("img",{src:t.image_thumbnail,alt:"",className:"w-10 h-10 rounded-full object-cover bg-slate-200"}),(0,c.jsxs)("div",{className:"flex-col items-start gap-1",children:[(0,c.jsxs)("span",{className:"font-bold",children:[t.first_name," ",t.last_name]}),(0,c.jsx)("span",{className:"text-xs text-slate-500",children:t.date_created?.substring(0,16)})]}),(0,c.jsx)("button",{className:"ml-auto outlined gray pointer-events-none",children:"Edit User"})]})):(0,c.jsx)("span",{children:"No Users for this database yet"})})]})}var b=a(71934);let g=u().createContext({});function A({user:e,users:t,database:a}){let s=`${a.db_name} Users | Datasquirel"`,r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:s}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[l,n]=u().useState(null),[d,i]=u().useState();return(0,c.jsx)(g.Provider,{value:{user:e,users:t,targetUser:d,setTargetUser:i,database:a},children:(0,c.jsx)(u().Fragment,{children:(0,c.jsxs)(p.A,{head:r,user:e,children:[(0,c.jsx)(f,{}),(0,c.jsx)(m.A,{targetUser:d,user:e,setTargetUser:i})]})})})}async function v({req:e,res:t,query:a}){let s=await (0,h.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await (0,b.A)(`SELECT * FROM user_users WHERE user_id='${s.id}' AND \`database\`='${a.database}'`),l=await (0,b.A)(`SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id='${s.id}' AND db_slug='${a.database}'`);return l&&l[0]?{props:{user:s,users:r,database:l[0]}}:{redirect:{destination:`/admin/${s?.id}/users`,permanent:!1}}}let j=(0,n.M)(s,"default"),k=(0,n.M)(s,"getStaticProps"),M=(0,n.M)(s,"getStaticPaths"),P=(0,n.M)(s,"getServerSideProps"),S=(0,n.M)(s,"config"),_=(0,n.M)(s,"reportWebVitals"),N=(0,n.M)(s,"unstable_getStaticProps"),w=(0,n.M)(s,"unstable_getStaticPaths"),q=(0,n.M)(s,"unstable_getStaticParams"),E=(0,n.M)(s,"unstable_getServerProps"),C=(0,n.M)(s,"unstable_getServerSideProps"),$=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/users/databases/[database]",pathname:"/admin/[user_id]/users/databases/[database]",bundlePath:"",filename:""},components:{App:i.default,Document:d.default},userland:s})},59023:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(8732),r=a(23293);function l(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(r.A,{})})}a(82015)},91140:(e,t,a)=>{a.d(t,{Ay:()=>d,PB:()=>i,fs:()=>c});var s=a(8732),r=a(58150),l=a(82015),n=a.n(l);function d({children:e,title:t,data:a,fullPage:l,wrapperClasses:d,closePopupDispatch:i,wrapperStyle:o,noContainer:u}){return l?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":t||null,style:o,children:[u?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":a?JSON.stringify(a):"",children:e}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{c(),i&&i()},children:(0,s.jsx)(r.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":t||null,children:[u?(0,s.jsx)(n().Fragment,{children:e}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":a?JSON.stringify(a):"",children:[e,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),u&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{c(),i&&i()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{c(),i&&i()}})]})}function i(e,t){let a=document.querySelector(`[data-popupid='${e}']`);a&&(a.style.display="flex",t?.(a))}function c(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e?.()}},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392,5954],()=>a(50610));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js.nft.json index 892685b..6f4de7c 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../jsonData/userPriviledges.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../node_modules/core-util-is/package.json","../../../../../../../node_modules/inherits/inherits.js","../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../node_modules/inherits/package.json","../../../../../../../node_modules/isarray/index.js","../../../../../../../node_modules/isarray/package.json","../../../../../../../node_modules/mysql/index.js","../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../node_modules/mysql/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../node_modules/readable-stream/package.json","../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../node_modules/sqlstring/index.js","../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../node_modules/sqlstring/package.json","../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../node_modules/string_decoder/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1614.js","../../../../../chunks/2414.js","../../../../../chunks/2451.js","../../../../../chunks/2996.js","../../../../../chunks/3247.js","../../../../../chunks/3460.js","../../../../../chunks/3737.js","../../../../../chunks/3932.js","../../../../../chunks/4050.js","../../../../../chunks/4312.js","../../../../../chunks/4333.js","../../../../../chunks/4385.js","../../../../../chunks/45.js","../../../../../chunks/5134.js","../../../../../chunks/5212.js","../../../../../chunks/5264.js","../../../../../chunks/5421.js","../../../../../chunks/5664.js","../../../../../chunks/5674.js","../../../../../chunks/6521.js","../../../../../chunks/7070.js","../../../../../chunks/7640.js","../../../../../chunks/8540.js","../../../../../chunks/8613.js","../../../../../chunks/883.js","../../../../../chunks/8842.js","../../../../../chunks/9600.js","../../../../../chunks/9621.js","../../../../../chunks/9732.js","../../../../../chunks/9821.js","../../../../../chunks/9914.js","../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../jsonData/userPriviledges.json","../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/client-only/index.js","../../../../../../../node_modules/client-only/package.json","../../../../../../../node_modules/lodash/lodash.js","../../../../../../../node_modules/lodash/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../node_modules/next/head.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../node_modules/react-dom/index.js","../../../../../../../node_modules/react-dom/package.json","../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../node_modules/react/package.json","../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../node_modules/scheduler/index.js","../../../../../../../node_modules/scheduler/package.json","../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../package.json","../../../../../../package.json","../../../../../chunks/1251.js","../../../../../chunks/1579.js","../../../../../chunks/194.js","../../../../../chunks/2282.js","../../../../../chunks/3155.js","../../../../../chunks/3474.js","../../../../../chunks/3496.js","../../../../../chunks/3634.js","../../../../../chunks/3704.js","../../../../../chunks/3791.js","../../../../../chunks/4627.js","../../../../../chunks/5392.js","../../../../../chunks/5839.js","../../../../../chunks/5954.js","../../../../../chunks/6160.js","../../../../../chunks/6202.js","../../../../../chunks/6521.js","../../../../../chunks/6622.js","../../../../../chunks/6903.js","../../../../../chunks/725.js","../../../../../chunks/7713.js","../../../../../chunks/8704.js","../../../../../chunks/8760.js","../../../../../chunks/883.js","../../../../../chunks/9796.js","../../../../../chunks/9821.js","../../../../../chunks/9901.js","../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js index 25abf83..e79a90e 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5707,e.ids=[5707],e.modules={20684:(e,t,s)=>{s.r(t),s.d(t,{config:()=>M,default:()=>P,getServerSideProps:()=>k,getStaticPaths:()=>U,getStaticProps:()=>$,reportWebVitals:()=>q,routeModule:()=>R,unstable_getServerProps:()=>F,unstable_getServerSideProps:()=>L,unstable_getStaticParams:()=>D,unstable_getStaticPaths:()=>C,unstable_getStaticProps:()=>E});var a={};s.r(a),s.d(a,{SingleDatabaseSingleUserContext:()=>N,default:()=>S,getServerSideProps:()=>A});var r=s(63865),i=s(9455),l=s(30671),n=s(49407),d=s(89600),o=s(8732),c=s(82015),m=s.n(c),u=s(95222),p=s(20048),h=s.n(p),x=s(58548);s(21347);var g=s(46437),f=s(63715),v=s(32415);s(51548);var b=s(58403),j=s(77826);function w(e){let{singleUser:t,user:s}=m().useContext(N),a=Object.keys(t).filter(e=>!e.match(/^id$|^date_|^user_id$|^social_|^disk_usage|user_type/)),[r,i]=m().useState(!1),[l,n]=m().useState(t.user_type?.match(/invitation/)?t.user_priviledge?.split("|"):["Edit"]),[d,c]=m().useState(t.image);return(0,o.jsxs)(m().Fragment,{children:[(0,o.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,o.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(g.A,{}),(0,o.jsxs)("h1",{className:"text-3xl m-0",children:[t.first_name," ",t.last_name]})]}),(0,o.jsx)("button",{className:"bg-red-500",onClick:e=>{i(!0),window.confirm("Delete this user?")&&(0,f.A)("/api/deleteUserUser",{method:"post",body:{...t}},!0).then(e=>{e.success&&(window.location.pathname=`/admin/${s?.id}/users/databases/${t.database}`)})},children:"Delete User"})]}),(0,o.jsx)(x.A,{user:s})]}),(0,o.jsxs)("section",{children:[r&&(0,o.jsx)(v.A,{}),(0,o.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,o.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:e=>{e.preventDefault(),i(!0);let s=Array.from(e.target),a={};s.forEach(e=>{!e?.nodeName?.match(/button/i)&&e?.name&&e?.value?.match(/./)&&(e?.name?.match(/username|email/)||(a[e.name]=e.value))});let r={...a,user_type:t.user_type,id:t.id};t.user_type?.match(/invitation/i)&&(r.user_priviledge=l?.join("|")),(0,f.A)("/api/updateUserUser",{method:"post",body:r},!0).then(e=>{d?.imageBase64?(d.imageName=`${t.database}-user-${t.id}`,d.mimeType="jpeg",delete d.imageBase64Full,(0,f.A)("/api/addUserMedia",{method:"post",body:{media:[d],folder:t.database?.replace(/_/g,"-"),type:"image"}},!0).then(e=>{e&&e.mediaData&&e.mediaData[0]?.media_url?(0,f.A)("/api/updateUserUser",{method:"post",body:{id:t.id,user_type:t.user_type,image:e.mediaData[0].media_url,image_thumbnail:e.mediaData[0].media_thumbnail_url}},!0).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{i(!1)},500)}):window.location.reload()})):window.location.reload()})},children:[a.map((e,s)=>e?.match(/user_priviledge/)&&t.user_type?.match(/invitation/)?(0,o.jsx)("div",{className:"flex-col items-start w-full gap-1",children:(0,o.jsx)(b.A,{checkBoxValues:t[e]?.split("|").map(e=>({title:e,name:e,onChangeHandler:e=>{l?.includes("Edit")?n([...l.filter(e=>"Edit"!=e)]):n(e=>e?[...e,"Edit"]:[])}})),smallText:!0,flexRow:!0})},s+1):e?.match(/user_priviledge/)&&!t.user_type?.match(/invitation/)?(0,o.jsx)(m().Fragment,{},s+1):e?.match(/password|^database|email|username/)?(0,o.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,o.jsx)("label",{htmlFor:e,children:e}),(0,o.jsx)("input",{type:"text",name:e,id:e,value:t[e],placeholder:e,className:"opacity-40 pointer-events-none",onChange:e=>{e.preventDefault()}},s+1)]},s+1):e?.match(/more_user_data/)?(0,o.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,o.jsx)("label",{htmlFor:e,children:e}),(0,o.jsx)("textarea",{name:e,id:e,defaultValue:t[e]?t[e]:void 0,placeholder:e,rows:6},s+1)]},s+1):(0,o.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,o.jsx)("label",{htmlFor:e,children:e}),(0,o.jsx)("input",{type:"text",name:e,id:e,defaultValue:t[e]?t[e]:void 0,placeholder:e},s+1)]},s+1)),(0,o.jsxs)("div",{className:"border border-slate-300 dark:border-slate-600 border-solid bg-slate-100 dark:bg-slate-700 rounded p-6 flex-col items-start w-full",children:[(0,o.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"Update Image"}),(0,o.jsx)(j.A,{userImage:d,setUserImage:c})]}),(0,o.jsx)("button",{children:"Update User"})]})})]})]})}var _=s(67216),y=s.n(_);let N=m().createContext({});function S({user:e,singleUser:t}){let s=`${t.first_name} ${t.last_name} Users | Datasquirel"`,a=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:s}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,o.jsx)(u.A,{head:a,user:e,children:(0,o.jsx)(N.Provider,{value:{user:e,singleUser:t},children:(0,o.jsx)(w,{})})})}async function A({req:e,res:t,query:s}){let a=await h()(e,t);if(!a?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await y()(`SELECT id,\`database\`,database_access,first_name,last_name,email,phone,user_type,user_priviledge,username,image,image_thumbnail,city,state,country,zip_code,verification_status,more_user_data FROM user_users WHERE user_id='${a.id}' AND \`database\`='${s.database}' AND id='${s.user}'`);return r&&r[0]?{props:{user:a,singleUser:r[0]}}:{redirect:{destination:`/admin/${a?.id}/users/databases/${s.database}`,permanent:!1}}}let P=(0,l.M)(a,"default"),$=(0,l.M)(a,"getStaticProps"),U=(0,l.M)(a,"getStaticPaths"),k=(0,l.M)(a,"getServerSideProps"),M=(0,l.M)(a,"config"),q=(0,l.M)(a,"reportWebVitals"),E=(0,l.M)(a,"unstable_getStaticProps"),C=(0,l.M)(a,"unstable_getStaticPaths"),D=(0,l.M)(a,"unstable_getStaticParams"),F=(0,l.M)(a,"unstable_getServerProps"),L=(0,l.M)(a,"unstable_getServerSideProps"),R=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/users/databases/[database]/[user]",pathname:"/admin/[user_id]/users/databases/[database]/[user]",bundlePath:"",filename:""},components:{App:d.default,Document:n.default},userland:a})},21347:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(8732),r=s(82015),i=s.n(r),l=s(55158),n=s(63715),d=s(32415),o=s(62506);function c({userObject:e,setTargetUser:t,paradigm:s}){let r=s?.match(/invited/)?`${e.inviteeFirstName} ${e.inviteeLastName} (${e.inviteeEmail})`:`${e.first_name} ${e.last_name} (${e.email})`,c=s?.match(/invited/)?`${e.inviteeImage}`:`${e.image_thumbnail}`,[m,u]=i().useState(!1);return(0,a.jsxs)("div",{className:"card no-hover items-center "+(s?.match(/invited/)?" green green-bg":" primary"),children:[m&&(0,a.jsx)(d.A,{}),(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)("img",{src:c,className:"w-8 h-8 rounded-full object-cover bg-slate-200",onError:e=>{e.target.src="/images/user-preset-thumbnail.png"}}),(0,a.jsx)("span",{className:"text-sm font-semibold",children:r}),e?.user_priviledge?.match(/./)&&(0,a.jsxs)("span",{className:"text-sm ml-auto text-slate-900/50",children:["Priviledges:"," ",(0,a.jsx)("span",{className:"text-slate-600 font-semibold",children:e.user_priviledge.split("|").join(" | ")})]}),!s?.match(/invited/)&&(0,a.jsx)(i().Fragment,{children:(0,a.jsxs)(o.A,{children:[(0,a.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:s=>{t(e),setTimeout(()=>{(0,l.PB)("target-user-popup")},200)},children:"Edit User Access"}),(0,a.jsx)("button",{className:"outlined text-xs px-3 py-1",onClick:t=>{u(!0),window.confirm("Delete this user")&&(0,n.A)("/api/deleteUserUser",{method:"post",body:{...e}},!0).then(e=>{setTimeout(()=>{u(!1)},500),window.location.reload()})},children:"Delete User"})]})})]})]})}},58403:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(8732);function r({name:e,checkBoxValues:t,setAlert:s,labelColor:r,flexRow:i,baseText:l,smallText:n,className:d}){return(0,a.jsx)("div",{className:"flex items-start gap-x-4"+(i?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(d||""),children:t.map((t,i)=>{let{payload:d,title:o,onChangeHandler:c,fixed:m,jsx:u}=t,p=t.name?`${e}-${t.name}`:d?e+"-"+d:e;return(0,a.jsxs)("div",{className:"flex items-center"+(t.default&&m?" pointer-events-none":"")+(n?" gap-1 ":" gap-2 ")+(t?.className?t.className:""),children:[(0,a.jsx)("input",{className:"m-0"+(n?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!t.default,name:p,id:p,onChange:e=>{s&&s(null),c&&c(e,t)},value:d,style:{minWidth:"20px"},...t.props}),u||(0,a.jsx)("label",{htmlFor:p,className:"m-0 "+(r||"text-slate-800 dark:text-white/80")+(l||n?" text-base":" text-lg"),children:o})]},i+1)})})}s(82015)},51548:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8732),r=s(58526);function i({selectOptions:e,name:t,onChangeHandler:s,required:i,setAlert:l,title:n,defaultValue:d,info:o,id:c}){try{function m(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),s=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!s.classList.contains("hidden")){s.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&s.classList.contains("hidden"))){if(!t){s.classList.add("hidden");return}if(s.classList.contains("hidden")){s.classList.remove("hidden");return}s.classList.add("hidden")}}return(0,a.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[n&&(0,a.jsxs)("label",{htmlFor:t,children:[n,i?"":" (optional)"]}),(0,a.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,a.jsx)("select",{name:t,id:c||t,className:"w-full bg-white",required:i,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),s&&s(e)},defaultValue:d||void 0,children:e.map((e,t)=>{let{payload:s,title:r}=e;return(0,a.jsx)("option",{value:s,selected:!!e.default,children:r},t+1)})}),(0,a.jsx)(r.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,a.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:m,onMouseLeave:m,onClick:m,children:[(0,a.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,a.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,a.jsx)("span",{children:o})}),(0,a.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,a.jsx)("div",{children:"Form Select Error"})}}s(82015)},46437:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8732),r=s(23293);function i(){return(0,a.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,a.jsx)(r.A,{})})}s(82015)},62506:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(8732),r=s(82015),i=s.n(r);function l({children:e,column:t,className:s}){let r=i().useRef();return(0,a.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:r,children:e})}},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9600,7070,1614],()=>s(20684));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5707,e.ids=[5707],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},93759:(e,t,a)=>{a.r(t),a.d(t,{config:()=>N,default:()=>k,getServerSideProps:()=>S,getStaticPaths:()=>M,getStaticProps:()=>P,reportWebVitals:()=>q,routeModule:()=>F,unstable_getServerProps:()=>D,unstable_getServerSideProps:()=>$,unstable_getStaticParams:()=>C,unstable_getStaticPaths:()=>U,unstable_getStaticProps:()=>E});var s={};a.r(s),a.d(s,{SingleDatabaseSingleUserContext:()=>j,default:()=>_,getServerSideProps:()=>w});var r=a(63865),i=a(9455),l=a(30671),d=a(5583),n=a(19796),o=a(8732),c=a(82015),u=a.n(c),m=a(25562),p=a(92702),h=a(53926),x=a(59023),f=a(46169),g=a(16757),y=a(2913),b=a(20136);function v(){let{singleUser:e,user:t}=u().useContext(j),a=Object.keys(e).filter(e=>!e.match(/^id$|^date_|^user_id$|^social_|^disk_usage|user_type/)),[s,r]=u().useState(!1),[i,l]=u().useState(e.user_type?.match(/invitation/)?e.user_priviledge?.split("|"):["Edit"]),[d,n]=u().useState(e.image);return(0,o.jsxs)(u().Fragment,{children:[(0,o.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,o.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(x.A,{}),(0,o.jsxs)("h1",{className:"text-3xl m-0",children:[e.first_name," ",e.last_name]})]}),(0,o.jsx)("button",{className:"bg-red-500",onClick:a=>{r(!0),window.confirm("Delete this user?")&&(0,f.A)("/api/deleteUserUser",{method:"post",body:{...e}},!0).then(a=>{a.success&&(window.location.pathname=`/admin/${t?.id}/users/databases/${e.database}`)})},children:"Delete User"})]}),(0,o.jsx)(h.A,{user:t})]}),(0,o.jsxs)("section",{children:[s&&(0,o.jsx)(g.A,{}),(0,o.jsx)("div",{className:"w-full flex-col items-stretch",children:(0,o.jsxs)("form",{className:"flex flex-col items-stretch gap-4",onSubmit:t=>{t.preventDefault(),r(!0);let a=Array.from(t.target),s={};a.forEach(e=>{!e?.nodeName?.match(/button/i)&&e?.name&&e?.value?.match(/./)&&(e?.name?.match(/username|email/)||(s[e.name]=e.value))});let l={...s,user_type:e.user_type,id:e.id};e.user_type?.match(/invitation/i)&&(l.user_priviledge=i?.join("|")),(0,f.A)("/api/updateUserUser",{method:"post",body:l},!0).then(t=>{"object"==typeof d&&d?.imageBase64?(d.imageName=`${e.database}-user-${e.id}`,d.mimeType="jpeg",delete d.imageBase64Full,(0,f.A)("/api/addUserMedia",{method:"post",body:{media:[d],folder:e.database?.replace(/_/g,"-"),type:"image"}},!0).then(t=>{t&&t.mediaData&&t.mediaData[0]?.media_url?(0,f.A)("/api/updateUserUser",{method:"post",body:{id:e.id,user_type:e.user_type,image:t.mediaData[0].media_url,image_thumbnail:t.mediaData[0].media_thumbnail_url}},!0).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{r(!1)},500)}):window.location.reload()})):window.location.reload()})},children:[a.map((t,a)=>t?.match(/user_priviledge/)&&e.user_type?.match(/invitation/)?(0,o.jsx)("div",{className:"flex-col items-start w-full gap-1",children:(0,o.jsx)(y.A,{checkBoxValues:e[t]?.split("|").map(e=>({title:e,name:e,onChangeHandler:()=>{i?.includes("Edit")?l([...i.filter(e=>"Edit"!=e)]):l(e=>e?[...e,"Edit"]:[])}})),smallText:!0,flexRow:!0})},a+1):t?.match(/user_priviledge/)&&!e.user_type?.match(/invitation/)?(0,o.jsx)(u().Fragment,{},a+1):t?.match(/password|^database|email|username/)?(0,o.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,o.jsx)("label",{htmlFor:t,children:t}),(0,o.jsx)("input",{type:"text",name:t,id:t,value:e[t],placeholder:t,className:"opacity-40 pointer-events-none",onChange:e=>{e.preventDefault()}},a+1)]},a+1):t?.match(/more_user_data/)?(0,o.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,o.jsx)("label",{htmlFor:t,children:t}),(0,o.jsx)("textarea",{name:t,id:t,defaultValue:e[t]?e[t]:void 0,placeholder:t,rows:6},a+1)]},a+1):(0,o.jsxs)("div",{className:"flex-col items-start w-full gap-1",children:[(0,o.jsx)("label",{htmlFor:t,children:t}),(0,o.jsx)("input",{type:"text",name:t,id:t,defaultValue:e[t]?e[t]:void 0,placeholder:t},a+1)]},a+1)),(0,o.jsxs)("div",{className:"border border-slate-300 dark:border-slate-600 border-solid bg-slate-100 dark:bg-slate-700 rounded p-6 flex-col items-start w-full",children:[(0,o.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"Update Image"}),d&&n&&(0,o.jsx)(b.A,{userImage:d,setUserImage:n})]}),(0,o.jsx)("button",{children:"Update User"})]})})]})]})}var A=a(71934);let j=u().createContext({});function _({user:e,singleUser:t}){let a=`${t.first_name} ${t.last_name} Users | Datasquirel"`,s=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:a}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,o.jsx)(m.A,{head:s,user:e,children:(0,o.jsx)(j.Provider,{value:{user:e,singleUser:t},children:(0,o.jsx)(v,{})})})}async function w({req:e,res:t,query:a}){let s=await (0,p.default)(e,t);if(!s?.logged_in_status)return{redirect:{destination:"/logout",permanent:!1}};let r=await (0,A.A)(`SELECT id,\`database\`,database_access,first_name,last_name,email,phone,user_type,user_priviledge,username,image,image_thumbnail,city,state,country,zip_code,verification_status,more_user_data FROM user_users WHERE user_id='${s.id}' AND \`database\`='${a.database}' AND id='${a.user}'`);return r&&r[0]?{props:{user:s,singleUser:r[0]}}:{redirect:{destination:`/admin/${s?.id}/users/databases/${a.database}`,permanent:!1}}}let k=(0,l.M)(s,"default"),P=(0,l.M)(s,"getStaticProps"),M=(0,l.M)(s,"getStaticPaths"),S=(0,l.M)(s,"getServerSideProps"),N=(0,l.M)(s,"config"),q=(0,l.M)(s,"reportWebVitals"),E=(0,l.M)(s,"unstable_getStaticProps"),U=(0,l.M)(s,"unstable_getStaticPaths"),C=(0,l.M)(s,"unstable_getStaticParams"),D=(0,l.M)(s,"unstable_getServerProps"),$=(0,l.M)(s,"unstable_getServerSideProps"),F=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/users/databases/[database]/[user]",pathname:"/admin/[user_id]/users/databases/[database]/[user]",bundlePath:"",filename:""},components:{App:n.default,Document:d.default},userland:s})},20136:(e,t,a)=>{a.d(t,{A:()=>d});var s=a(8732),r=a(82015),i=a.n(r),l=a(65842);function d({user:e,userImage:t,setUserImage:a,database:r,className:d}){let n=i().useRef();return(0,s.jsxs)("div",{className:"card no-hover col"+(d?" "+d:""),children:[(0,s.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,s.jsx)("img",{src:t?"string"==typeof t?t:t.imageBase64Full:"/images/user-preset.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:n,"data-imagepreview":"image"})}),(0,s.jsxs)("div",{className:"w-full flex-col image-selector-wrapper",children:[(0,s.jsx)("div",{className:"button outlined secondary w-full whitespace-normal",onClick:e=>{e.target.closest(".image-selector-wrapper").querySelector("input").click()},children:"Upload Image"}),(0,s.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{let t=e.target.files?.[0];if(t){let e=await (0,l.A)({imageInputFile:t,maxWidth:400});a?.(e)}else window.alert("No File Provided!")}})]})]})}},2913:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(8732);function r({name:e,checkBoxValues:t,setAlert:a,labelColor:r,flexRow:i,baseText:l,smallText:d,className:n}){return(0,s.jsx)("div",{className:"flex items-start gap-x-4"+(i?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(n||""),children:t.map((t,i)=>{let{payload:n,title:o,onChangeHandler:c,fixed:u,jsx:m}=t,p=t.name?`${e}-${t.name}`:n?e+"-"+n:e;return(0,s.jsxs)("div",{className:"flex items-center"+(t.default&&u?" pointer-events-none":"")+(d?" gap-1 ":" gap-2 ")+(t?.className?t.className:""),children:[(0,s.jsx)("input",{className:"m-0"+(d?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!t.default,name:p,id:p,onChange:e=>{a&&a(null),c&&c(e,t)},value:n,style:{minWidth:"20px"},...t.props}),m||(0,s.jsx)("label",{htmlFor:p,className:"m-0 "+(r||"text-slate-800 dark:text-white/80")+(l||d?" text-base":" text-lg"),children:o})]},i+1)})})}a(82015)},59023:(e,t,a)=>{a.d(t,{A:()=>i});var s=a(8732),r=a(23293);function i(){return(0,s.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,s.jsx)(r.A,{})})}a(82015)},65842:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(76102);let r=a.n(s)().media.imageInputFileToBase64},23293:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[883,9821,9796,5392],()=>a(93759));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js.nft.json b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js.nft.json index a99b2f0..7072332 100644 --- a/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js.nft.json +++ b/dsql-app/.local_dist/server/pages/admin/[user_id]/users/databases/[database]/[user].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../../../node_modules/core-util-is/package.json","../../../../../../../../node_modules/inherits/inherits.js","../../../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../../../node_modules/inherits/package.json","../../../../../../../../node_modules/isarray/index.js","../../../../../../../../node_modules/isarray/package.json","../../../../../../../../node_modules/mysql/index.js","../../../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/mysql/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/process-nextick-args/index.js","../../../../../../../../node_modules/process-nextick-args/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/readable-stream/package.json","../../../../../../../../node_modules/readable-stream/readable.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/serverless-mysql/index.js","../../../../../../../../node_modules/serverless-mysql/package.json","../../../../../../../../node_modules/sqlstring/index.js","../../../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../../../node_modules/sqlstring/package.json","../../../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../../../node_modules/string_decoder/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../node_modules/util-deprecate/node.js","../../../../../../../../node_modules/util-deprecate/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1614.js","../../../../../../chunks/2414.js","../../../../../../chunks/2451.js","../../../../../../chunks/2996.js","../../../../../../chunks/3247.js","../../../../../../chunks/3460.js","../../../../../../chunks/3737.js","../../../../../../chunks/3932.js","../../../../../../chunks/4050.js","../../../../../../chunks/4312.js","../../../../../../chunks/4333.js","../../../../../../chunks/4385.js","../../../../../../chunks/45.js","../../../../../../chunks/5134.js","../../../../../../chunks/5212.js","../../../../../../chunks/5264.js","../../../../../../chunks/5421.js","../../../../../../chunks/5664.js","../../../../../../chunks/5674.js","../../../../../../chunks/6521.js","../../../../../../chunks/7070.js","../../../../../../chunks/7640.js","../../../../../../chunks/8540.js","../../../../../../chunks/8613.js","../../../../../../chunks/883.js","../../../../../../chunks/8842.js","../../../../../../chunks/9600.js","../../../../../../chunks/9621.js","../../../../../../chunks/9732.js","../../../../../../chunks/9821.js","../../../../../../chunks/9914.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../node_modules/client-only/index.js","../../../../../../../../node_modules/client-only/package.json","../../../../../../../../node_modules/lodash/lodash.js","../../../../../../../../node_modules/lodash/package.json","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../../../node_modules/next/head.js","../../../../../../../../node_modules/next/package.json","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../../../node_modules/react-dom/index.js","../../../../../../../../node_modules/react-dom/package.json","../../../../../../../../node_modules/react-dom/server.browser.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../../../node_modules/react/index.js","../../../../../../../../node_modules/react/jsx-runtime.js","../../../../../../../../node_modules/react/package.json","../../../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../../../node_modules/scheduler/index.js","../../../../../../../../node_modules/scheduler/package.json","../../../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../../../node_modules/styled-jsx/index.js","../../../../../../../../node_modules/styled-jsx/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1251.js","../../../../../../chunks/1579.js","../../../../../../chunks/194.js","../../../../../../chunks/2282.js","../../../../../../chunks/3155.js","../../../../../../chunks/3474.js","../../../../../../chunks/3496.js","../../../../../../chunks/3634.js","../../../../../../chunks/3704.js","../../../../../../chunks/3791.js","../../../../../../chunks/4627.js","../../../../../../chunks/5392.js","../../../../../../chunks/5839.js","../../../../../../chunks/5954.js","../../../../../../chunks/6160.js","../../../../../../chunks/6202.js","../../../../../../chunks/6521.js","../../../../../../chunks/6622.js","../../../../../../chunks/6903.js","../../../../../../chunks/725.js","../../../../../../chunks/7713.js","../../../../../../chunks/8704.js","../../../../../../chunks/8760.js","../../../../../../chunks/883.js","../../../../../../chunks/9796.js","../../../../../../chunks/9821.js","../../../../../../chunks/9901.js","../../../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js b/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js index 935d070..9c95a25 100644 --- a/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js +++ b/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8935,e.ids=[8935],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},27118:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>v,routeModule:()=>N});var s={};t.r(s),t.d(s,{default:()=>g});var i=t(89947),a=t(2706),n=t(96762),l=t(6420),o=t.n(l),u=t(48225),d=t.n(u),_=t(27825),c=t.n(_),p=t(51348),m=t.n(p),E=t(47670),f=t.n(E);async function g(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await o()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=c().cloneDeep(e.body),i=s.inviting_user_id,a=s.invited_user_email,n=s.database_access,l=s.priviledge;try{let e=await m()("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[i,t.id,t.email]);if(e&&e[0])return r.json({success:!1});let s=await f()({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:i,invited_user_id:t.id,database_access:n,user_priviledge:l,user_type:"admin",first_name:t.first_name,last_name:t.last_name,email:t.email,username:t.first_name,image:t.image,image_thumbnail:t.image_thumbnail}});await m()("UPDATE invitations SET invitation_status='Accepted' WHERE inviting_user_id=? AND invited_user_email=?",[i,a]);let o=await m()("SELECT db_tables_data FROM invitations WHERE inviting_user_id=?",[i]);if(await m()(`DELETE FROM delegated_user_tables WHERE root_user_id='${i}' AND delegated_user_id='${t.id}'`),o&&o[0]){let e=o[0].db_tables_data.split("|");for(let r=0;r{t(81630);let s=t(51348),i=t(72835),a=t(29021),n=t(31341);async function l(e,r,t,l){let{keyCookieName:o,csrfCookieName:u}=n();if(!e.cookies?.[o]?.match(/./))return null;let d=i({encryptedString:e.cookies[o]});if(!d)return null;let _=JSON.parse(d);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${c}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=l},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),a&&(n+=`${a}_`),n+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=s;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:o+=i}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:i}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:i,req:a}){let n=new Date,l=(()=>{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],i=t||s||r||a.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8935,e.ids=[8935],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},34042:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>m,routeModule:()=>E});var s={};t.r(s),t.d(s,{default:()=>p});var i=t(89947),a=t(2706),n=t(96762),l=t(69842),u=t(67619),o=t(27825),d=t.n(o),_=t(48786),c=t(98e3);async function p(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,l.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=d().cloneDeep(e.body),i=s.inviting_user_id,a=s.invited_user_email,n=s.database_access,o=s.priviledge;try{let e=await (0,_.A)("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[i,t.id,t.email]);if(e&&e[0])return r.json({success:!1});let s=await (0,c.A)({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:i,invited_user_id:t.id,database_access:n,user_priviledge:o,user_type:"admin",first_name:t.first_name,last_name:t.last_name,email:t.email,username:t.first_name,image:t.image,image_thumbnail:t.image_thumbnail}});await (0,_.A)("UPDATE invitations SET invitation_status='Accepted' WHERE inviting_user_id=? AND invited_user_email=?",[i,a]);let l=await (0,_.A)("SELECT db_tables_data FROM invitations WHERE inviting_user_id=?",[i]);if(await (0,_.A)(`DELETE FROM delegated_user_tables WHERE root_user_id='${i}' AND delegated_user_id='${t.id}'`),l&&l[0]){let e=l[0].db_tables_data.split("|");for(let r=0;r{t.d(r,{A:()=>u});var s=t(48786),i=t(95969),a=t(29021),n=t.n(a),l=t(89159);async function u(e,r,t){let{keyCookieName:a,csrfCookieName:u}=(0,l.A)();if(!e.cookies?.[a]?.match(/./))return null;let o=(0,i.A)({encryptedString:e.cookies[a]});if(!o)return null;let d=JSON.parse(o);if(!d.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(d.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n().existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),a&&(n+=`${a}_`),n+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),a&&(u+=`${a}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:u+=i}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(29021),i=t.n(s);async function a({user:e,message:r,component:t,noMail:s,req:a}){let n=new Date,l=(()=>{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],i=t||s||r||a.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(i+=` -URL: ${a.url}`),a?.body&&(i+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(i+=` -IP: ${l}`),i+=` +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(s+=` +IP: ${l}`),s+=` Date: ${n.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let o=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",i),s.appendFileSync("./.tmp/error.log",` +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let u=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",s),i().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:i}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=i("aes-192-cbc",s(n,l,o),a.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050],()=>t(27118));module.exports=s})(); \ No newline at end of file +${u}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511),i=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,s.scryptSync)(a,n,l),o=i.Buffer.alloc(16,0),d=(0,s.createDecipheriv)("aes-192-cbc",u,o);try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[1251],()=>t(34042));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js.nft.json b/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js.nft.json index 8310cb4..bfa9f7e 100644 --- a/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/acceptUserInvitation.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js b/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js index 8b45002..e8d9f96 100644 --- a/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js +++ b/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=9785,e.ids=[9785],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},81764:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>c,routeModule:()=>p});var s={};t.r(s),t.d(s,{default:()=>_});var i=t(89947),a=t(2706),n=t(96762),l=t(6420),o=t.n(l),d=t(44767),u=t.n(d);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await o()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});console.log("Invitation Received by current logged in user, Loggin in VIA API ...");let s=await u()({query:e.body.query,user:t});r.json({success:!0,result:s})}let c=(0,n.M)(s,"default"),m=(0,n.M)(s,"config"),p=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/addAdminUserUser",pathname:"/api/addAdminUserUser",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),i=t(72835),a=t(29021),n=t(31341);async function l(e,r,t,l){let{keyCookieName:o,csrfCookieName:d}=n();if(!e.cookies?.[o]?.match(/./))return null;let u=i({encryptedString:e.cookies[o]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${c}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=l},44767:(e,r,t)=>{let s=t(48225),i=t(51348),a=t(47670),n=t(44900);e.exports=async function({query:e,user:r,useLocal:t}){try{let s=t?n:i,{invite:l,database_access:o,priviledge:d,email:u}=e,_=[l,u],c=await s("SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",_);if(!c||!c[0])throw Error("No Invitation Found");let m=[l],p=await s("SELECT first_name,last_name,email FROM users WHERE id=?",m);if(p?.[0]){let e=await s("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[l,r.id,u]);if(e?.[0])console.log("User already added");else{a({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:l,invited_user_id:r.id,database_access:o,first_name:r.first_name,last_name:r.last_name,phone:r.phone,email:r.email,username:r.username,user_type:"admin",user_priviledge:d,image:r.image,image_thumbnail:r.image_thumbnail},useLocal:t});let e=await s("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[l,u]);if(await s("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[l,r.id]),e&&e[0]){let s=e[0].db_tables_data.split("|");for(let e=0;e{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),a&&(n+=`${a}_`),n+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=s;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:o+=i}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:i}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:i,req:a}){let n=new Date,l=(()=>{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],i=t||s||r||a.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=9785,e.ids=[9785],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},92145:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>u,routeModule:()=>c});var i={};t.r(i),t.d(i,{default:()=>o});var s=t(89947),a=t(2706),n=t(96762),l=t(69842),d=t(49941);async function o(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,l.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});console.log("Invitation Received by current logged in user, Loggin in VIA API ...");let i=await (0,d.A)({query:e.body.query,user:t});r.json({success:!0,result:i})}let u=(0,n.M)(i,"default"),_=(0,n.M)(i,"config"),c=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/addAdminUserUser",pathname:"/api/addAdminUserUser",bundlePath:"",filename:""},userland:i})},69842:(e,r,t)=>{t.d(r,{A:()=>d});var i=t(48786),s=t(95969),a=t(29021),n=t.n(a),l=t(89159);async function d(e,r,t){let{keyCookieName:a,csrfCookieName:d}=(0,l.A)();if(!e.cookies?.[a]?.match(/./))return null;let o=(0,s.A)({encryptedString:e.cookies[a]});if(!o)return null;let u=JSON.parse(o);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n().existsSync(`${_}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,i.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},49941:(e,r,t)=>{t.d(r,{A:()=>l});var i=t(67619),s=t(48786),a=t(98e3),n=t(7971);async function l({query:e,user:r,useLocal:t}){try{let i=t?n.A:s.A,{invite:l,database_access:d,priviledge:o,email:u}=e,_=[l,u],c=await i("SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",_);if(!c||!c[0])throw Error("No Invitation Found");let m=[l],E=await i("SELECT first_name,last_name,email FROM users WHERE id=?",m);if(E?.[0]){let e=await i("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[l,r.id,u]);if(e?.[0])console.log("User already added");else{(0,a.A)({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:l,invited_user_id:r.id,database_access:d,first_name:r.first_name,last_name:r.last_name,phone:r.phone,email:r.email,username:r.username,user_type:"admin",user_priviledge:o,image:r.image,image_thumbnail:r.image_thumbnail},useLocal:t});let e=await i("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[l,u]);if(await i("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[l,r.id]),e&&e[0]){let i=e[0].db_tables_data.split("|");for(let e=0;e{t.d(r,{A:()=>i});function i(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",i=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),a&&(n+=`${a}_`),n+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=i;let d=r;return e?.userId&&(d+=`user_${e.userId}_`),a&&(d+=`${a}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:d+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var i=t(29021),s=t.n(i);async function a({user:e,message:r,component:t,noMail:i,req:a}){let n=new Date,l=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],r=a.headers["x-real-ip"],t=a.headers["cf-connecting-ip"],i=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||i||r||a.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${a.url}`),a?.body&&(i+=` Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(i+=` IP: ${l}`),i+=` Date: ${n.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let o=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",i),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let d=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",i),s().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:i}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=i("aes-192-cbc",s(n,l,o),a.alloc(16,0));try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050],()=>t(81764));module.exports=s})(); \ No newline at end of file +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var i=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=(0,i.scryptSync)(a,n,l),o=s.Buffer.alloc(16,0),u=(0,i.createDecipheriv)("aes-192-cbc",d,o);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),i=r.X(0,[1251],()=>t(92145));module.exports=i})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js.nft.json index 8310cb4..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addAdminUserUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addApiKey.js b/dsql-app/.local_dist/server/pages/api/addApiKey.js index f5a68d0..a1a109a 100644 --- a/dsql-app/.local_dist/server/pages/api/addApiKey.js +++ b/dsql-app/.local_dist/server/pages/api/addApiKey.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=1385,e.ids=[1385],e.modules={47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},87256:(e,r,t)=>{t.r(r),t.d(r,{config:()=>h,default:()=>y,routeModule:()=>v});var s={};t.r(s),t.d(s,{default:()=>g});var n=t(89947),a=t(2706),i=t(96762),o=t(20503),l=t.n(o),u=t(48225),c=t.n(u),d=t(6420),p=t.n(d),_=t(47670),f=t.n(_);let m=t(29021);t(33873);let{execSync:S}=t(79646),E=t(47795);async function g(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await p()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{api_key_name:s,api_key_slug:n,api_key_scope:a,target_database:i,target_table:o}=e.body;if(!s?.match(/./)||!n?.match(/./)||!a?.match(/./))return r.json({success:!1,msg:"Wrong Input"});try{let e=process.env.DSQL_API_KEYS_PATH;if(!e)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");m.existsSync(e)||m.mkdirSync(e,{recursive:!0});let u=E.generate({length:24,numbers:!0,uppercase:!0,lowercase:!0,symbols:"-"})+"-"+Date.now(),c={user_id:t.id,date_code:Date.now(),sign:u,target_database:i,target_table:o};"fullAccess"==a&&(c={...c,full_access:!0});let d=l()({data:JSON.stringify(c)});if(!d)return r.json({success:!1,msg:"Couldn't encrypt API key"});let p=l()({data:d}),_={dbFullName:"datasquirel",tableName:"api_keys",data:{user_id:t.id,name:s,slug:n,key:p,scope:a}};u&&(_.data.csrf=u);let S=await f()(_);if(!S.insertId)throw Error(S?.error||"Api Key Couldn't be added");m.writeFileSync(`${e}/${u}`,JSON.stringify(c),"utf-8"),r.json({success:!0})}catch(e){c()({component:"/api/addApiKey/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!"})}}let y=(0,i.M)(s,"default"),h=(0,i.M)(s,"config"),v=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/addApiKey",pathname:"/api/addApiKey",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),i=t(31341);async function o(e,r,t,o){let{keyCookieName:l,csrfCookieName:u}=i();if(!e.cookies?.[l]?.match(/./))return null;let c=n({encryptedString:e.cookies[l]});if(!c)return null;let d=JSON.parse(c);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${p}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=n}}},48225:(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 i=new Date,o=(()=>{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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=1385,e.ids=[1385],e.modules={47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},15420:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>S,routeModule:()=>E});var s={};t.r(s),t.d(s,{default:()=>m});var n=t(89947),a=t(2706),i=t(96762),o=t(29021),l=t.n(o),u=t(47795),c=t.n(u),d=t(68829),_=t(67619),p=t(69842),f=t(98e3);async function m(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,p.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{api_key_name:s,api_key_slug:n,api_key_scope:a,target_database:i,target_table:o}=e.body;if(!s?.match(/./)||!n?.match(/./)||!a?.match(/./))return r.json({success:!1,msg:"Wrong Input"});try{let e=process.env.DSQL_API_KEYS_PATH;if(!e)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");l().existsSync(e)||l().mkdirSync(e,{recursive:!0});let u=c().generate({length:24,numbers:!0,uppercase:!0,lowercase:!0,symbols:"-"})+"-"+Date.now(),_={user_id:t.id,date_code:Date.now(),sign:u,target_database:i,target_table:o};"fullAccess"==a&&(_={..._,full_access:!0});let p=(0,d.default)({data:JSON.stringify(_)});if(!p)return r.json({success:!1,msg:"Couldn't encrypt API key"});let m=(0,d.default)({data:p}),S={dbFullName:"datasquirel",tableName:"api_keys",data:{user_id:t.id,name:s,slug:n,key:m,scope:a}};u&&(S.data.csrf=u);let y=await (0,f.A)(S);if(!y.insertId)throw Error(y?.error||"Api Key Couldn't be added");l().writeFileSync(`${e}/${u}`,JSON.stringify(_),"utf-8"),r.json({success:!0})}catch(e){(0,_.default)({component:"/api/addApiKey/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!"})}}let S=(0,i.M)(s,"default"),y=(0,i.M)(s,"config"),E=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/addApiKey",pathname:"/api/addApiKey",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(48786),n=t(95969),a=t(29021),i=t.n(a),o=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,n.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=n}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(29021),n=t.n(s);async function a({user:e,message:r,component:t,noMail:s,req:a}){let i=new Date,o=(()=>{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 s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(n+=` -IP: ${o}`),n+=` +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(s+=` +IP: ${o}`),s+=` Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",s(i,o,l),a.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050],()=>t(87256));module.exports=s})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511),n=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,s.scryptSync)(a,i,o),u=n.Buffer.alloc(16,0),c=(0,s.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[1251],()=>t(15420));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addApiKey.js.nft.json b/dsql-app/.local_dist/server/pages/api/addApiKey.js.nft.json index 392dc95..57ea9d2 100644 --- a/dsql-app/.local_dist/server/pages/api/addApiKey.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addApiKey.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/generate-password/main.js","../../../../node_modules/generate-password/package.json","../../../../node_modules/generate-password/src/generate.js","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/generate-password/main.js","../../../../node_modules/generate-password/package.json","../../../../node_modules/generate-password/src/generate.js","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addDbUser.js b/dsql-app/.local_dist/server/pages/api/addDbUser.js index 1cb971b..248133b 100644 --- a/dsql-app/.local_dist/server/pages/api/addDbUser.js +++ b/dsql-app/.local_dist/server/pages/api/addDbUser.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9187,e.ids=[9187],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},49915:(e,r,s)=>{s.r(r),s.d(r,{config:()=>m,default:()=>f,routeModule:()=>E});var t={};s.r(t),s.d(t,{default:()=>p});var a=s(89947),i=s(2706),n=s(96762),o=s(14533),l=s.n(o),u=s(6420),d=s.n(u),c=s(47670),_=s.n(c);async function p(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await d()(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{payload:s,dbFullName:t,dbId:a}=e.body,i=await _()({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:t,tableName:"users",data:(()=>{let e=Object.keys(s),r={};return e.forEach(e=>{e?.match(/paradigm|priviledge|database_access|databases|confirm/)||(r[e]=s[e])}),r.password=l()({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:s.password}),r.email=s.email_address,r.image="/images/user-preset.png",r.image_thumbnail="/images/user-preset-thumbnail.png",delete r.email_address,r})()});r.json({success:!!i?.insertId,msg:"New User User Added",newUserId:i.insertId})}let f=(0,n.M)(t,"default"),m=(0,n.M)(t,"config"),E=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/addDbUser",pathname:"/api/addDbUser",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),a=s(72835),i=s(29021),n=s(31341);async function o(e,r,s,o){let{keyCookieName:l,csrfCookieName:u}=n();if(!e.cookies?.[l]?.match(/./))return null;let d=a({encryptedString:e.cookies[l]});if(!d)return null;let c=JSON.parse(d);if(!c.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!i.existsSync(`${_}/${c.csrf_k}`))return null;if(0==c.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=s;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:n,csrfCookieName:o,oneTimeCodeName:l+=a}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:a}=s(55511),{Buffer:i}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=a("aes-192-cbc",t(n,o,l),i.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},14533:(e,r,s)=>{let{createHmac:t}=s(55511);e.exports=function({password:e,encryptionKey:r}){let s=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!s?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=t("sha512",s);return a.update(e),a.digest("base64")}}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[4050],()=>s(49915));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9187,e.ids=[9187],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},3931:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>c,routeModule:()=>p});var t={};s.r(t),s.d(t,{default:()=>l});var a=s(89947),i=s(2706),n=s(96762),o=s(83919),d=s(69842),u=s(98e3);async function l(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await (0,d.A)(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{payload:s,dbFullName:t,dbId:a}=e.body,i=await (0,u.A)({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:t,tableName:"users",data:(()=>{let e=Object.keys(s),r={};return e.forEach(e=>{e?.match(/paradigm|priviledge|database_access|databases|confirm/)||(r[e]=s[e])}),r.password=(0,o.A)({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:s.password}),r.email=s.email_address,r.image="/images/user-preset.png",r.image_thumbnail="/images/user-preset-thumbnail.png",delete r.email_address,r})()});r.json({success:!!i?.insertId,msg:"New User User Added",newUserId:i.insertId})}let c=(0,n.M)(t,"default"),_=(0,n.M)(t,"config"),p=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/addDbUser",pathname:"/api/addDbUser",bundlePath:"",filename:""},userland:t})},69842:(e,r,s)=>{s.d(r,{A:()=>d});var t=s(48786),a=s(95969),i=s(29021),n=s.n(i),o=s(89159);async function d(e,r,s){let{keyCookieName:i,csrfCookieName:d}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let u=(0,a.A)({encryptedString:e.cookies[i]});if(!u)return null;let l=JSON.parse(u);if(!l.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!n().existsSync(`${c}/${l.csrf_k}`))return null;if(0==l.verification_status&&!s){let e=await (0,t.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,s)=>{s.d(r,{A:()=>t});function t(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=s;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let d=r;return e?.userId&&(d+=`user_${e.userId}_`),i&&(d+=`${i}_`),{keyCookieName:n,csrfCookieName:o,oneTimeCodeName:d+=a}}},95969:(e,r,s)=>{s.d(r,{A:()=>i});var t=s(55511),a=s(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:s}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=s||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=(0,t.scryptSync)(i,n,o),u=a.Buffer.alloc(16,0),l=(0,t.createDecipheriv)("aes-192-cbc",d,u);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},83919:(e,r,s)=>{s.d(r,{A:()=>a});var t=s(55511);function a({password:e,encryptionKey:r}){let s=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!s?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=(0,t.createHmac)("sha512",s);return a.update(e),a.digest("base64")}}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[1251],()=>s(3931));module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addDbUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/addDbUser.js.nft.json index 8310cb4..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/addDbUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addDbUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js b/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js index a23243a..bd7df28 100644 --- a/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js +++ b/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6534,e.ids=[6534],e.modules={27825:e=>{e.exports=require("lodash")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},68336:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>S,routeModule:()=>y});var s={};t.r(s),t.d(s,{default:()=>d});var n=t(89947),o=t(2706),i=t(96762),a=t(33873),c=t.n(a),u=t(6420),l=t.n(u),p=t(80304),f=t.n(p);let _=t(29021);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{name:s}=f()(e.body),n=process.env.DSQL_STATIC_SERVER_DIR;if(!n)return console.log("Static File ENV not Found!"),r.json({success:!1,msg:"No Static File Path"});let o=c().join(n,`images/user-images/user-${t.id}/`)+s;if(_.existsSync(o))return r.json({success:!1});_.mkdirSync(o),r.json({success:!0})}let S=(0,i.M)(s,"default"),E=(0,i.M)(s,"config"),y=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/addNewMediaFolder",pathname:"/api/addNewMediaFolder",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:c,csrfCookieName:u}=i();if(!e.cookies?.[c]?.match(/./))return null;let l=n({encryptedString:e.cookies[c]});if(!l)return null;let p=JSON.parse(l);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let f=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!f)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${f}/${p.csrf_k}`))return null;if(0==p.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:c+=n}}},80304:(e,r,t)=>{let s=t(27825);function n(e,r,t){if(!e)return"";if("number"==typeof e||"boolean"==typeof e)return e;if("string"==typeof e&&!e?.toString()?.match(/./))return"";if("object"==typeof e&&!Array.isArray(e))return o(e,r);if("object"==typeof e&&Array.isArray(e))return i(e,r);let s=e;return t&&(s=e.toString().replace(t,"")),r||(s=e.toString().replace(/\n|\r|\n\r|\r\n/g,"").replace(/ /g,"")),s=s.replace(/(?{let s=t[e];if(!s){delete t[e];return}"string"==typeof s||"number"==typeof s?t[e]=n(s,r):"object"!=typeof s||Array.isArray(s)?"object"==typeof s&&Array.isArray(s)&&(t[e]=i(s,r)):t[e]=o(s,r)}),t}function i(e,r){let t=s.cloneDeep(e);return t.forEach((e,s)=>{if(!e){t.splice(s,1);return}"string"==typeof e||"number"==typeof e?t[s]=n(e,r):"object"!=typeof e||Array.isArray(e)?"object"==typeof e&&Array.isArray(e)&&(t[s]=i(e,r)):t[s]=o(e,r)}),t}e.exports=n},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",s(i,a,c),o.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=68336);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6534,e.ids=[6534],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},24709:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>y,routeModule:()=>g});var n={};t.r(n),t.d(n,{default:()=>E});var s=t(89947),i=t(2706),o=t(96762),a=t(33873),c=t.n(a),u=t(69842),l=t(27825),f=t.n(l);function d(e,r,t){if(!e)return"";if("number"==typeof e||"boolean"==typeof e)return e;if("string"==typeof e&&!e?.toString()?.match(/./))return"";if("object"==typeof e&&!Array.isArray(e))return p(e,r);if("object"==typeof e&&Array.isArray(e))return _(e,r);let n=e;return t&&(n=e.toString().replace(t,"")),r||(n=e.toString().replace(/\n|\r|\n\r|\r\n/g,"").replace(/ /g,"")),n=n.replace(/(?{let n=t[e];if(!n){delete t[e];return}"string"==typeof n||"number"==typeof n?t[e]=d(n,r):"object"!=typeof n||Array.isArray(n)?"object"==typeof n&&Array.isArray(n)&&(t[e]=_(n,r)):t[e]=p(n,r)}),t}function _(e,r){let t=f().cloneDeep(e);return t.forEach((e,n)=>{if(!e){t.splice(n,1);return}"string"==typeof e||"number"==typeof e?t[n]=d(e,r):"object"!=typeof e||Array.isArray(e)?"object"==typeof e&&Array.isArray(e)&&(t[n]=_(e,r)):t[n]=p(e,r)}),t}let A=t(29021);async function E(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{name:n}=d(e.body),s=process.env.DSQL_STATIC_SERVER_DIR;if(!s)return console.log("Static File ENV not Found!"),r.json({success:!1,msg:"No Static File Path"});let i=c().join(s,`images/user-images/user-${t.id}/`)+n;if(A.existsSync(i))return r.json({success:!1});A.mkdirSync(i),r.json({success:!0})}let y=(0,o.M)(n,"default"),S=(0,o.M)(n,"config"),g=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/addNewMediaFolder",pathname:"/api/addNewMediaFolder",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),a=t(89159);async function c(e,r,t){let{keyCookieName:i,csrfCookieName:c}=(0,a.A)();if(!e.cookies?.[i]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[i]});if(!u)return null;let l=JSON.parse(u);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let f=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!f)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${f}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=n;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),i&&(c+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:c+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,n.scryptSync)(i,o,a),u=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",c,u);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=24709);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js.nft.json b/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js.nft.json index cc084fc..8ea429a 100644 --- a/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addNewMediaFolder.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addSocialLogin.js b/dsql-app/.local_dist/server/pages/api/addSocialLogin.js index e14b3b2..9dd9de0 100644 --- a/dsql-app/.local_dist/server/pages/api/addSocialLogin.js +++ b/dsql-app/.local_dist/server/pages/api/addSocialLogin.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=3292,e.ids=[3292],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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},25858:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>f,routeModule:()=>m});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),o=t(2706),i=t(96762),a=t(48225),l=t.n(a),c=t(6420),u=t.n(c);let p=t(29021);t(33873);let{execSync:d}=t(79646);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await u()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbFullName:s,dbSlug:n,paradigm:o,platforms:i}=e.body;try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/env.json`;p.existsSync(e)||p.writeFileSync(e,"{}","utf8");let n=JSON.parse(p.readFileSync(e,"utf8")),a=n[s];a||(a={social:[]},n[s]=a);let l=a.social;l=[];for(let e=0;e{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${d}/${p.csrf_k}`))return null;if(0==p.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=3292,e.ids=[3292],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},10353:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>f,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>d});var s=t(89947),o=t(2706),i=t(96762),a=t(67619),l=t(69842);let c=t(29021);t(33873);let{execSync:u}=t(79646);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,l.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbFullName:n,dbSlug:s,paradigm:o,platforms:i}=e.body;try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/env.json`;c.existsSync(e)||c.writeFileSync(e,"{}","utf8");let s=JSON.parse(c.readFileSync(e,"utf8")),a=s[n];a||(a={social:[]},s[n]=a);let l=a.social;l=[];for(let e=0;e{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),o=t(29021),i=t.n(o),a=t(89159);async function l(e,r,t){let{keyCookieName:o,csrfCookieName:l}=(0,a.A)();if(!e.cookies?.[o]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[o]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(29021),s=t.n(n);async function o({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||o.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${o.url}`),o?.body&&(n+=` Request Body: ${JSON.stringify(o.body,null,4)}`),a&&(n+=` IP: ${a}`),n+=` Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,a,l),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=25858);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511),s=t(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(o,i,a),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=10353);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addSocialLogin.js.nft.json b/dsql-app/.local_dist/server/pages/api/addSocialLogin.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/addSocialLogin.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addSocialLogin.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addTableEntry.js b/dsql-app/.local_dist/server/pages/api/addTableEntry.js index 7ec3e15..137f42c 100644 --- a/dsql-app/.local_dist/server/pages/api/addTableEntry.js +++ b/dsql-app/.local_dist/server/pages/api/addTableEntry.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=460,e.ids=[460],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},14373:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>m,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>g});var a=t(89947),i=t(2706),o=t(96762),l=t(96771),n=t.n(l),d=t(47670),u=t.n(d);t(51348),t(21339);let c=t(73677),_=t(39831),p=t(48225),E=t(6420);async function g(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await E(e,r,!0);if(!t)return r.json({success:!1,msg:"User Auth Failed"});let{tableName:s,payload:a,tableSchema:i,dbSlug:o,dbId:l,delegated:d}=e.body;try{let d=await _({databaseSlug:o,request:e,user:t,query:e.query});if(!await c({user:t,confirmedDelegetedUser:d,database:o,table:s,dbId:l,priviledgeRegex:/Update Entries/i}))return r.json({success:!1,msg:"Unauthorized"});let p=d?.rootUserId?`datasquirel_user_${d.rootUserId}_${o}`:`datasquirel_user_${t.id}_${o}`,E=await u()({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:p,tableName:s,data:a,tableSchema:i});if(!E.insertId)throw console.log("Table Insertion Failed =>",E),Error(E?.error||"Table Insertion Failed");await n()({dbName:p,entryId:E.insertId,entryOrder:a.order,tableName:s,tableSchema:i}),r.json({success:!0})}catch(e){p({component:"/api/addTableEntry/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!",err:e.message})}}let m=(0,o.M)(s,"default"),f=(0,o.M)(s,"config"),S=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/addTableEntry",pathname:"/api/addTableEntry",bundlePath:"",filename:""},userland:s})},73677:(e,r,t)=>{let s=t(51348),a=t(48225);e.exports=async function({user:e,confirmedDelegetedUser:r,database:t,table:i,priviledgeRegex:o,dbId:l}){let n,d;try{r?.delegated?(n=await s("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,t,i]),d=n[0]?.priviledge?.match(o)):(n=await s("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,i,l]),d=!0)}catch(r){a({component:"checkUserRights",message:r.message,user:e})}return!!n&&!!n[0]&&!!d}},39831:(e,r,t)=>{t(81630);let s=t(72835);e.exports=async function({request:e,databaseSlug:r,user:t,query:a}){try{let i=t.id,o=null;if(!a?.delegated)return{dbUserId:i};let l=a.dbUserId,n=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${n}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[d]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:i=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:i}}catch(e){return null}}},96771:(e,r,t)=>{let s=t(21339);e.exports=async function({dbName:e,entryId:r,entryOrder:t,tableName:a,tableSchema:i}){try{if(i.fields.find(e=>!!e.fieldName?.match(/^order$/i))&&t){let i=await s({database:e,paradigm:"Full Access",queryString:`SELECT * FROM ${a} WHERE \`order\` = '${t}' AND id != ?`,queryValues:[String(r)]});if(!i?.[0])throw Error("No Existing Order");await s({database:e,paradigm:"Full Access",queryString:`UPDATE ${a} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ${t} AND id != ?`,queryValues:[String(r)]})}return!0}catch(e){return!1}}},6420:(e,r,t)=>{t(81630);let s=t(51348),a=t(72835),i=t(29021),o=t(31341);async function l(e,r,t,l){let{keyCookieName:n,csrfCookieName:d}=o();if(!e.cookies?.[n]?.match(/./))return null;let u=a({encryptedString:e.cookies[n]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${_}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=l},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=s;let n=r;return e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:n+=a}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:a,req:i}){let o=new Date,l=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||s||r||i.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=460,e.ids=[460],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},66912:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>f,routeModule:()=>p});var a={};t.r(a),t.d(a,{default:()=>E});var s=t(89947),i=t(2706),l=t(96762),n=t(77377),o=t(98e3),d=t(31495),u=t(60125),c=t(67619),_=t(69842);async function E(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,_.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"User Auth Failed"});let{tableName:a,payload:s,tableSchema:i,dbSlug:l,dbId:E,delegated:f}=e.body;try{let c=await (0,u.A)({databaseSlug:l,request:e,user:t,query:e.query});if(!await (0,d.A)({user:t,confirmedDelegetedUser:c,database:l,table:a,dbId:E,priviledgeRegex:/Update Entries/i}))return r.json({success:!1,msg:"Unauthorized"});let _=c?.rootUserId?`datasquirel_user_${c.rootUserId}_${l}`:`datasquirel_user_${t.id}_${l}`,f=await (0,o.A)({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:_,tableName:a,data:s,tableSchema:i});if(!f.insertId)throw console.log("Table Insertion Failed =>",f),Error(f?.error||"Table Insertion Failed");await (0,n.A)({dbName:_,entryId:f.insertId,entryOrder:s.order,tableName:a,tableSchema:i}),r.json({success:!0})}catch(e){(0,c.default)({component:"/api/addTableEntry/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!",err:e.message})}}let f=(0,l.M)(a,"default"),g=(0,l.M)(a,"config"),p=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/addTableEntry",pathname:"/api/addTableEntry",bundlePath:"",filename:""},userland:a})},31495:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(48786),s=t(67619);async function i({user:e,confirmedDelegetedUser:r,database:t,table:i,priviledgeRegex:l,dbId:n}){let o,d;try{r?.delegated?(o=await (0,a.A)("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,t,i]),d=o[0]?.priviledge?.match(l)):(o=await (0,a.A)("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,i,n]),d=!0)}catch(r){(0,s.default)({component:"checkUserRights",message:r.message,user:e})}return!!o&&!!o[0]&&!!d}},60125:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);async function s({request:e,databaseSlug:r,user:t,query:s}){try{let i=t.id,l=null;if(!s?.delegated)return{dbUserId:i};let n=s.dbUserId,o=`${process.env.DSQL_USER_DB_PREFIX}${n}_${r}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${o}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let t=(0,a.A)({encryptedString:e.cookies[d]});if(!t)throw Error("Invalid Token");if((l=JSON.parse(t)).databaseSlug===r)return{dbUserId:i=l.rootUserId,rootUserId:l.rootUserId,rootUserName:l.rootUserName,rootUserEmail:l.rootUserEmail,rootUserImage:l.rootUserImage,databaseFullName:l.databaseFullName,databaseSlug:l.databaseSlug,allowedTables:l.allowedTables,priviledges:l.priviledges,database:l.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:i}}catch(e){return null}}},77377:(e,r,t)=>{t.d(r,{A:()=>s});let a=t(37275);async function s({dbName:e,entryId:r,entryOrder:t,tableName:s,tableSchema:i}){try{if(i.fields.find(e=>!!e.fieldName?.match(/^order$/i))&&t){let i=await a({database:e,paradigm:"Full Access",queryString:`SELECT * FROM ${s} WHERE \`order\` = '${t}' AND id != ?`,queryValues:[String(r)]});if(!i?.[0])throw Error("No Existing Order");await a({database:e,paradigm:"Full Access",queryString:`UPDATE ${s} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ${t} AND id != ?`,queryValues:[String(r)]})}return!0}catch(e){return!1}}},69842:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(48786),s=t(95969),i=t(29021),l=t.n(i),n=t(89159);async function o(e,r,t){let{keyCookieName:i,csrfCookieName:o}=(0,n.A)();if(!e.cookies?.[i]?.match(/./))return null;let d=(0,s.A)({encryptedString:e.cookies[i]});if(!d)return null;let u=JSON.parse(d);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!l().existsSync(`${c}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=r;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=t;let n=r;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=a;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),{keyCookieName:l,csrfCookieName:n,oneTimeCodeName:o+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var a=t(29021),s=t.n(a);async function i({user:e,message:r,component:t,noMail:a,req:i}){let l=new Date,n=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||a||r||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),i?.url&&(a+=` URL: ${i.url}`),i?.body&&(a+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),l&&(a+=` -IP: ${l}`),a+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let n=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(i.body,null,4)}`),n&&(a+=` +IP: ${n}`),a+=` +Date: ${l.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let o=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` -${n}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:a}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,n=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=a("aes-192-cbc",s(o,l,n),i.alloc(16,0));try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050],()=>t(14373));module.exports=s})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,n=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,a.scryptSync)(i,l,n),d=s.Buffer.alloc(16,0),u=(0,a.createDecipheriv)("aes-192-cbc",o,d);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[1251],()=>t(66912));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addTableEntry.js.nft.json b/dsql-app/.local_dist/server/pages/api/addTableEntry.js.nft.json index 8310cb4..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/addTableEntry.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addTableEntry.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUserMedia.js b/dsql-app/.local_dist/server/pages/api/addUserMedia.js index cd4b69b..c027de0 100644 --- a/dsql-app/.local_dist/server/pages/api/addUserMedia.js +++ b/dsql-app/.local_dist/server/pages/api/addUserMedia.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=979,e.ids=[979],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},9288:e=>{e.exports=require("sharp")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},93851:(e,r,t)=>{t.r(r),t.d(r,{config:()=>b,default:()=>$,routeModule:()=>N});var a={};t.r(a),t.d(a,{config:()=>E,default:()=>y});var i=t(89947),s=t(2706),l=t(96762),n=t(47670),o=t.n(n),u=t(10701),d=t.n(u),c=t(48227),m=t.n(c),_=t(48225),p=t.n(_),f=t(6420),h=t.n(f);let S=t(29021),g=t(33873),{execSync:v}=t(79646),E={api:{responseLimit:"1mb",bodyParser:{sizeLimit:"200mb"}}};async function y(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await h()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let a=e.body,{media:i}=a,s=a.folder,l=a.type;"production".match(/production/);let n=process.env.DSQL_STATIC_SERVER_DIR;if(!n)return console.log("Static File ENV not Found!"),r.json({success:!1,msg:"No Static File Path"});if(s){let e=g.join(n,`images/user-images/user-${t.id}/${s}`);S.existsSync(e)||S.mkdirSync(e,{recursive:!0});let r=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/media/${s}`;S.existsSync(r)||S.mkdirSync(r,{recursive:!0})}try{let e=[];for(let r=0;r{let a=t(9288),i=t(48225),s=t(48227);e.exports=async function({imageSourceBase64:e,imageName:r,userId:t,mimeType:l,thumbnailSize:n,folder:o,isPrivate:u}){try{let i=Buffer.from(e,"base64"),d=n?parseInt(n.toString()):400,c=a(i),m=a(i),_=s({isPrivate:u,userId:t,folder:o});if(!_)return null;let{fileRootPath:p,urlRootPath:f,relativePath:h}=_,{width:S,height:g,format:v}=await c.metadata(),E=l||v;S&&g&&S>1800&&c.resize(1800,Math.round(1800/S*g),{fit:"cover"}),c.toFormat(E,{quality:80}),await c.metadata();let y=`${r}.${E}`;if(await c.toFile(p+y),S&&g&&S>d){let e=d/S;m.resize(d,Math.round(g*e),{fit:"cover"})}else S&&g&&m.resize(150,Math.round(150/S*g),{fit:"cover"});m.toFormat(E,{quality:80});let $=`${r}_thumbnail.${E}`;return await m.toFile(p+$),{urlPath:f+y,urlThumbnailPath:f+$,urlRelativePath:h+y,urlThumbnailRelativePath:h+$}}catch(e){return console.log("Write Image to Disk error =>",e.message),i({component:"functions/backend/fsWriteImageToDiskFromBase64",message:e.message}),null}}},48227:(e,r,t)=>{let a=t(29021),i=t(33873);e.exports=function({isPrivate:e,userId:r,folder:t,video:s,pathOnly:l}){"production".match(/production/);let n=process.env.DSQL_STATIC_SERVER_DIR;if(!n)return console.log("Static File ENV not Found!"),null;let o=e?`@/${s?"videos":"media"}/${t?t+"/":""}`:s?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:i.join(n,o);return a.existsSync(u)||l||a.mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${o}`,relativePath:o}}},6420:(e,r,t)=>{t(81630);let a=t(51348),i=t(72835),s=t(29021),l=t(31341);async function n(e,r,t,n){let{keyCookieName:o,csrfCookieName:u}=l();if(!e.cookies?.[o]?.match(/./))return null;let d=i({encryptedString:e.cookies[o]});if(!d)return null;let c=JSON.parse(d);if(!c.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let m=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!m)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!s.existsSync(`${m}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await a(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=n},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=r;e?.userId&&(l+=`user_${e.userId}_`),s&&(l+=`${s}_`),l+=t;let n=r;e?.userId&&(n+=`user_${e.userId}_`),s&&(n+=`${s}_`),n+=a;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),s&&(o+=`${s}_`),{keyCookieName:l,csrfCookieName:n,oneTimeCodeName:o+=i}}},48225:(e,r,t)=>{let a=t(29021),{IncomingMessage:i}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:i,req:s}){let l=new Date,n=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||a||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=979,e.ids=[979],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},9288:e=>{e.exports=require("sharp")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},27973:(e,r,a)=>{a.r(r),a.d(r,{config:()=>v,default:()=>h,routeModule:()=>g});var t={};a.r(t),a.d(t,{config:()=>f,default:()=>S});var i=a(89947),s=a(2706),l=a(96762),n=a(98e3),o=a(96551),u=a(45185),d=a(67619),c=a(69842);let m=a(29021),_=a(33873),{execSync:p}=a(79646),f={api:{responseLimit:"1mb",bodyParser:{sizeLimit:"200mb"}}};async function S(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let a=await (0,c.A)(e,r,!0);if(!a)return r.json({success:!1,msg:"Unauthorized"});let t=e.body,{media:i}=t,s=t.folder,l=t.type;"production".match(/production/);let p=process.env.DSQL_STATIC_SERVER_DIR;if(!p)return console.log("Static File ENV not Found!"),r.json({success:!1,msg:"No Static File Path"});if(s){let e=_.join(p,`images/user-images/user-${a.id}/${s}`);m.existsSync(e)||m.mkdirSync(e,{recursive:!0});let r=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${a.id}/media/${s}`;m.existsSync(r)||m.mkdirSync(r,{recursive:!0})}try{let e=[];for(let r=0;r{a.d(r,{A:()=>n});var t=a(9288),i=a.n(t),s=a(67619),l=a(45185);async function n({imageSourceBase64:e,imageName:r,userId:a,mimeType:t,thumbnailSize:n,folder:o,isPrivate:u}){try{let s=Buffer.from(e,"base64"),d=n?parseInt(n.toString()):400,c=i()(s),m=i()(s),_=(0,l.A)({isPrivate:u,userId:a,folder:o});if(!_)return null;let{fileRootPath:p,urlRootPath:f,relativePath:S}=_,{width:h,height:v,format:g}=await c.metadata(),E=t||g;h&&v&&h>1800&&c.resize(1800,Math.round(1800/h*v),{fit:"cover"}),c.toFormat(E,{quality:80}),await c.metadata();let y=`${r}.${E}`;if(await c.toFile(p+y),h&&v&&h>d){let e=d/h;m.resize(d,Math.round(v*e),{fit:"cover"})}else h&&v&&m.resize(150,Math.round(150/h*v),{fit:"cover"});m.toFormat(E,{quality:80});let $=`${r}_thumbnail.${E}`;return await m.toFile(p+$),{urlPath:f+y,urlThumbnailPath:f+$,urlRelativePath:S+y,urlThumbnailRelativePath:S+$}}catch(e){return console.log("Write Image to Disk error =>",e.message),(0,s.default)({component:"functions/backend/fsWriteImageToDiskFromBase64",message:e.message}),null}}},45185:(e,r,a)=>{a.d(r,{A:()=>n});var t=a(29021),i=a.n(t),s=a(33873),l=a.n(s);function n({isPrivate:e,userId:r,folder:a,video:t,pathOnly:s}){"production".match(/production/);let n=process.env.DSQL_STATIC_SERVER_DIR;if(!n)return console.log("Static File ENV not Found!"),null;let o=e?`@/${t?"videos":"media"}/${a?a+"/":""}`:t?`/videos/user-videos/user-${r}/${a?a+"/":""}`:`/images/user-images/user-${r}/${a?a+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${a?a+"/":""}`:l().join(n,o);return i().existsSync(u)||s||i().mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${a?a+"/":""}`:`${process.env.DSQL_STATIC_HOST}${o}`,relativePath:o}}},69842:(e,r,a)=>{a.d(r,{A:()=>o});var t=a(48786),i=a(95969),s=a(29021),l=a.n(s),n=a(89159);async function o(e,r,a){let{keyCookieName:s,csrfCookieName:o}=(0,n.A)();if(!e.cookies?.[s]?.match(/./))return null;let u=(0,i.A)({encryptedString:e.cookies[s]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||a&&!Object.keys(e.headers).find(e=>e.includes(d.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(a&&!l().existsSync(`${c}/${d.csrf_k}`))return null;if(0==d.verification_status&&!a){let e=await (0,t.A)(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}},89159:(e,r,a)=>{a.d(r,{A:()=>t});function t(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",a=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=r;e?.userId&&(l+=`user_${e.userId}_`),s&&(l+=`${s}_`),l+=a;let n=r;e?.userId&&(n+=`user_${e.userId}_`),s&&(n+=`${s}_`),n+=t;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),s&&(o+=`${s}_`),{keyCookieName:l,csrfCookieName:n,oneTimeCodeName:o+=i}}},67619:(e,r,a)=>{a.r(r),a.d(r,{default:()=>s});var t=a(29021),i=a.n(t);async function s({user:e,message:r,component:a,noMail:t,req:s}){let l=new Date,n=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],a=s.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],i=a||t||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let t=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` +Component: ${a}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(t+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),s?.url&&(i+=` -URL: ${s.url}`),s?.body&&(i+=` -Request Body: ${JSON.stringify(s.body,null,4)}`),n&&(i+=` -IP: ${n}`),i+=` +User Email: ${e?.email}`),s?.url&&(t+=` +URL: ${s.url}`),s?.body&&(t+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),n&&(t+=` +IP: ${n}`),t+=` Date: ${l.toDateString()} -========================================`,a.existsSync("./.tmp/error.log")||a.writeFileSync("./.tmp/error.log","","utf-8");let o=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",i),a.appendFileSync("./.tmp/error.log",` +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let o=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",t),i().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:a,createDecipheriv:i}=t(55511),{Buffer:s}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=i("aes-192-cbc",a(l,n,o),s.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[4050],()=>t(93851));module.exports=a})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,a)=>{a.d(r,{A:()=>s});var t=a(55511),i=a(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:a}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=a||process.env.DSQL_ENCRYPTION_SALT,n=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,t.scryptSync)(s,l,n),u=i.Buffer.alloc(16,0),d=(0,t.createDecipheriv)("aes-192-cbc",o,u);try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var a=e=>r(r.s=e),t=r.X(0,[1251],()=>a(27973));module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUserMedia.js.nft.json b/dsql-app/.local_dist/server/pages/api/addUserMedia.js.nft.json index acf0c64..7cbdcb6 100644 --- a/dsql-app/.local_dist/server/pages/api/addUserMedia.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addUserMedia.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linux-x64/package.json","../../../../node_modules/@img/sharp-libvips-linux-x64/versions.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../../../../node_modules/@img/sharp-linux-x64/LICENSE","../../../../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../../../../node_modules/@img/sharp-linux-x64/package.json","../../../../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../../../../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../../../../node_modules/@img/sharp-linuxmusl-x64/package.json","../../../../node_modules/color-convert/conversions.js","../../../../node_modules/color-convert/index.js","../../../../node_modules/color-convert/package.json","../../../../node_modules/color-convert/route.js","../../../../node_modules/color-name/index.js","../../../../node_modules/color-name/package.json","../../../../node_modules/color-string/index.js","../../../../node_modules/color-string/package.json","../../../../node_modules/color/index.js","../../../../node_modules/color/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/detect-libc/lib/detect-libc.js","../../../../node_modules/detect-libc/lib/filesystem.js","../../../../node_modules/detect-libc/lib/process.js","../../../../node_modules/detect-libc/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sharp/lib/channel.js","../../../../node_modules/sharp/lib/colour.js","../../../../node_modules/sharp/lib/composite.js","../../../../node_modules/sharp/lib/constructor.js","../../../../node_modules/sharp/lib/index.js","../../../../node_modules/sharp/lib/input.js","../../../../node_modules/sharp/lib/is.js","../../../../node_modules/sharp/lib/libvips.js","../../../../node_modules/sharp/lib/operation.js","../../../../node_modules/sharp/lib/output.js","../../../../node_modules/sharp/lib/resize.js","../../../../node_modules/sharp/lib/sharp.js","../../../../node_modules/sharp/lib/utility.js","../../../../node_modules/sharp/node_modules/semver/classes/comparator.js","../../../../node_modules/sharp/node_modules/semver/classes/range.js","../../../../node_modules/sharp/node_modules/semver/classes/semver.js","../../../../node_modules/sharp/node_modules/semver/functions/cmp.js","../../../../node_modules/sharp/node_modules/semver/functions/coerce.js","../../../../node_modules/sharp/node_modules/semver/functions/compare.js","../../../../node_modules/sharp/node_modules/semver/functions/eq.js","../../../../node_modules/sharp/node_modules/semver/functions/gt.js","../../../../node_modules/sharp/node_modules/semver/functions/gte.js","../../../../node_modules/sharp/node_modules/semver/functions/lt.js","../../../../node_modules/sharp/node_modules/semver/functions/lte.js","../../../../node_modules/sharp/node_modules/semver/functions/neq.js","../../../../node_modules/sharp/node_modules/semver/functions/parse.js","../../../../node_modules/sharp/node_modules/semver/functions/satisfies.js","../../../../node_modules/sharp/node_modules/semver/internal/constants.js","../../../../node_modules/sharp/node_modules/semver/internal/debug.js","../../../../node_modules/sharp/node_modules/semver/internal/identifiers.js","../../../../node_modules/sharp/node_modules/semver/internal/lrucache.js","../../../../node_modules/sharp/node_modules/semver/internal/parse-options.js","../../../../node_modules/sharp/node_modules/semver/internal/re.js","../../../../node_modules/sharp/node_modules/semver/package.json","../../../../node_modules/sharp/package.json","../../../../node_modules/simple-swizzle/index.js","../../../../node_modules/simple-swizzle/node_modules/is-arrayish/index.js","../../../../node_modules/simple-swizzle/node_modules/is-arrayish/package.json","../../../../node_modules/simple-swizzle/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linux-x64/package.json","../../../../node_modules/@img/sharp-libvips-linux-x64/versions.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../../../../node_modules/@img/sharp-linux-x64/LICENSE","../../../../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../../../../node_modules/@img/sharp-linux-x64/package.json","../../../../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../../../../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../../../../node_modules/@img/sharp-linuxmusl-x64/package.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/color-convert/conversions.js","../../../../node_modules/color-convert/index.js","../../../../node_modules/color-convert/package.json","../../../../node_modules/color-convert/route.js","../../../../node_modules/color-name/index.js","../../../../node_modules/color-name/package.json","../../../../node_modules/color-string/index.js","../../../../node_modules/color-string/package.json","../../../../node_modules/color/index.js","../../../../node_modules/color/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-arrayish/index.js","../../../../node_modules/is-arrayish/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/semver/classes/comparator.js","../../../../node_modules/semver/classes/range.js","../../../../node_modules/semver/classes/semver.js","../../../../node_modules/semver/functions/cmp.js","../../../../node_modules/semver/functions/coerce.js","../../../../node_modules/semver/functions/compare.js","../../../../node_modules/semver/functions/eq.js","../../../../node_modules/semver/functions/gt.js","../../../../node_modules/semver/functions/gte.js","../../../../node_modules/semver/functions/lt.js","../../../../node_modules/semver/functions/lte.js","../../../../node_modules/semver/functions/neq.js","../../../../node_modules/semver/functions/parse.js","../../../../node_modules/semver/functions/satisfies.js","../../../../node_modules/semver/internal/constants.js","../../../../node_modules/semver/internal/debug.js","../../../../node_modules/semver/internal/identifiers.js","../../../../node_modules/semver/internal/lrucache.js","../../../../node_modules/semver/internal/parse-options.js","../../../../node_modules/semver/internal/re.js","../../../../node_modules/semver/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sharp/lib/channel.js","../../../../node_modules/sharp/lib/colour.js","../../../../node_modules/sharp/lib/composite.js","../../../../node_modules/sharp/lib/constructor.js","../../../../node_modules/sharp/lib/index.js","../../../../node_modules/sharp/lib/input.js","../../../../node_modules/sharp/lib/is.js","../../../../node_modules/sharp/lib/libvips.js","../../../../node_modules/sharp/lib/operation.js","../../../../node_modules/sharp/lib/output.js","../../../../node_modules/sharp/lib/resize.js","../../../../node_modules/sharp/lib/sharp.js","../../../../node_modules/sharp/lib/utility.js","../../../../node_modules/sharp/package.json","../../../../node_modules/simple-swizzle/index.js","../../../../node_modules/simple-swizzle/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUserTable.js b/dsql-app/.local_dist/server/pages/api/addUserTable.js index 6ee3b65..e1a1d6b 100644 --- a/dsql-app/.local_dist/server/pages/api/addUserTable.js +++ b/dsql-app/.local_dist/server/pages/api/addUserTable.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=8275,e.ids=[8275],e.modules={60818:e=>{e.exports=require("dotenv")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},13441:(e,a,t)=>{t.r(a),t.d(a,{config:()=>I,default:()=>v,routeModule:()=>T});var s={};t.r(s),t.d(s,{default:()=>x});var r=t(89947),l=t(2706),i=t(96762),n=t(48225),d=t.n(n),u=t(6420),o=t.n(u),b=t(2258),c=t.n(b),_=t(27825),m=t.n(_),p=t(78634),f=t.n(p),N=t(51348),h=t.n(N),E=t(47670),S=t.n(E),g=t(19261),D=t.n(g);t(29021),t(33873);let{execSync:F}=t(79646);async function x(e,a){if("POST"!==e.method)return a.json({msg:"Failed!"});let t=await o()(e,a,!0);if(!t)return console.log("No User"),a.json({success:!1,msg:"Unauthorized"});let{payload:s}=e.body,r=e.body.dbFullName.replace(/[^a-z\_0-9]/g,""),l=e.body.dbSlug,i=e.body.dbId,n=e.body.parentDatabase,u=e.body.parentTable;try{let e=c()({userId:t.id});if(!e)throw Error("No User Schema found!");let o=e.findIndex(e=>e.dbFullName===r),b=e[o];if(!b)throw Error("No Target Database Found!");let _=b.tables.findIndex(e=>e.tableName===s.tableName);if(_>=0?e[o].tables[_]=s:e[o].tables.push(s),s?.childTable){let a=e.find(e=>e.dbFullName===n),t=a?.tables.find(e=>{if(e.tableName===u)return!0});if(!t)throw Error("Child Table Parent Doesn't Exist!");t.childrenTables?.[0]?t.childrenTables.push({dbNameFull:r,tableName:s.tableName,tableNameFull:s.tableNameFull}):t.childrenTables=[{dbNameFull:r,tableName:s.tableName,tableNameFull:s.tableFullName}]}if(b.childrenDatabases)for(let a=0;ae.dbFullName===r.dbFullName);e[a]&&(e[a].tables=m().cloneDeep(b.tables));let l=await h()("SELECT * FROM user_databases WHERE user_id = ? AND db_full_name = ?",[t.id,r.dbFullName]),i=await h()("SELECT * FROM user_database_tables WHERE db_id=? AND user_id=? AND table_slug=?",[l[0].id,t.id,s.tableName]);if(i?.[0])continue;await S()({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:t.id,db_id:l[0].id,db_slug:l[0].db_slug,table_name:s.tableFullName,table_slug:s.tableName}})}catch(e){d()({component:"/api/addUserTable/lines-124-140",message:e.message,user:t})}}f()({userId:t.id,schemaData:e});let p={user_id:t.id,db_id:i,db_slug:l,table_name:s.tableFullName,table_slug:s.tableName};s?.childTable&&(p.child_table="1",p.child_table_parent_database=n,p.child_table_parent_table=u),await S()({dbFullName:"datasquirel",tableName:"user_database_tables",data:p}),await D()({userId:t.id,targetDatabase:r}),a.json({success:!0})}catch(e){console.log(e.message),d()({component:"/api/addUserTable/main-catch-error",message:e.message,user:t}),a.json({success:!1,msg:"Database Files could not be written!"})}}let v=(0,i.M)(s,"default"),I=(0,i.M)(s,"config"),T=new r.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/addUserTable",pathname:"/api/addUserTable",bundlePath:"",filename:""},userland:s})},6420:(e,a,t)=>{t(81630);let s=t(51348),r=t(72835),l=t(29021),i=t(31341);async function n(e,a,t,n){let{keyCookieName:d,csrfCookieName:u}=i();if(!e.cookies?.[d]?.match(/./))return null;let o=r({encryptedString:e.cookies[d]});if(!o)return null;let b=JSON.parse(o);if(!b.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${b.csrf_k}`)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!l.existsSync(`${c}/${b.csrf_k}`))return null;if(0==b.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${b.id}'`);e&&e[0]&&1==e[0].verification_status&&a.setHeader("Set-Cookie",["user_refresh=1"])}return b?.date&&Date.now()-b.date>6048e5?null:b}e.exports=n},31341:e=>{e.exports=function(e){let a=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",r=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=a;e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),i+=t;let n=a;e?.userId&&(n+=`user_${e.userId}_`),l&&(n+=`${l}_`),n+=s;let d=a;return e?.userId&&(d+=`user_${e.userId}_`),l&&(d+=`${l}_`),{keyCookieName:i,csrfCookieName:n,oneTimeCodeName:d+=r}}},2258:(e,a,t)=>{let s=t(48225),r=t(29021),l=t(33873);e.exports=function({userId:e}){try{let a=l.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(r.readFileSync(a,"utf-8"))}catch(e){return s({component:"grabUserSchemaData",message:e.message}),null}}},78634:(e,a,t)=>{let s=t(48225),r=t(29021),l=t(33873);e.exports=function({userId:e,schemaData:a}){try{let t=l.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return r.writeFileSync(t,JSON.stringify(a),"utf8"),!0}catch(e){return s({component:"/functions/backend/setUserSchemaData",message:e.message}),!1}}}};var a=require("../../webpack-api-runtime.js");a.C(e);var t=e=>a(a.s=e),s=a.X(0,[4050,2451],()=>t(13441));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8275,e.ids=[8275],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},47122:(e,a,s)=>{s.r(a),s.d(a,{config:()=>S,default:()=>h,routeModule:()=>E});var t={};s.r(t),s.d(t,{default:()=>N});var r=s(89947),l=s(2706),d=s(96762),i=s(67619),n=s(69842),u=s(4820),o=s(27825),b=s.n(o),c=s(21724),_=s(48786),m=s(98e3),f=s(76856);s(29021),s(33873);let{execSync:p}=s(79646);async function N(e,a){if("POST"!==e.method)return a.json({msg:"Failed!"});let s=await (0,n.A)(e,a,!0);if(!s)return console.log("No User"),a.json({success:!1,msg:"Unauthorized"});let{payload:t}=e.body,r=e.body.dbFullName.replace(/[^a-z\_0-9]/g,""),l=e.body.dbSlug,d=e.body.dbId,o=e.body.parentDatabase,p=e.body.parentTable;try{let e=(0,u.A)({userId:s.id});if(!e)throw Error("No User Schema found!");let n=e.findIndex(e=>e.dbFullName===r),N=e[n];if(!N)throw Error("No Target Database Found!");let h=N.tables.findIndex(e=>e.tableName===t.tableName);if(h>=0?e[n].tables[h]=t:e[n].tables.push(t),t?.childTable){let a=e.find(e=>e.dbFullName===o),s=a?.tables.find(e=>{if(e.tableName===p)return!0});if(!s)throw Error("Child Table Parent Doesn't Exist!");s.childrenTables?.[0]?s.childrenTables.push({dbNameFull:r,tableName:t.tableName,tableNameFull:t.tableNameFull}):s.childrenTables=[{dbNameFull:r,tableName:t.tableName,tableNameFull:t.tableFullName}]}if(N.childrenDatabases)for(let a=0;ae.dbFullName===r.dbFullName);e[a]&&(e[a].tables=b().cloneDeep(N.tables));let l=await (0,_.A)("SELECT * FROM user_databases WHERE user_id = ? AND db_full_name = ?",[s.id,r.dbFullName]),d=await (0,_.A)("SELECT * FROM user_database_tables WHERE db_id=? AND user_id=? AND table_slug=?",[l[0].id,s.id,t.tableName]);if(d?.[0])continue;await (0,m.A)({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:s.id,db_id:l[0].id,db_slug:l[0].db_slug,table_name:t.tableFullName,table_slug:t.tableName}})}catch(e){(0,i.default)({component:"/api/addUserTable/lines-124-140",message:e.message,user:s})}}(0,c.A)({userId:s.id,schemaData:e});let S={user_id:s.id,db_id:d,db_slug:l,table_name:t.tableFullName,table_slug:t.tableName};t?.childTable&&(S.child_table="1",S.child_table_parent_database=o,S.child_table_parent_table=p),await (0,m.A)({dbFullName:"datasquirel",tableName:"user_database_tables",data:S}),await (0,f.A)({userId:s.id,targetDatabase:r}),a.json({success:!0})}catch(e){console.log(e.message),(0,i.default)({component:"/api/addUserTable/main-catch-error",message:e.message,user:s}),a.json({success:!1,msg:"Database Files could not be written!"})}}let h=(0,d.M)(t,"default"),S=(0,d.M)(t,"config"),E=new r.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/addUserTable",pathname:"/api/addUserTable",bundlePath:"",filename:""},userland:t})},69842:(e,a,s)=>{s.d(a,{A:()=>n});var t=s(48786),r=s(95969),l=s(29021),d=s.n(l),i=s(89159);async function n(e,a,s){let{keyCookieName:l,csrfCookieName:n}=(0,i.A)();if(!e.cookies?.[l]?.match(/./))return null;let u=(0,r.A)({encryptedString:e.cookies[l]});if(!u)return null;let o=JSON.parse(u);if(!o.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(o.csrf_k)))return null;let b=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!b)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!d().existsSync(`${b}/${o.csrf_k}`))return null;if(0==o.verification_status&&!s){let e=await (0,t.A)(`SELECT verification_status FROM users WHERE id='${o.id}'`);e&&e[0]&&1==e[0].verification_status&&a.setHeader("Set-Cookie",["user_refresh=1"])}return o?.date&&Date.now()-o.date>6048e5?null:o}},89159:(e,a,s)=>{s.d(a,{A:()=>t});function t(e){let a=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",r=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),d=a;e?.userId&&(d+=`user_${e.userId}_`),l&&(d+=`${l}_`),d+=s;let i=a;e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),i+=t;let n=a;return e?.userId&&(n+=`user_${e.userId}_`),l&&(n+=`${l}_`),{keyCookieName:d,csrfCookieName:i,oneTimeCodeName:n+=r}}},4820:(e,a,s)=>{s.d(a,{A:()=>n});var t=s(67619),r=s(29021),l=s.n(r),d=s(33873),i=s.n(d);function n({userId:e}){try{let a=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(l().readFileSync(a,"utf-8"))}catch(e){return(0,t.default)({component:"grabUserSchemaData",message:e.message}),null}}},21724:(e,a,s)=>{s.d(a,{A:()=>n});var t=s(67619),r=s(29021),l=s.n(r),d=s(33873),i=s.n(d);function n({userId:e,schemaData:a}){try{let s=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return l().writeFileSync(s,JSON.stringify(a),"utf8"),!0}catch(e){return(0,t.default)({component:"/functions/backend/setUserSchemaData",message:e.message}),!1}}}};var a=require("../../webpack-api-runtime.js");a.C(e);var s=e=>a(a.s=e),t=a.X(0,[1251,2282],()=>s(47122));module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUserTable.js.nft.json b/dsql-app/.local_dist/server/pages/api/addUserTable.js.nft.json index bb4ebff..3d4978d 100644 --- a/dsql-app/.local_dist/server/pages/api/addUserTable.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addUserTable.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.env","../../../../jsonData/dbSchemas/main.json","../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/main.json","../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUserUser.js b/dsql-app/.local_dist/server/pages/api/addUserUser.js index ef77d9b..b1a25eb 100644 --- a/dsql-app/.local_dist/server/pages/api/addUserUser.js +++ b/dsql-app/.local_dist/server/pages/api/addUserUser.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=3812,e.ids=[3812],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},21110:(e,s,r)=>{r.r(s),r.d(s,{config:()=>g,default:()=>E,routeModule:()=>h});var t={};r.r(t),r.d(t,{default:()=>S});var a=r(89947),i=r(2706),n=r(96762),l=r(59474),o=r.n(l),d=r(6420),u=r.n(d),c=r(47670),_=r.n(c),p=r(51348),m=r.n(p),v=r(14533),f=r.n(v);async function S(e,s){if("POST"!==e.method)return s.json({msg:"Failed!"});let r=await u()(e,s,!0);if(!r)return s.json({success:!1,msg:"Unauthorized"});let t=e.body,a=t.paradigm;if(a?.match(/database/)){let e=await _()({dbFullName:"datasquirel",tableName:"user_users",data:(()=>{let e=Object.keys(t),s={};return e.forEach(e=>{e?.match(/paradigm|priviledge|database_access|databases|confirm/)||(s[e]=t[e])}),s.user_id=r.id,s.password=f()({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:t.password}),s.user_type="database",s.email=t.email_address,s.image="/images/user-preset.png",s.image_thumbnail="/images/user-preset-thumbnail.png",delete s.email_address,s})()});s.json({success:!!e?.insertId,msg:"New User User Added",newUserId:e.insertId})}else{if(r?.email===t.email_address)return s.json({success:!1,msg:"Can't Invite yourself"});let e=await m()("SELECT * FROM invitations WHERE invited_user_email=? AND inviting_user_id=?",[t.email_address,r.id]);if(e&&e[0])return s.json({success:!1,msg:"User Already Invited"});await _()({dbFullName:"datasquirel",tableName:"invitations",data:{inviting_user_id:r.id,invited_user_email:t.email_address,database_access:t.database_access,priviledge:t.priviledge,db_tables_data:t.db_tables}});let a=await o()({to:t.email_address,subject:`${r.first_name} ${r.last_name} Invited you`,text:`${r.first_name} ${r.last_name} has invited you to manage a datasquirel account`,html:` -

${r.first_name} ${r.last_name} has invited you to manage a datasquirel account.

- Accept Invitation - `});s.json({success:!!a?.accepted,msg:"This is an invitation request"})}}let E=(0,n.M)(t,"default"),g=(0,n.M)(t,"config"),h=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/addUserUser",pathname:"/api/addUserUser",bundlePath:"",filename:""},userland:t})},6420:(e,s,r)=>{r(81630);let t=r(51348),a=r(72835),i=r(29021),n=r(31341);async function l(e,s,r,l){let{keyCookieName:o,csrfCookieName:d}=n();if(!e.cookies?.[o]?.match(/./))return null;let u=a({encryptedString:e.cookies[o]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!i.existsSync(`${_}/${c.csrf_k}`))return null;if(0==c.verification_status&&!r){let e=await t(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&s.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=l},31341:e=>{e.exports=function(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=s;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=r;let l=s;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=t;let o=s;return e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:o+=a}}},59474:(e,s,r)=>{let t=r(29021),a=r(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:s,text:r,html:i,alias:n}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let o=(n?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!t.existsSync("./email/index.html"))return;let d=t.readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,i||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let t={};t.from=`"Datasquirel" <${o}>`,t.sender=o,n&&(t["replyTo "]=o),t.to=e,t.subject=s,t.text=r,t.html=d,l=await a.sendMail(t)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return l}},72835:(e,s,r)=>{let{scryptSync:t,createDecipheriv:a}=r(55511),{Buffer:i}=r(79428);e.exports=({encryptedString:e,encryptionKey:s,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=s||process.env.DSQL_ENCRYPTION_PASSWORD,l=r||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=a("aes-192-cbc",t(n,l,o),i.alloc(16,0));try{let s=d.update(e,"hex","utf8");return s+=d.final("utf8")}catch(s){return console.log("Error in decrypting =>",s.message),e}}},14533:(e,s,r)=>{let{createHmac:t}=r(55511);e.exports=function({password:e,encryptionKey:s}){let r=s||process.env.DSQL_ENCRYPTION_PASSWORD;if(!r?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=t("sha512",r);return a.update(e),a.digest("base64")}}};var s=require("../../webpack-api-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[4050],()=>r(21110));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3812,e.ids=[3812],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},70955:(e,s,a)=>{a.r(s),a.d(s,{config:()=>m,default:()=>p,routeModule:()=>v});var r={};a.r(r),a.d(r,{default:()=>_});var t=a(89947),i=a(2706),n=a(96762),d=a(96052),l=a(69842),u=a(98e3),c=a(48786),o=a(83919);async function _(e,s){if("POST"!==e.method)return s.json({msg:"Failed!"});let a=await (0,l.A)(e,s,!0);if(!a)return s.json({success:!1,msg:"Unauthorized"});let r=e.body,t=r.paradigm;if(t?.match(/database/)){let e=await (0,u.A)({dbFullName:"datasquirel",tableName:"user_users",data:(()=>{let e=Object.keys(r),s={};return e.forEach(e=>{e?.match(/paradigm|priviledge|database_access|databases|confirm/)||(s[e]=r[e])}),s.user_id=a.id,s.password=(0,o.A)({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:r.password}),s.user_type="database",s.email=r.email_address,s.image="/images/user-preset.png",s.image_thumbnail="/images/user-preset-thumbnail.png",delete s.email_address,s})()});s.json({success:!!e?.insertId,msg:"New User User Added",newUserId:e.insertId})}else{if(a?.email===r.email_address)return s.json({success:!1,msg:"Can't Invite yourself"});let e=await (0,c.A)("SELECT * FROM invitations WHERE invited_user_email=? AND inviting_user_id=?",[r.email_address,a.id]);if(e&&e[0])return s.json({success:!1,msg:"User Already Invited"});await (0,u.A)({dbFullName:"datasquirel",tableName:"invitations",data:{inviting_user_id:a.id,invited_user_email:r.email_address,database_access:r.database_access,priviledge:r.priviledge,db_tables_data:r.db_tables}});let t=await (0,d.default)({to:r.email_address,subject:`${a.first_name} ${a.last_name} Invited you`,text:`${a.first_name} ${a.last_name} has invited you to manage a datasquirel account`,html:` +

${a.first_name} ${a.last_name} has invited you to manage a datasquirel account.

+ Accept Invitation + `});s.json({success:!!t?.accepted,msg:"This is an invitation request"})}}let p=(0,n.M)(r,"default"),m=(0,n.M)(r,"config"),v=new t.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/addUserUser",pathname:"/api/addUserUser",bundlePath:"",filename:""},userland:r})},69842:(e,s,a)=>{a.d(s,{A:()=>l});var r=a(48786),t=a(95969),i=a(29021),n=a.n(i),d=a(89159);async function l(e,s,a){let{keyCookieName:i,csrfCookieName:l}=(0,d.A)();if(!e.cookies?.[i]?.match(/./))return null;let u=(0,t.A)({encryptedString:e.cookies[i]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||a&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let o=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!o)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(a&&!n().existsSync(`${o}/${c.csrf_k}`))return null;if(0==c.verification_status&&!a){let e=await (0,r.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&s.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,s,a)=>{a.d(s,{A:()=>r});function r(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",a=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=s;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=a;let d=s;e?.userId&&(d+=`user_${e.userId}_`),i&&(d+=`${i}_`),d+=r;let l=s;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:n,csrfCookieName:d,oneTimeCodeName:l+=t}}},96052:(e,s,a)=>{a.r(s),a.d(s,{default:()=>d});var r=a(29021),t=a.n(r),i=a(21572);let n=a.n(i)().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 d({to:e,subject:s,text:a,html:r,alias:i,senderName:d}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let u=(i?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!t().existsSync("./email/index.html"))return;let c=t().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,r||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let r={};r.from=`"${d||"Datasquirel"}" <${u}>`,r.sender=u,i&&(r.replyTo=u),r.to=e,r.subject=s,r.text=a,r.html=c,l=await n.sendMail(r)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return l}},95969:(e,s,a)=>{a.d(s,{A:()=>i});var r=a(55511),t=a(79428);function i({encryptedString:e,encryptionKey:s,encryptionSalt:a}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=s||process.env.DSQL_ENCRYPTION_PASSWORD,n=a||process.env.DSQL_ENCRYPTION_SALT,d=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,r.scryptSync)(i,n,d),u=t.Buffer.alloc(16,0),c=(0,r.createDecipheriv)("aes-192-cbc",l,u);try{let s=c.update(e,"hex","utf8");return s+=c.final("utf8")}catch(s){return console.log("Error in decrypting =>",s.message),e}}},83919:(e,s,a)=>{a.d(s,{A:()=>t});var r=a(55511);function t({password:e,encryptionKey:s}){let a=s||process.env.DSQL_ENCRYPTION_PASSWORD;if(!a?.match(/.{8,}/))throw Error("Encryption key is invalid");let t=(0,r.createHmac)("sha512",a);return t.update(e),t.digest("base64")}}};var s=require("../../webpack-api-runtime.js");s.C(e);var a=e=>s(s.s=e),r=s.X(0,[1251],()=>a(70955));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUserUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/addUserUser.js.nft.json index 377570b..3a4d399 100644 --- a/dsql-app/.local_dist/server/pages/api/addUserUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addUserUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js b/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js index 88daada..612f138 100644 --- a/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js +++ b/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4436,e.ids=[4436],e.modules={60818:e=>{e.exports=require("dotenv")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},13461:(e,a,t)=>{t.r(a),t.d(a,{config:()=>y,default:()=>T,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>R});var r=t(89947),l=t(2706),i=t(96762),d=t(51348),u=t.n(d),n=t(48225),o=t.n(n),_=t(6420),p=t.n(_),f=t(47670),m=t.n(f),c=t(19261),b=t.n(c);let N=t(29021);t(33873);let{execSync:A}=t(79646);async function R(e,a){if("POST"!==e.method)return a.json({msg:"Failed!"});let s=await p()(e,a,!0);if(!s)return a.json({success:!1,msg:"Unauthorized"});let{dbFullName:r,dbSlug:l,dbId:i}=e.body,d=t(8693),n=t(95610),_=[...n.slice(0,2),...d.fields,...n.slice(2)];d.fields=[..._];try{let e;let t=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s.id}/main.json`,n=JSON.parse(N.readFileSync(t,"utf8")),_=n.filter(e=>e.dbFullName===r)[0],p=_.tables.filter((a,t)=>{if("users"===a.tableName)return e=t,!0});if(p?.[0]&&"number"==typeof e?_.tables[e]=d:_.tables.push(d),_.childrenDatabases)for(let e=0;e<_.childrenDatabases.length;e++){let a=_.childrenDatabases[e];try{n.filter(e=>e.dbFullName===a.dbFullName)[0].tables=_.tables;let e=await u()("SELECT * FROM user_databases WHERE user_id = ? AND db_full_name = ?",[s.id,a.dbFullName]);await m()({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:s.id,db_id:e[0].id,db_slug:e[0].db_slug,table_name:"Users",table_slug:"users"}})}catch(e){o()({component:"/api/addUsersTableToDatabase/lines-100-115",message:e.message,user:s})}}N.writeFileSync(`${t}`,JSON.stringify(n),"utf8"),await m()({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:s.id,db_id:i,db_slug:l,table_name:"Users",table_slug:"users"}});let f=r.replace(/[^a-z\_0-9]/g,"");await b()({userId:s.id,targetDatabase:f}),a.json({success:!0})}catch(e){o()({component:"/api/addUsersTableToDatabase/main-catch-error",message:e.message,user:s}),a.json({success:!1,msg:"Database Files could not be written!"})}}let T=(0,i.M)(s,"default"),y=(0,i.M)(s,"config"),S=new r.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/addUsersTableToDatabase",pathname:"/api/addUsersTableToDatabase",bundlePath:"",filename:""},userland:s})},6420:(e,a,t)=>{t(81630);let s=t(51348),r=t(72835),l=t(29021),i=t(31341);async function d(e,a,t,d){let{keyCookieName:u,csrfCookieName:n}=i();if(!e.cookies?.[u]?.match(/./))return null;let o=r({encryptedString:e.cookies[u]});if(!o)return null;let _=JSON.parse(o);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!l.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&a.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=d},31341:e=>{e.exports=function(e){let a=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",r=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=a;e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),i+=t;let d=a;e?.userId&&(d+=`user_${e.userId}_`),l&&(d+=`${l}_`),d+=s;let u=a;return e?.userId&&(u+=`user_${e.userId}_`),l&&(u+=`${l}_`),{keyCookieName:i,csrfCookieName:d,oneTimeCodeName:u+=r}}},8693:e=>{e.exports=JSON.parse('{"tableName":"users","tableFullName":"Users","fields":[{"fieldName":"first_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"last_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"email","dataType":"VARCHAR(200)","notNullValue":true},{"fieldName":"phone","dataType":"VARCHAR(50)"},{"fieldName":"user_type","dataType":"VARCHAR(20)","defaultValue":"default"},{"fieldName":"username","dataType":"VARCHAR(100)","nullValue":true},{"fieldName":"password","dataType":"TEXT"},{"fieldName":"image","dataType":"VARCHAR(250)"},{"fieldName":"image_thumbnail","dataType":"VARCHAR(250)"},{"fieldName":"address","dataType":"VARCHAR(255)"},{"fieldName":"city","dataType":"VARCHAR(50)"},{"fieldName":"state","dataType":"VARCHAR(50)"},{"fieldName":"country","dataType":"VARCHAR(50)"},{"fieldName":"zip_code","dataType":"VARCHAR(50)"},{"fieldName":"social_login","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"social_platform","dataType":"VARCHAR(50)","nullValue":true},{"fieldName":"social_id","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"more_user_data","dataType":"BIGINT","defaultValue":"0"},{"fieldName":"verification_status","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"temp_login_code","dataType":"VARCHAR(50)","nullValue":true}]}')}};var a=require("../../webpack-api-runtime.js");a.C(e);var t=e=>a(a.s=e),s=a.X(0,[4050,2451],()=>t(13461));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4436,e.ids=[4436],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},32551:(e,a,s)=>{s.r(a),s.d(a,{config:()=>b,default:()=>p,routeModule:()=>A});var t={};s.r(t),s.d(t,{default:()=>c});var l=s(89947),r=s(2706),d=s(96762),i=s(48786),u=s(67619),n=s(69842),o=s(98e3),_=s(76856);let f=s(29021);s(33873);let{execSync:m}=s(79646);async function c(e,a){if("POST"!==e.method)return a.json({msg:"Failed!"});let t=await (0,n.A)(e,a,!0);if(!t)return a.json({success:!1,msg:"Unauthorized"});let{dbFullName:l,dbSlug:r,dbId:d}=e.body,m=s(8693),c=s(95610),p=[...c.slice(0,2),...m.fields,...c.slice(2)];m.fields=[...p];try{let e;let s=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,n=JSON.parse(f.readFileSync(s,"utf8")),c=n.filter(e=>e.dbFullName===l)[0],p=c.tables.filter((a,s)=>{if("users"===a.tableName)return e=s,!0});if(p?.[0]&&"number"==typeof e?c.tables[e]=m:c.tables.push(m),c.childrenDatabases)for(let e=0;ee.dbFullName===a.dbFullName)[0].tables=c.tables;let e=await (0,i.A)("SELECT * FROM user_databases WHERE user_id = ? AND db_full_name = ?",[t.id,a.dbFullName]);await (0,o.A)({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:t.id,db_id:e[0].id,db_slug:e[0].db_slug,table_name:"Users",table_slug:"users"}})}catch(e){(0,u.default)({component:"/api/addUsersTableToDatabase/lines-100-115",message:e.message,user:t})}}f.writeFileSync(`${s}`,JSON.stringify(n),"utf8"),await (0,o.A)({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:t.id,db_id:d,db_slug:r,table_name:"Users",table_slug:"users"}});let b=l.replace(/[^a-z\_0-9]/g,"");await (0,_.A)({userId:t.id,targetDatabase:b}),a.json({success:!0})}catch(e){(0,u.default)({component:"/api/addUsersTableToDatabase/main-catch-error",message:e.message,user:t}),a.json({success:!1,msg:"Database Files could not be written!"})}}let p=(0,d.M)(t,"default"),b=(0,d.M)(t,"config"),A=new l.PagesAPIRouteModule({definition:{kind:r.A.PAGES_API,page:"/api/addUsersTableToDatabase",pathname:"/api/addUsersTableToDatabase",bundlePath:"",filename:""},userland:t})},69842:(e,a,s)=>{s.d(a,{A:()=>u});var t=s(48786),l=s(95969),r=s(29021),d=s.n(r),i=s(89159);async function u(e,a,s){let{keyCookieName:r,csrfCookieName:u}=(0,i.A)();if(!e.cookies?.[r]?.match(/./))return null;let n=(0,l.A)({encryptedString:e.cookies[r]});if(!n)return null;let o=JSON.parse(n);if(!o.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(o.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!d().existsSync(`${_}/${o.csrf_k}`))return null;if(0==o.verification_status&&!s){let e=await (0,t.A)(`SELECT verification_status FROM users WHERE id='${o.id}'`);e&&e[0]&&1==e[0].verification_status&&a.setHeader("Set-Cookie",["user_refresh=1"])}return o?.date&&Date.now()-o.date>6048e5?null:o}},89159:(e,a,s)=>{s.d(a,{A:()=>t});function t(e){let a=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",l=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",r=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),d=a;e?.userId&&(d+=`user_${e.userId}_`),r&&(d+=`${r}_`),d+=s;let i=a;e?.userId&&(i+=`user_${e.userId}_`),r&&(i+=`${r}_`),i+=t;let u=a;return e?.userId&&(u+=`user_${e.userId}_`),r&&(u+=`${r}_`),{keyCookieName:d,csrfCookieName:i,oneTimeCodeName:u+=l}}},8693:e=>{e.exports=JSON.parse('{"tableName":"users","tableFullName":"Users","fields":[{"fieldName":"first_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"last_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"email","dataType":"VARCHAR(200)","notNullValue":true},{"fieldName":"phone","dataType":"VARCHAR(50)"},{"fieldName":"user_type","dataType":"VARCHAR(20)","defaultValue":"default"},{"fieldName":"username","dataType":"VARCHAR(100)","nullValue":true},{"fieldName":"password","dataType":"TEXT"},{"fieldName":"image","dataType":"VARCHAR(250)"},{"fieldName":"image_thumbnail","dataType":"VARCHAR(250)"},{"fieldName":"address","dataType":"VARCHAR(255)"},{"fieldName":"city","dataType":"VARCHAR(50)"},{"fieldName":"state","dataType":"VARCHAR(50)"},{"fieldName":"country","dataType":"VARCHAR(50)"},{"fieldName":"zip_code","dataType":"VARCHAR(50)"},{"fieldName":"social_login","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"social_platform","dataType":"VARCHAR(50)","nullValue":true},{"fieldName":"social_id","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"more_user_data","dataType":"BIGINT","defaultValue":"0"},{"fieldName":"verification_status","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"temp_login_code","dataType":"VARCHAR(50)","nullValue":true}]}')}};var a=require("../../webpack-api-runtime.js");a.C(e);var s=e=>a(a.s=e),t=a.X(0,[1251,2282],()=>s(32551));module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js.nft.json b/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js.nft.json index c207249..adc6921 100644 --- a/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/addUsersTableToDatabase.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.env","../../../../jsonData/dbSchemas/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package-shared/data/presets/users.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/main.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package-shared/data/presets/users.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js b/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js index 940578b..8570976 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js +++ b/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9171,e.ids=[9171],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")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},21820:e=>{e.exports=require("os")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},55535:(e,r,s)=>{s.r(r),s.d(r,{config:()=>f,default:()=>E,routeModule:()=>v});var t={};s.r(t),s.d(t,{default:()=>D});var n=s(89947),o=s(2706),c=s(96762),a=s(51348),u=s.n(a),i=s(19131),l=s.n(i);let _=s(29021),p=s(21820),{execSync:d,spawnSync:S}=s(79646);async function D(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let s=await l()(e);if(!s?.logged_in_status)return r.json({success:!1,log:"Unauthorized"});try{let s=e.body.user.id.toString().replace(/[^0-9]/g,"").replace(/\//g,""),t=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s}/backups`;_.existsSync(t)||_.mkdirSync(t);let n=Date.now().toString();_.mkdirSync(`${t}/${n}`);let o=await u()("SHOW databases LIKE ?",[`datasquirel_user_${s}_%`]);for(let e=0;e ${u}`;console.log(`addUserBackup.js exe => ${i}`),S(c,["-u",process.env.DSQL_DB_USERNAME,"-h",process.env.DSQL_DB_HOST,`-p${process.env.DSQL_DB_PASSWORD}`,s,">",u],a)}_.copyFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s}/main.json`,`${t}/${n}/main.json`),r.json({success:!0})}catch(e){console.log(e.message),r.json({success:!1})}}let E=(0,c.M)(t,"default"),f=(0,c.M)(t,"config"),v=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/addUserBackup",pathname:"/api/admin/addUserBackup",bundlePath:"",filename:""},userland:t})},19131:(e,r,s)=>{let{IncomingMessage:t}=s(81630),n=s(72835),o=s(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:s}=o(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let c=n({encryptedString:e.cookies[t]});if(!c)return console.log("No user payload found"),null;let a=JSON.parse(c);return a.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):a.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):a}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=s;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),{keyCookieName:c,csrfCookieName:a,oneTimeCodeName:u+=n}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let c=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=s||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!c?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=n("aes-192-cbc",t(c,a,u),o.alloc(16,0));try{let r=i.update(e,"hex","utf8");return r+=i.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),o=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function c(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=c},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=55535);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9171,e.ids=[9171],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},21820:e=>{e.exports=require("os")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},99323:(e,r,s)=>{s.r(r),s.d(r,{config:()=>E,default:()=>S,routeModule:()=>f});var n={};s.r(n),s.d(n,{default:()=>p});var o=s(89947),t=s(2706),c=s(96762),a=s(48786),i=s(87369);let u=s(29021),l=s(21820),{execSync:_,spawnSync:d}=s(79646);async function p(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let s=await (0,i.A)(e);if(!s?.logged_in_status)return r.json({success:!1,log:"Unauthorized"});try{let s=e.body.user.id.toString().replace(/[^0-9]/g,"").replace(/\//g,""),n=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s}/backups`;u.existsSync(n)||u.mkdirSync(n);let o=Date.now().toString();u.mkdirSync(`${n}/${o}`);let t=await (0,a.A)("SHOW databases LIKE ?",[`datasquirel_user_${s}_%`]);for(let e=0;e ${i}`;console.log(`addUserBackup.ts exe => ${u}`),d(c,["-u",process.env.DSQL_DB_USERNAME,"-h",process.env.DSQL_DB_HOST,`-p${process.env.DSQL_DB_PASSWORD}`,s,">",i],a)}u.copyFileSync(`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s}/main.json`,`${n}/${o}/main.json`),r.json({success:!0})}catch(e){console.log(e.message),r.json({success:!1})}}let S=(0,c.M)(n,"default"),E=(0,c.M)(n,"config"),f=new o.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/admin/addUserBackup",pathname:"/api/admin/addUserBackup",bundlePath:"",filename:""},userland:n})},87369:(e,r,s)=>{s.d(r,{A:()=>t});var n=s(95969),o=s(89159);async function t(e){let{keyCookieName:r,csrfCookieName:s}=(0,o.A)(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let c=(0,n.A)({encryptedString:e.cookies[t]});if(!c)return console.log("No user payload found"),null;let a=JSON.parse(c);return a.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):a.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):a}},89159:(e,r,s)=>{s.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",o=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",t=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),c=r;e?.userId&&(c+=`user_${e.userId}_`),t&&(c+=`${t}_`),c+=s;let a=r;e?.userId&&(a+=`user_${e.userId}_`),t&&(a+=`${t}_`),a+=n;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),t&&(i+=`${t}_`),{keyCookieName:c,csrfCookieName:a,oneTimeCodeName:i+=o}}},95969:(e,r,s)=>{s.d(r,{A:()=>t});var n=s(55511),o=s(79428);function t({encryptedString:e,encryptionKey:r,encryptionSalt:s}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let t=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=s||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!t?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,n.scryptSync)(t,c,a),u=o.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",i,u);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,s)=>{s.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let s=await r.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=99323);module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js.nft.json index 2fb36eb..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/addUserBackup.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js b/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js index fa835df..580d397 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js +++ b/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4785,e.ids=[4785],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,o){return o in r?r[o]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,o)):"function"==typeof r&&"default"===o?r:void 0}}})},6126:(e,r,o)=>{o.r(r),o.d(r,{config:()=>p,default:()=>_,routeModule:()=>E});var s={};o.r(s),o.d(s,{default:()=>d});var t=o(89947),n=o(2706),u=o(96762),i=o(19131),l=o.n(i);let{execSync:c}=o(79646),a=o(29021);async function d(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let o=await l()(e);if(!o?.logged_in_status)return r.json({success:!1,log:"No Logs"});a.writeFileSync("./.tmp/error.log","","utf-8"),r.json({success:!0})}let _=(0,u.M)(s,"default"),p=(0,u.M)(s,"config"),E=new t.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/admin/clearErrorLogs",pathname:"/api/admin/clearErrorLogs",bundlePath:"",filename:""},userland:s})},19131:(e,r,o)=>{let{IncomingMessage:s}=o(81630),t=o(72835),n=o(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:o}=n(),s=`${r}_su`;if(!e.cookies?.[s])return console.log("No auth key cookie found"),null;let u=t({encryptedString:e.cookies[s]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",o=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),u+=o;let i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:l+=t}}},72835:(e,r,o)=>{let{scryptSync:s,createDecipheriv:t}=o(55511),{Buffer:n}=o(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:o})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let u=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=o||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!u?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=t("aes-192-cbc",s(u,i,l),n.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var o;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return o}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(o||(o={}))},89947:(e,r,o)=>{e.exports=o(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var o=r(r.s=6126);module.exports=o})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4785,e.ids=[4785],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,n){return n in r?r[n]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,n)):"function"==typeof r&&"default"===n?r:void 0}}})},91963:(e,r,n)=>{n.r(r),n.d(r,{config:()=>_,default:()=>d,routeModule:()=>p});var o={};n.r(o),n.d(o,{default:()=>a});var s=n(89947),t=n(2706),u=n(96762),i=n(87369);let{execSync:c}=n(79646),l=n(29021);async function a(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let n=await (0,i.A)(e);if(!n?.logged_in_status)return r.json({success:!1,log:"No Logs"});l.writeFileSync("./.tmp/error.log","","utf-8"),r.json({success:!0})}let d=(0,u.M)(o,"default"),_=(0,u.M)(o,"config"),p=new s.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/admin/clearErrorLogs",pathname:"/api/admin/clearErrorLogs",bundlePath:"",filename:""},userland:o})},87369:(e,r,n)=>{n.d(r,{A:()=>t});var o=n(95969),s=n(89159);async function t(e){let{keyCookieName:r,csrfCookieName:n}=(0,s.A)(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let u=(0,o.A)({encryptedString:e.cookies[t]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},89159:(e,r,n)=>{n.d(r,{A:()=>o});function o(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",n=process.env.DSQL_COOKIES_KEY_NAME||"key",o=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",t=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),t&&(u+=`${t}_`),u+=n;let i=r;e?.userId&&(i+=`user_${e.userId}_`),t&&(i+=`${t}_`),i+=o;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),t&&(c+=`${t}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:c+=s}}},95969:(e,r,n)=>{n.d(r,{A:()=>t});var o=n(55511),s=n(79428);function t({encryptedString:e,encryptionKey:r,encryptionSalt:n}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let t=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=n||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!t?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,o.scryptSync)(t,u,i),l=s.Buffer.alloc(16,0),a=(0,o.createDecipheriv)("aes-192-cbc",c,l);try{let r=a.update(e,"hex","utf8");return r+=a.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var n=r(r.s=91963);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/clearErrorLogs.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/clientError.js b/dsql-app/.local_dist/server/pages/api/admin/clientError.js index 6d49230..efb2d44 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/clientError.js +++ b/dsql-app/.local_dist/server/pages/api/admin/clientError.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var e={};e.id=4396,e.ids=[4396],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},24351:(e,r,t)=>{t.r(r),t.d(r,{config:()=>c,default:()=>u,routeModule:()=>d});var n={};t.r(n),t.d(n,{default:()=>l});var s=t(89947),i=t(2706),o=t(96762);t(59474);let a=t(29021);async function l(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Failed"});let{component:t,message:n,user:s}=e.body,i=`💻 CLIENT ERROR =========================== -User Id: ${s?.id} -User Name: ${s?.first_name} ${s?.last_name} -User Email: ${s?.email} +"use strict";(()=>{var e={};e.id=4396,e.ids=[4396],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},80371:(e,r,t)=>{t.r(r),t.d(r,{config:()=>l,default:()=>d,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>s});var i=t(89947),o=t(2706),a=t(96762);let u=t(29021);async function s(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Failed"});let{component:t,message:n,user:i}=e.body,o=`💻 CLIENT ERROR =========================== +User Id: ${i?.id} +User Name: ${i?.first_name} ${i?.last_name} +User Email: ${i?.email} Error Message: ${n} Component: ${t} Date: ${Date()} -========================================`,o=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",i),a.appendFileSync("./.tmp/error.log",` +========================================`,a=u.readFileSync("./.tmp/error.log","utf-8");u.writeFileSync("./.tmp/error.log",o),u.appendFileSync("./.tmp/error.log",` -${o}`),r.json({success:!0})}let u=(0,o.M)(n,"default"),c=(0,o.M)(n,"config"),d=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/admin/clientError",pathname:"/api/admin/clientError",bundlePath:"",filename:""},userland:n})},59474:(e,r,t)=>{let n=t(29021),s=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:i,alias:o}){let a;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(!n.existsSync("./email/index.html"))return;let u=n.readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,i||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let n={};n.from=`"Datasquirel" <${l}>`,n.sender=l,o&&(n["replyTo "]=l),n.to=e,n.subject=r,n.text=t,n.html=u,a=await s.sendMail(n)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return a}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=24351);module.exports=t})(); \ No newline at end of file +${a}`),r.json({success:!0})}let d=(0,a.M)(n,"default"),l=(0,a.M)(n,"config"),p=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/clientError",pathname:"/api/admin/clientError",bundlePath:"",filename:""},userland:n})},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=80371);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/clientError.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/clientError.js.nft.json index dc31431..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/clientError.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/clientError.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js b/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js index 46f0e57..f5bce38 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js +++ b/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=9885,e.ids=[9885],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},21820:e=>{e.exports=require("os")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},75865:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>E,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>f});var n=t(89947),o=t(2706),a=t(96762),l=t(93209),i=t.n(l),c=t(48225),u=t.n(c),d=t(19131),p=t.n(d);let _=t(29021),S=t(21820),{execSync:m}=t(79646);async function f(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed"});let t=await p()(e);if(!t?.logged_in_status)return r.json({success:!1,log:"No Logs"});let s="./.tmp/backups";_.existsSync(s)||_.mkdirSync("./.tmp/backups");let n=Date.now().toString();_.mkdirSync(`${s}/${n}`);let o=S.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysqldump.exe'":"mysqldump";try{let e={cwd:process.cwd()},t=`${s}/${n}/datasquirel.sql`;S.platform().match(/win/i)&&(e.shell="bash.exe");let a=`${o} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} datasquirel > ${t}`;console.log(`createNewBackup.js exe => ${a}`),m(a,e),_.copyFileSync("./jsonData/dbSchemas/main.json",`${s}/${n}/datasquirelSchema.json`),i()({rootFolderPath:`${process.env.DSQL_USER_DB_SCHEMA_PATH}`,destinationFolderPath:`${s}/${n}/userSchemas`}),r.json({success:!0})}catch(e){r.json({success:!1}),u()({component:"/api/admin/createNewBackup/lines-73-90",message:e.message})}}let E=(0,a.M)(s,"default"),y=(0,a.M)(s,"config"),g=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/createNewBackup",pathname:"/api/admin/createNewBackup",bundlePath:"",filename:""},userland:s})},93209:(e,r,t)=>{let s=t(29021);e.exports=function({rootFolderPath:e,destinationFolderPath:r}){try{return s.mkdirSync(r),function e(r,t){let n=s.readdirSync(r);for(let o=0;o{let{IncomingMessage:s}=t(81630),n=t(72835),o=t(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:t}=o(),s=`${r}_su`;if(!e.cookies?.[s])return console.log("No auth key cookie found"),null;let a=n({encryptedString:e.cookies[s]});if(!a)return console.log("No user payload found"),null;let l=JSON.parse(a);return l.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):l.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):l}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),l+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),{keyCookieName:a,csrfCookieName:l,oneTimeCodeName:i+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let a=new Date,l=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=9885,e.ids=[9885],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},21820:e=>{e.exports=require("os")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},57856:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>m,routeModule:()=>y});var n={};t.r(n),t.d(n,{default:()=>S});var s=t(89947),o=t(2706),a=t(96762),c=t(29021),i=t.n(c),l=t(21820),u=t.n(l),d=t(79646),p=t(67619),_=t(87369);async function S(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed"});let t=await (0,_.A)(e);if(!t?.logged_in_status)return r.json({success:!1,log:"No Logs"});let n="./.tmp/backups";i().existsSync(n)||i().mkdirSync("./.tmp/backups");let s=Date.now().toString();i().mkdirSync(`${n}/${s}`);let o=u().platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysqldump.exe'":"mysqldump";try{let e={cwd:process.cwd()},t=`${n}/${s}/datasquirel.sql`;u().platform().match(/win/i)&&(e.shell="bash.exe");let a=`${o} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} datasquirel > ${t}`;console.log(`createNewBackup.ts exe => ${a}`),(0,d.execSync)(a,e),i().copyFileSync("./jsonData/dbSchemas/main.json",`${n}/${s}/datasquirelSchema.json`),function({rootFolderPath:e,destinationFolderPath:r}){try{i().mkdirSync(r),function e(r,t){let n=i().readdirSync(r);for(let s=0;s{t.d(r,{A:()=>o});var n=t(95969),s=t(89159);async function o(e){let{keyCookieName:r,csrfCookieName:t}=(0,s.A)(),o=`${r}_su`;if(!e.cookies?.[o])return console.log("No auth key cookie found"),null;let a=(0,n.A)({encryptedString:e.cookies[o]});if(!a)return console.log("No user payload found"),null;let c=JSON.parse(a);return c.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):c.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):c}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=n;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),{keyCookieName:a,csrfCookieName:c,oneTimeCodeName:i+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(29021),s=t.n(n);async function o({user:e,message:r,component:t,noMail:n,req:o}){let a=new Date,c=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||o.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),o?.url&&(n+=` URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),l&&(n+=` -IP: ${l}`),n+=` +Request Body: ${JSON.stringify(o.body,null,4)}`),c&&(n+=` +IP: ${c}`),n+=` Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let i=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(a,l,i),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=75865);module.exports=t})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511),s=t(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,n.scryptSync)(o,a,c),l=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",i,l);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=57856);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/createNewBackup.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js b/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js index b40e0fc..c4859c4 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js +++ b/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2927,e.ids=[2927],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},24296:(e,t,a)=>{a.r(t),a.d(t,{config:()=>N,default:()=>I,routeModule:()=>O});var r={};a.r(r),a.d(r,{default:()=>h});var s=a(89947),n=a(2706),l=a(96762),o=a(77509),i=a.n(o),d=a(73921),c=a.n(d),u=a(29131),p=a.n(u),_=a(30573),E=a.n(_),g=a(6983),f=a.n(g),S=a(46238),m=a.n(S),y=a(19131),v=a.n(y);async function h(e,t){if("POST"!==e.method)return t.json({success:!1,msg:"Wrong Method"});let a=await v()(e);if(!a?.logged_in_status)return t.json({success:!1,log:"Unauthorized"});let{action:r}=e.query,s=e.body;try{let e;switch(r){case"add-page":e=await i()({body:s});break;case"update-page":e=await i()({body:s,update:!0});break;case"delete-page":e=await c()({body:s});break;case"get-snippets":e=await p()();break;case"grab-parent-pages":e=await f()({body:s});break;case"get-child-pages":e=await E()({body:s});break;case"persist":e=await m()({body:s})}if(!e)throw Error("Operation failed!");t.json({success:!0,result:e})}catch(e){t.json({success:!1})}}let I=(0,l.M)(r,"default"),N=(0,l.M)(r,"config"),O=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/admin/docs/[action]",pathname:"/api/admin/docs/[action]",bundlePath:"",filename:""},userland:r})},77509:(e,t,a)=>{let r=a(72583),s=a(51348),n=a(47670),l=a(16570);e.exports=async function({body:e,update:t}){let a=e.title.toLowerCase().replace(/ /g,"-").replace(/[^a-z0-9\-]/g,""),o=await async function(){if(t)return null;try{return(await s("SELECT page_order FROM docs_pages ORDER BY page_order DESC LIMIT 1"))[0].page_order}catch(e){return null}}(),i=await n({data:{title:e.title,slug:a,description:r(e.description,l),content:r(e.content,l),text_content:e.text_content,level:e.level,page_order:t?e.page_order:parseInt(o)+1,parent_id:e?.parent_id},tableName:"docs_pages",update:t,duplicateColumnName:"id",duplicateColumnValue:e.id});return i?.insertId?i:t&&i.affectedRows?i:null}},73921:(e,t,a)=>{let r=a(51348);e.exports=async function({body:e}){return await r("DELETE FROM docs_pages WHERE id=?",[e.id])||null}},29131:(e,t,a)=>{let r=a(29021);e.exports=async function(){let e="./components/su/components/RichText/html-presets",t=[];return r.existsSync(e)&&r.readdirSync(e).forEach(a=>{if(a?.endsWith(".html")){let s={};s[a.replace(/\.html$/,"")]=r.readFileSync(`${e}/${a}`,"utf-8"),t.push({...s})}}),t}},30573:(e,t,a)=>{a(29021);let r=a(51348);e.exports=async function({body:e}){let t=await r("SELECT id, title, slug FROM docs_pages WHERE parent_id = ?",[e.pageId]);return t[0]?t:null}},6983:(e,t,a)=>{let r=a(51348);e.exports=async function({body:e}){return e?.currentPageId?await r("SELECT * FROM docs_pages WHERE level = ? AND id != ?",[e.pagesLevel,e.currentPageId]):await r("SELECT * FROM docs_pages WHERE level = ?",[e.pagesLevel])}},46238:(e,t,a)=>{let r=a(29021),s=a(51348);e.exports=async function({body:e}){let{pull:t}=e,a="./jsonData/docs.json";if(t)try{let e=JSON.parse(r.readFileSync(a,"utf-8"));for(let t=0;t{let{IncomingMessage:r}=a(81630),s=a(72835),n=a(31341);e.exports=async function(e){let{keyCookieName:t,csrfCookieName:a}=n(),r=`${t}_su`;if(!e.cookies?.[r])return console.log("No auth key cookie found"),null;let l=s({encryptedString:e.cookies[r]});if(!l)return console.log("No user payload found"),null;let o=JSON.parse(l);return o.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):o.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):o}},31341:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",a=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=t;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=a;let o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=r;let i=t;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:l,csrfCookieName:o,oneTimeCodeName:i+=s}}},72835:(e,t,a)=>{let{scryptSync:r,createDecipheriv:s}=a(55511),{Buffer:n}=a(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:a})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=a||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=s("aes-192-cbc",r(l,o,i),n.alloc(16,0));try{let t=d.update(e,"hex","utf8");return t+=d.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}}};var t=require("../../../../webpack-api-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[4050],()=>a(24296));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2927,e.ids=[2927],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},40806:(e,t,a)=>{a.r(t),a.d(t,{config:()=>h,default:()=>I,routeModule:()=>N});var r={};a.r(r),a.d(r,{default:()=>A});var s=a(89947),n=a(2706),l=a(96762),o=a(72583),d=a.n(o),i=a(48786),c=a(98e3),u=a(92652);async function p({body:e,update:t}){let a=e.title.toLowerCase().replace(/ /g,"-").replace(/[^a-z0-9\-]/g,""),r=await async function(){if(t)return null;try{return(await (0,i.A)("SELECT page_order FROM docs_pages ORDER BY page_order DESC LIMIT 1"))[0].page_order}catch(e){return null}}(),s=await (0,c.A)({data:{title:e.title,slug:a,description:d()(e.description,u.A),content:d()(e.content,u.A),text_content:e.text_content,level:e.level,page_order:t?e.page_order:parseInt(r)+1,parent_id:e?.parent_id},tableName:"docs_pages",update:t,duplicateColumnName:"id",duplicateColumnValue:e.id});return s?.insertId?s:t&&s.affectedRows?s:null}async function _({body:e}){return await (0,i.A)("DELETE FROM docs_pages WHERE id=?",[e.id])||null}var E=a(29021),g=a.n(E);async function f(){let e="./components/su/components/RichText/html-presets",t=[];return g().existsSync(e)&&g().readdirSync(e).forEach(a=>{if(a?.endsWith(".html")){let r={};r[a.replace(/\.html$/,"")]=g().readFileSync(`${e}/${a}`,"utf-8"),t.push({...r})}}),t}async function S({body:e}){let t=await (0,i.A)("SELECT id, title, slug FROM docs_pages WHERE parent_id = ?",[e.pageId]);return t[0]?t:null}async function y({body:e}){return e?.currentPageId?await (0,i.A)("SELECT * FROM docs_pages WHERE level = ? AND id != ?",[e.pagesLevel,e.currentPageId]):await (0,i.A)("SELECT * FROM docs_pages WHERE level = ?",[e.pagesLevel])}async function m({body:e}){let{pull:t}=e,a="./jsonData/docs.json";if(t)try{let e=JSON.parse(g().readFileSync(a,"utf-8"));for(let t=0;t{a.d(t,{A:()=>n});var r=a(95969),s=a(89159);async function n(e){let{keyCookieName:t,csrfCookieName:a}=(0,s.A)(),n=`${t}_su`;if(!e.cookies?.[n])return console.log("No auth key cookie found"),null;let l=(0,r.A)({encryptedString:e.cookies[n]});if(!l)return console.log("No user payload found"),null;let o=JSON.parse(l);return o.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):o.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):o}},89159:(e,t,a)=>{a.d(t,{A:()=>r});function r(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",a=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=t;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=a;let o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=r;let d=t;return e?.userId&&(d+=`user_${e.userId}_`),n&&(d+=`${n}_`),{keyCookieName:l,csrfCookieName:o,oneTimeCodeName:d+=s}}},95969:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(55511),s=a(79428);function n({encryptedString:e,encryptionKey:t,encryptionSalt:a}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=t||process.env.DSQL_ENCRYPTION_PASSWORD,l=a||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=(0,r.scryptSync)(n,l,o),i=s.Buffer.alloc(16,0),c=(0,r.createDecipheriv)("aes-192-cbc",d,i);try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}}};var t=require("../../../../webpack-api-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[1251],()=>a(40806));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js.nft.json index 211caea..2b74389 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/docs/[action].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js b/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js index eb211b1..8fee69f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js +++ b/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=5905,e.ids=[5905],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},62347:(e,r,s)=>{s.r(r),s.d(r,{config:()=>d,default:()=>_,routeModule:()=>S});var t={};s.r(t),s.d(t,{default:()=>p});var n=s(89947),o=s(2706),a=s(96762),c=s(57638),l=s.n(c);s(48225);var i=s(19131),u=s.n(i);async function p(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let s=await u()(e);if(!s?.logged_in_status)return r.json({success:!1,log:"No Logs"});let{database:t}=e.query;try{let e=await l()({database:"string"==typeof t?t:"",queryString:`SHOW TABLES FROM ${t}`});if(!e)return r.json({success:!1,msg:"Query Failed!"});r.json({success:!0,tables:e.map(e=>Object.values(e)[0])})}catch(e){console.log(e.message),r.json({success:!1})}}s(29021);let _=(0,a.M)(t,"default"),d=(0,a.M)(t,"config"),S=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/getTablesForUserDatabase",pathname:"/api/admin/getTablesForUserDatabase",bundlePath:"",filename:""},userland:t})},19131:(e,r,s)=>{let{IncomingMessage:t}=s(81630),n=s(72835),o=s(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:s}=o(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let a=n({encryptedString:e.cookies[t]});if(!a)return console.log("No user payload found"),null;let c=JSON.parse(a);return c.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):c.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):c}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=t;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:a,csrfCookieName:c,oneTimeCodeName:l+=n}}},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,s)=>{let t=s(72835),n=s(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let s=[];try{for(let o=0;o",r.message),e}}},48225:(e,r,s)=>{let t=s(29021),{IncomingMessage:n}=s(81630);e.exports=async function({user:e,message:r,component:s,noMail:n,req:o}){let a=new Date,c=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],s=o.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||t||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=5905,e.ids=[5905],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},10291:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>i,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>u});var s=t(89947),a=t(2706),o=t(96762),l=t(30944),c=t(87369);async function u(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let t=await (0,c.A)(e);if(!t?.logged_in_status)return r.json({success:!1,log:"No Logs"});let{database:n}=e.query;try{let e=await (0,l.A)({database:"string"==typeof n?n:"",queryString:`SHOW TABLES FROM ${n}`});if(!e)return r.json({success:!1,msg:"Query Failed!"});r.json({success:!0,tables:e.map(e=>Object.values(e)[0])})}catch(e){console.log(e.message),r.json({success:!1})}}let i=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),p=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/admin/getTablesForUserDatabase",pathname:"/api/admin/getTablesForUserDatabase",bundlePath:"",filename:""},userland:n})},87369:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969),s=t(89159);async function a(e){let{keyCookieName:r,csrfCookieName:t}=(0,s.A)(),a=`${r}_su`;if(!e.cookies?.[a])return console.log("No auth key cookie found"),null;let o=(0,n.A)({encryptedString:e.cookies[a]});if(!o)return console.log("No user payload found"),null;let l=JSON.parse(o);return l.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):l.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=n;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:c+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function a({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},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,l=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(n+=` -URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),c&&(n+=` -IP: ${c}`),n+=` -Date: ${a.toDateString()} -========================================`,t.existsSync("./.tmp/error.log")||t.writeFileSync("./.tmp/error.log","","utf-8");let l=t.readFileSync("./.tmp/error.log","utf-8");t.writeFileSync("./.tmp/error.log",n),t.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),a?.url&&(n+=` +URL: ${a.url}`),a?.body&&(n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` +Date: ${o.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let c=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,s)=>{s(29021);let t=s(6061),n=s(48225),o=s(51348),a=s(21339),c=s(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:s,tableSchema:l,useLocal:i}){let u;let p=!!i||!!s?.match(/^datasquirel$/),_=i?c:p?o:a;try{u=e&&r&&Array.isArray(r)&&r[0]?p?await _(e,r):await _({paradigm:"Full Access",database:s,queryString:e,queryValues:r}):p?await _(e):await _({paradigm:"Full Access",database:s,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&l)try{let e=u;return await t({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",s,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=n("aes-192-cbc",t(a,c,l),o.alloc(16,0));try{let r=i.update(e,"hex","utf8");return r+=i.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),o=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,s)=>{let t=s(29021);s(33873);let n=s(9973),o=s(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:s,queryValues:c}){try{return new Promise((l,i)=>{let u=!!e?.match(/full.access|^fa$/i);try{function p(e){a.end(),l(JSON.parse(JSON.stringify(e)))}function _(e){a.end(),l({error:e.message,queryStringGenerated:s,queryValuesGenerated:c,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),c&&Array.isArray(c)&&c[0]?a.query(s,c).then(p).catch(_):a.query(s).then(p).catch(_)}catch(e){t.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,s)=>{let t=s(9973),n=s(21580);async function o(...e){let r=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let s=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=62347);module.exports=s})(); \ No newline at end of file +${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(43775),s=t(67619),a=t(48786),o=t(37275),l=t(7971);async function c({queryString:e,queryValuesArray:r,database:t,tableSchema:c,useLocal:u}){let i;let d=!!u||!!t?.match(/^datasquirel$/),p=u?l.A:d?a.A:o.default;try{i=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(i&&c)try{let e=i;return await (0,n.A)({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(i)return i;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,n.scryptSync)(a,o,l),u=s.Buffer.alloc(16,0),i=(0,n.createDecipheriv)("aes-192-cbc",c,u);try{let r=i.update(e,"hex","utf8");return r+=i.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function l(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=10291);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js.nft.json index 2fb36eb..34dc1b6 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/getTablesForUserDatabase.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js b/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js index 0e3caf6..2082bc9 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js +++ b/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=525,e.ids=[525],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},42513:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>d,routeModule:()=>p});var t={};s.r(t),s.d(t,{default:()=>a});var n=s(89947),o=s(2706),u=s(96762),i=s(19131),c=s.n(i);let l=s(29021);async function a(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let s=await c()(e);if(!s?.logged_in_status)return r.json({success:!1,log:"No Logs"});let t=e.body.user.id.toString().replace(/[^0-9]/g,"").replace(/\//g,""),n=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t}/backups`;l.existsSync(n)||l.mkdirSync(n);let o=l.readdirSync(n);r.json({success:!0,backups:o})}let d=(0,u.M)(t,"default"),_=(0,u.M)(t,"config"),p=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/getUserBackups",pathname:"/api/admin/getUserBackups",bundlePath:"",filename:""},userland:t})},19131:(e,r,s)=>{let{IncomingMessage:t}=s(81630),n=s(72835),o=s(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:s}=o(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let u=n({encryptedString:e.cookies[t]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:c+=n}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let u=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!u?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",t(u,i,c),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=42513);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=525,e.ids=[525],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,n){return n in r?r[n]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,n)):"function"==typeof r&&"default"===n?r:void 0}}})},52159:(e,r,n)=>{n.r(r),n.d(r,{config:()=>d,default:()=>l,routeModule:()=>_});var s={};n.r(s),n.d(s,{default:()=>a});var t=n(89947),o=n(2706),u=n(96762),i=n(87369);let c=n(29021);async function a(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let n=await (0,i.A)(e);if(!n?.logged_in_status)return r.json({success:!1,log:"No Logs"});let s=e.body.user.id.toString().replace(/[^0-9]/g,"").replace(/\//g,""),t=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s}/backups`;c.existsSync(t)||c.mkdirSync(t);let o=c.readdirSync(t);r.json({success:!0,backups:o})}let l=(0,u.M)(s,"default"),d=(0,u.M)(s,"config"),_=new t.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/getUserBackups",pathname:"/api/admin/getUserBackups",bundlePath:"",filename:""},userland:s})},87369:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(95969),t=n(89159);async function o(e){let{keyCookieName:r,csrfCookieName:n}=(0,t.A)(),o=`${r}_su`;if(!e.cookies?.[o])return console.log("No auth key cookie found"),null;let u=(0,s.A)({encryptedString:e.cookies[o]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},89159:(e,r,n)=>{n.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",n=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=n;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:c+=t}}},95969:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(55511),t=n(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:n}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=n||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,s.scryptSync)(o,u,i),a=t.Buffer.alloc(16,0),l=(0,s.createDecipheriv)("aes-192-cbc",c,a);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var n=r(r.s=52159);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/getUserBackups.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/getUserData.js b/dsql-app/.local_dist/server/pages/api/admin/getUserData.js index 77b0473..0553573 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/getUserData.js +++ b/dsql-app/.local_dist/server/pages/api/admin/getUserData.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9664,e.ids=[9664],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},29249:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>d,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>p});var o=t(89947),n=t(2706),a=t(96762),i=t(51348),u=t.n(i),c=t(19131),l=t.n(c);let _=t(29021);async function p(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let t=await l()(e);if(!t?.logged_in_status)return r.json({success:!1,log:"No Logs"});let s=e.body.user,o=s?.id.toString().replace(/[^0-9]/g,"").replace(/\//g,""),n=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${o}`,a=[];!function e({originArray:r,rootPath:t}){let s=_.readdirSync(t);for(let o=0;oObject.values(e)[0])})}let d=(0,a.M)(s,"default"),S=(0,a.M)(s,"config"),f=new o.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/admin/getUserData",pathname:"/api/admin/getUserData",bundlePath:"",filename:""},userland:s})},19131:(e,r,t)=>{let{IncomingMessage:s}=t(81630),o=t(72835),n=t(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:t}=n(),s=`${r}_su`;if(!e.cookies?.[s])return console.log("No auth key cookie found"),null;let a=o({encryptedString:e.cookies[s]});if(!a)return console.log("No user payload found"),null;let i=JSON.parse(a);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",o=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),n&&(a+=`${n}_`),a+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:u+=o}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:o}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=o("aes-192-cbc",s(a,i,u),n.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),o=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:o()}});async function a(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=29249);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9664,e.ids=[9664],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},75461:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>c});var o=t(89947),s=t(2706),a=t(96762),i=t(48786),u=t(87369);let l=t(29021);async function c(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let t=await (0,u.A)(e);if(!t?.logged_in_status)return r.json({success:!1,log:"No Logs"});let n=e.body.user,o=n?.id.toString().replace(/[^0-9]/g,"").replace(/\//g,""),s=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${o}`,a=[];!function e({originArray:r,rootPath:t}){let n=l.readdirSync(t);for(let o=0;oObject.values(e)[0])})}let d=(0,a.M)(n,"default"),_=(0,a.M)(n,"config"),p=new o.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/admin/getUserData",pathname:"/api/admin/getUserData",bundlePath:"",filename:""},userland:n})},87369:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(95969),o=t(89159);async function s(e){let{keyCookieName:r,csrfCookieName:t}=(0,o.A)(),s=`${r}_su`;if(!e.cookies?.[s])return console.log("No auth key cookie found"),null;let a=(0,n.A)({encryptedString:e.cookies[s]});if(!a)return console.log("No user payload found"),null;let i=JSON.parse(a);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",o=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),s&&(a+=`${s}_`),a+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),s&&(i+=`${s}_`),i+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),s&&(u+=`${s}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:u+=o}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),o=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(s,a,i),l=o.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",u,l);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=75461);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/getUserData.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/getUserData.js.nft.json index 2fb36eb..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/getUserData.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/getUserData.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js b/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js index 6fd2891..df19173 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js +++ b/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2266,e.ids=[2266],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},89995:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>d,routeModule:()=>p});var n={};s.r(n),s.d(n,{default:()=>c});var t=s(89947),o=s(2706),u=s(96762),i=s(19131),a=s.n(i);let l=s(29021);async function c(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed"});let s=await a()(e);if(!s?.logged_in_status)return r.json({success:!1,log:"No Logs"});let n="./.tmp/backups";l.existsSync(n)||l.mkdirSync(n);let t=l.readdirSync(n);r.json({success:!0,backups:t})}let d=(0,u.M)(n,"default"),_=(0,u.M)(n,"config"),p=new t.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/grabBackups",pathname:"/api/admin/grabBackups",bundlePath:"",filename:""},userland:n})},19131:(e,r,s)=>{let{IncomingMessage:n}=s(81630),t=s(72835),o=s(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:s}=o(),n=`${r}_su`;if(!e.cookies?.[n])return console.log("No auth key cookie found"),null;let u=t({encryptedString:e.cookies[n]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=n;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:a+=t}}},72835:(e,r,s)=>{let{scryptSync:n,createDecipheriv:t}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let u=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!u?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=t("aes-192-cbc",n(u,i,a),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=89995);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2266,e.ids=[2266],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,n){return n in r?r[n]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,n)):"function"==typeof r&&"default"===n?r:void 0}}})},90137:(e,r,n)=>{n.r(r),n.d(r,{config:()=>d,default:()=>l,routeModule:()=>_});var s={};n.r(s),n.d(s,{default:()=>c});var t=n(89947),o=n(2706),u=n(96762),i=n(87369);let a=n(29021);async function c(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed"});let n=await (0,i.A)(e);if(!n?.logged_in_status)return r.json({success:!1,log:"No Logs"});let s="./.tmp/backups";a.existsSync(s)||a.mkdirSync(s);let t=a.readdirSync(s);r.json({success:!0,backups:t})}let l=(0,u.M)(s,"default"),d=(0,u.M)(s,"config"),_=new t.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/grabBackups",pathname:"/api/admin/grabBackups",bundlePath:"",filename:""},userland:s})},87369:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(95969),t=n(89159);async function o(e){let{keyCookieName:r,csrfCookieName:n}=(0,t.A)(),o=`${r}_su`;if(!e.cookies?.[o])return console.log("No auth key cookie found"),null;let u=(0,s.A)({encryptedString:e.cookies[o]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},89159:(e,r,n)=>{n.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",n=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=n;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:a+=t}}},95969:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(55511),t=n(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:n}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=n||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let a=(0,s.scryptSync)(o,u,i),c=t.Buffer.alloc(16,0),l=(0,s.createDecipheriv)("aes-192-cbc",a,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var n=r(r.s=90137);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/grabBackups.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js b/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js index babe49b..8d334e9 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js +++ b/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5120,e.ids=[5120],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,o){return o in r?r[o]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,o)):"function"==typeof r&&"default"===o?r:void 0}}})},22955:(e,r,o)=>{o.r(r),o.d(r,{config:()=>_,default:()=>d,routeModule:()=>p});var s={};o.r(s),o.d(s,{default:()=>c});var t=o(89947),n=o(2706),u=o(96762),i=o(19131),l=o.n(i);let a=o(29021);async function c(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed"});let o=await l()(e);if(!o?.logged_in_status)return r.json({success:!1,log:"No Logs"});if(!a.existsSync("./.tmp/error.log"))return r.json({success:!0,log:"No Logs Yet."});let s=a.readFileSync("./.tmp/error.log","utf-8");r.json({success:!0,log:s})}let d=(0,u.M)(s,"default"),_=(0,u.M)(s,"config"),p=new t.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/admin/grabErrorLogs",pathname:"/api/admin/grabErrorLogs",bundlePath:"",filename:""},userland:s})},19131:(e,r,o)=>{let{IncomingMessage:s}=o(81630),t=o(72835),n=o(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:o}=n(),s=`${r}_su`;if(!e.cookies?.[s])return console.log("No auth key cookie found"),null;let u=t({encryptedString:e.cookies[s]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",o=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),u+=o;let i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:l+=t}}},72835:(e,r,o)=>{let{scryptSync:s,createDecipheriv:t}=o(55511),{Buffer:n}=o(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:o})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let u=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=o||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!u?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let a=t("aes-192-cbc",s(u,i,l),n.alloc(16,0));try{let r=a.update(e,"hex","utf8");return r+=a.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var o;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return o}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(o||(o={}))},89947:(e,r,o)=>{e.exports=o(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var o=r(r.s=22955);module.exports=o})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5120,e.ids=[5120],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,n){return n in r?r[n]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,n)):"function"==typeof r&&"default"===n?r:void 0}}})},66604:(e,r,n)=>{n.r(r),n.d(r,{config:()=>d,default:()=>a,routeModule:()=>_});var o={};n.r(o),n.d(o,{default:()=>c});var s=n(89947),t=n(2706),u=n(96762),i=n(87369);let l=n(29021);async function c(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed"});let n=await (0,i.A)(e);if(!n?.logged_in_status)return r.json({success:!1,log:"No Logs"});if(!l.existsSync("./.tmp/error.log"))return r.json({success:!0,log:"No Logs Yet."});let o=l.readFileSync("./.tmp/error.log","utf-8");r.json({success:!0,log:o})}let a=(0,u.M)(o,"default"),d=(0,u.M)(o,"config"),_=new s.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/admin/grabErrorLogs",pathname:"/api/admin/grabErrorLogs",bundlePath:"",filename:""},userland:o})},87369:(e,r,n)=>{n.d(r,{A:()=>t});var o=n(95969),s=n(89159);async function t(e){let{keyCookieName:r,csrfCookieName:n}=(0,s.A)(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let u=(0,o.A)({encryptedString:e.cookies[t]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},89159:(e,r,n)=>{n.d(r,{A:()=>o});function o(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",n=process.env.DSQL_COOKIES_KEY_NAME||"key",o=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",t=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),t&&(u+=`${t}_`),u+=n;let i=r;e?.userId&&(i+=`user_${e.userId}_`),t&&(i+=`${t}_`),i+=o;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),t&&(l+=`${t}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:l+=s}}},95969:(e,r,n)=>{n.d(r,{A:()=>t});var o=n(55511),s=n(79428);function t({encryptedString:e,encryptionKey:r,encryptionSalt:n}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let t=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=n||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!t?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,o.scryptSync)(t,u,i),c=s.Buffer.alloc(16,0),a=(0,o.createDecipheriv)("aes-192-cbc",l,c);try{let r=a.update(e,"hex","utf8");return r+=a.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var n=r(r.s=66604);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/grabErrorLogs.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/grabFile.js b/dsql-app/.local_dist/server/pages/api/admin/grabFile.js index 2b6c2bf..9c2a2ed 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/grabFile.js +++ b/dsql-app/.local_dist/server/pages/api/admin/grabFile.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7375,e.ids=[7375],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},15570:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>d,routeModule:()=>p});var t={};s.r(t),s.d(t,{default:()=>c});var n=s(89947),o=s(2706),u=s(96762),i=s(19131),a=s.n(i);let l=s(29021);async function c(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let s=await a()(e);if(!s?.logged_in_status)return r.json({success:!1,log:"No Logs"});let{type:t,path:n}=e.body;if(e.body.user,!n?.match(/^\.\/jsonData\/dbSchemas\/users/))return r.json({success:!1,msg:"Invalid Path"});let o=n.replace(/\//g,"\\\\"),u=l.readFileSync(o,"utf-8");r.json({success:!0,data:u})}let d=(0,u.M)(t,"default"),_=(0,u.M)(t,"config"),p=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/grabFile",pathname:"/api/admin/grabFile",bundlePath:"",filename:""},userland:t})},19131:(e,r,s)=>{let{IncomingMessage:t}=s(81630),n=s(72835),o=s(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:s}=o(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let u=n({encryptedString:e.cookies[t]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:a+=n}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let u=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!u?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",t(u,i,a),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=15570);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7375,e.ids=[7375],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,n){return n in r?r[n]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,n)):"function"==typeof r&&"default"===n?r:void 0}}})},53865:(e,r,n)=>{n.r(r),n.d(r,{config:()=>d,default:()=>l,routeModule:()=>_});var s={};n.r(s),n.d(s,{default:()=>c});var t=n(89947),o=n(2706),u=n(96762),i=n(87369);let a=n(29021);async function c(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let n=await (0,i.A)(e);if(!n?.logged_in_status)return r.json({success:!1,log:"No Logs"});let{type:s,path:t}=e.body;if(e.body.user,!t?.match(/^\.\/jsonData\/dbSchemas\/users/))return r.json({success:!1,msg:"Invalid Path"});let o=t.replace(/\//g,"\\\\"),u=a.readFileSync(o,"utf-8");r.json({success:!0,data:u})}let l=(0,u.M)(s,"default"),d=(0,u.M)(s,"config"),_=new t.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/grabFile",pathname:"/api/admin/grabFile",bundlePath:"",filename:""},userland:s})},87369:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(95969),t=n(89159);async function o(e){let{keyCookieName:r,csrfCookieName:n}=(0,t.A)(),o=`${r}_su`;if(!e.cookies?.[o])return console.log("No auth key cookie found"),null;let u=(0,s.A)({encryptedString:e.cookies[o]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},89159:(e,r,n)=>{n.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",n=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=n;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:a+=t}}},95969:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(55511),t=n(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:n}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=n||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let a=(0,s.scryptSync)(o,u,i),c=t.Buffer.alloc(16,0),l=(0,s.createDecipheriv)("aes-192-cbc",a,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var n=r(r.s=53865);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/grabFile.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/grabFile.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/grabFile.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/grabFile.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js b/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js index c1181d1..f473bce 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js +++ b/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5467,e.ids=[5467],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},76386:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>E});var n={};t.r(n),t.d(n,{default:()=>l});var s=t(89947),o=t(2706),i=t(96762),u=t(31341),a=t.n(u),_=t(20503),c=t.n(_);async function l(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Failed"});let{email:t,password:n,authKey:s}=e.body;if(n!==process.env.DSQL_USER_KEY||s!==process.env.DSQL_SPECIAL_KEY)return r.json({success:!1});let o=c()({data:JSON.stringify({email:t,password:process.env.DSQL_USER_KEY,authKey:process.env.DSQL_SPECIAL_KEY,logged_in_status:!0,date:Date.now()})}),{keyCookieName:i,csrfCookieName:u}=a()();r.setHeader("Set-Cookie",[`${i}_su=${o};samesite=strict;path=/;HttpOnly=true;Secure=true`]),r.json({success:!0})}let d=(0,i.M)(n,"default"),p=(0,i.M)(n,"config"),E=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/loginSuUser",pathname:"/api/admin/loginSuUser",bundlePath:"",filename:""},userland:n})},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=n;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:i,csrfCookieName:u,oneTimeCodeName:a+=s}}},20503:(e,r,t)=>{let{scryptSync:n,createCipheriv:s}=t(55511),{Buffer:o}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let _=s("aes-192-cbc",n(i,u,a),o.alloc(16,0));try{let r=_.update(e,"utf8","hex");return r+=_.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=76386);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5467,e.ids=[5467],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},29756:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>_,routeModule:()=>l});var n={};t.r(n),t.d(n,{default:()=>c});var s=t(89947),o=t(2706),i=t(96762),u=t(89159),a=t(68829);async function c(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Failed"});let{email:t,password:n,authKey:s}=e.body;if(n!==process.env.DSQL_USER_KEY||s!==process.env.DSQL_SPECIAL_KEY)return r.json({success:!1});let o=(0,a.default)({data:JSON.stringify({email:t,password:process.env.DSQL_USER_KEY,authKey:process.env.DSQL_SPECIAL_KEY,logged_in_status:!0,date:Date.now()})}),{keyCookieName:i,csrfCookieName:c}=(0,u.A)();r.setHeader("Set-Cookie",[`${i}_su=${o};samesite=strict;path=/;HttpOnly=true;Secure=true`]),r.json({success:!0})}let _=(0,i.M)(n,"default"),d=(0,i.M)(n,"config"),l=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/loginSuUser",pathname:"/api/admin/loginSuUser",bundlePath:"",filename:""},userland:n})},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=n;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:i,csrfCookieName:u,oneTimeCodeName:a+=s}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(55511),s=t(79428);function o({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let a=(0,n.scryptSync)(o,i,u),c=s.Buffer.alloc(16,0),_=(0,n.createCipheriv)("aes-192-cbc",a,c);try{let r=_.update(e,"utf8","hex");return r+=_.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=29756);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/loginSuUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js b/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js index 8e7a3bd..21ecb10 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js +++ b/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=6799,e.ids=[6799],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},89496:(e,r,s)=>{s.r(r),s.d(r,{config:()=>D,default:()=>S,routeModule:()=>m});var t={};s.r(t),s.d(t,{default:()=>d});var n=s(89947),o=s(2706),a=s(96762),c=s(57638),l=s.n(c),u=s(48225),i=s.n(u),p=s(19131),_=s.n(p);async function d(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let s=await _()(e);if(!s?.logged_in_status)return r.json({success:!1,log:"No Logs"});let{database:t,query:n}=e.body;e.body.user;try{let e=await l()({database:t,queryString:n});if(!e)return r.json({success:!1,msg:"Query Failed!"});r.json({success:!0,result:e})}catch(e){console.log(e.message),i()({component:"/api/runUserDbQuery/main-catch-error",message:e.message}),r.json({success:!1})}}s(29021);let S=(0,a.M)(t,"default"),D=(0,a.M)(t,"config"),m=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/runUserDbQuery",pathname:"/api/admin/runUserDbQuery",bundlePath:"",filename:""},userland:t})},19131:(e,r,s)=>{let{IncomingMessage:t}=s(81630),n=s(72835),o=s(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:s}=o(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let a=n({encryptedString:e.cookies[t]});if(!a)return console.log("No user payload found"),null;let c=JSON.parse(a);return c.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):c.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):c}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=t;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:a,csrfCookieName:c,oneTimeCodeName:l+=n}}},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,s)=>{let t=s(72835),n=s(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let s=[];try{for(let o=0;o",r.message),e}}},48225:(e,r,s)=>{let t=s(29021),{IncomingMessage:n}=s(81630);e.exports=async function({user:e,message:r,component:s,noMail:n,req:o}){let a=new Date,c=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],s=o.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||t||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=6799,e.ids=[6799],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},74336:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>i});var s=t(89947),a=t(2706),o=t(96762),l=t(30944),c=t(67619),u=t(87369);async function i(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let t=await (0,u.A)(e);if(!t?.logged_in_status)return r.json({success:!1,log:"No Logs"});let{database:n,query:s}=e.body;e.body.user;try{let e=await (0,l.A)({database:n,queryString:s});if(!e)return r.json({success:!1,msg:"Query Failed!"});r.json({success:!0,result:e})}catch(e){console.log(e.message),(0,c.default)({component:"/api/runUserDbQuery/main-catch-error",message:e.message}),r.json({success:!1})}}t(29021);let d=(0,o.M)(n,"default"),p=(0,o.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/admin/runUserDbQuery",pathname:"/api/admin/runUserDbQuery",bundlePath:"",filename:""},userland:n})},87369:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969),s=t(89159);async function a(e){let{keyCookieName:r,csrfCookieName:t}=(0,s.A)(),a=`${r}_su`;if(!e.cookies?.[a])return console.log("No auth key cookie found"),null;let o=(0,n.A)({encryptedString:e.cookies[a]});if(!o)return console.log("No user payload found"),null;let l=JSON.parse(o);return l.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):l.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=n;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:c+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function a({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},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,l=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(n+=` -URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),c&&(n+=` -IP: ${c}`),n+=` -Date: ${a.toDateString()} -========================================`,t.existsSync("./.tmp/error.log")||t.writeFileSync("./.tmp/error.log","","utf-8");let l=t.readFileSync("./.tmp/error.log","utf-8");t.writeFileSync("./.tmp/error.log",n),t.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),a?.url&&(n+=` +URL: ${a.url}`),a?.body&&(n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` +Date: ${o.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let c=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,s)=>{s(29021);let t=s(6061),n=s(48225),o=s(51348),a=s(21339),c=s(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:s,tableSchema:l,useLocal:u}){let i;let p=!!u||!!s?.match(/^datasquirel$/),_=u?c:p?o:a;try{i=e&&r&&Array.isArray(r)&&r[0]?p?await _(e,r):await _({paradigm:"Full Access",database:s,queryString:e,queryValues:r}):p?await _(e):await _({paradigm:"Full Access",database:s,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(i&&l)try{let e=i;return await t({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",s,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(i)return i;else return null}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",t(a,c,l),o.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),o=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,s)=>{let t=s(29021);s(33873);let n=s(9973),o=s(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:s,queryValues:c}){try{return new Promise((l,u)=>{let i=!!e?.match(/full.access|^fa$/i);try{function p(e){a.end(),l(JSON.parse(JSON.stringify(e)))}function _(e){a.end(),l({error:e.message,queryStringGenerated:s,queryValuesGenerated:c,sql:e.sql})}a=i?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),c&&Array.isArray(c)&&c[0]?a.query(s,c).then(p).catch(_):a.query(s).then(p).catch(_)}catch(e){t.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,s)=>{let t=s(9973),n=s(21580);async function o(...e){let r=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let s=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=89496);module.exports=s})(); \ No newline at end of file +${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(43775),s=t(67619),a=t(48786),o=t(37275),l=t(7971);async function c({queryString:e,queryValuesArray:r,database:t,tableSchema:c,useLocal:u}){let i;let d=!!u||!!t?.match(/^datasquirel$/),p=u?l.A:d?a.A:o.default;try{i=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(i&&c)try{let e=i;return await (0,n.A)({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(i)return i;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,n.scryptSync)(a,o,l),u=s.Buffer.alloc(16,0),i=(0,n.createDecipheriv)("aes-192-cbc",c,u);try{let r=i.update(e,"hex","utf8");return r+=i.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function l(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=74336);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js.nft.json index 2fb36eb..34dc1b6 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/runUserDbQuery.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js b/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js index 9194d60..687435b 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js +++ b/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5989,e.ids=[5989],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},89106:(e,r,s)=>{s.r(r),s.d(r,{config:()=>P,default:()=>g,routeModule:()=>S});var t={};s.r(t),s.d(t,{default:()=>f});var n=s(89947),o=s(2706),u=s(96762),i=s(33873),l=s.n(i),a=s(19131),c=s.n(a),d=s(27825),p=s.n(d);let{execSync:_}=s(79646),E=s(29021);async function f(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let s=await c()(e);if(!s?.logged_in_status)return r.json({success:!1,log:"No Logs"});try{let s=l().join(process.cwd(),".env"),t=E.readFileSync(s,"utf-8"),n=RegExp(`${p().escapeRegExp(e.body.key)}=.*`);t.match(n);let o=t.replace(n,`${e.body.key}=${e.body.value}`);E.writeFileSync(s,o,"utf-8"),r.json({success:!0})}catch(e){console.log("updating Env error =>",e.message),r.json({success:!1,error:e.message})}}let g=(0,u.M)(t,"default"),P=(0,u.M)(t,"config"),S=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/updateEnv",pathname:"/api/admin/updateEnv",bundlePath:"",filename:""},userland:t})},19131:(e,r,s)=>{let{IncomingMessage:t}=s(81630),n=s(72835),o=s(31341);e.exports=async function(e){let{keyCookieName:r,csrfCookieName:s}=o(),t=`${r}_su`;if(!e.cookies?.[t])return console.log("No auth key cookie found"),null;let u=n({encryptedString:e.cookies[t]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:l+=n}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let u=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!u?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let a=n("aes-192-cbc",t(u,i,l),o.alloc(16,0));try{let r=a.update(e,"hex","utf8");return r+=a.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=89106);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5989,e.ids=[5989],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,n){return n in r?r[n]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,n)):"function"==typeof r&&"default"===n?r:void 0}}})},86181:(e,r,n)=>{n.r(r),n.d(r,{config:()=>v,default:()=>f,routeModule:()=>A});var s={};n.r(s),n.d(s,{default:()=>E});var t=n(89947),o=n(2706),u=n(96762),i=n(33873),c=n.n(i),a=n(87369),l=n(27825),d=n.n(l);let{execSync:p}=n(79646),_=n(29021);async function E(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Wrong Method"});let n=await (0,a.A)(e);if(!n?.logged_in_status)return r.json({success:!1,log:"No Logs"});try{let n=c().join(process.cwd(),".env"),s=_.readFileSync(n,"utf-8"),t=RegExp(`${d().escapeRegExp(e.body.key)}=.*`);s.match(t);let o=s.replace(t,`${e.body.key}=${e.body.value}`);_.writeFileSync(n,o,"utf-8"),r.json({success:!0})}catch(e){console.log("updating Env error =>",e.message),r.json({success:!1,error:e.message})}}let f=(0,u.M)(s,"default"),v=(0,u.M)(s,"config"),A=new t.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/updateEnv",pathname:"/api/admin/updateEnv",bundlePath:"",filename:""},userland:s})},87369:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(95969),t=n(89159);async function o(e){let{keyCookieName:r,csrfCookieName:n}=(0,t.A)(),o=`${r}_su`;if(!e.cookies?.[o])return console.log("No auth key cookie found"),null;let u=(0,s.A)({encryptedString:e.cookies[o]});if(!u)return console.log("No user payload found"),null;let i=JSON.parse(u);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},89159:(e,r,n)=>{n.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",n=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=n;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:c+=t}}},95969:(e,r,n)=>{n.d(r,{A:()=>o});var s=n(55511),t=n(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:n}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=n||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,s.scryptSync)(o,u,i),a=t.Buffer.alloc(16,0),l=(0,s.createDecipheriv)("aes-192-cbc",c,a);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var n=r(r.s=86181);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js.nft.json b/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js.nft.json index 83580e4..1a50757 100644 --- a/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/admin/updateEnv.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../.env","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../.env","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js b/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js index 7b05777..7f57291 100644 --- a/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js +++ b/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7963,e.ids=[7963],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},6523:(e,r,s)=>{s.r(r),s.d(r,{config:()=>E,default:()=>S,routeModule:()=>f});var t={};s.r(t),s.d(t,{default:()=>p});var n=s(89947),o=s(2706),a=s(96762),i=s(51348),c=s.n(i),u=s(6420),l=s.n(u),_=s(14533),d=s.n(_);async function p(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await l()(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{userId:s,password:t,dbId:n}=e.body;try{let e=!!String(n).match(/^\d+$/),o=!!String(s).match(/^\d+$/),a=!!String(t).match(/ /);if(!e||!o)throw Error("Invalud Parameters!");if(a)throw Error("Invalid Password!");let i=await c()("SELECT * FROM user_databases WHERE id = ?",[n]),u=i?.[0]?.db_full_name,l=d()({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:t});await c()(`UPDATE \`${u}\`.\`users\` SET password = ? WHERE id = ?`,[l,s]),r.json({success:!0,msg:"DB user Password Changed!"})}catch(e){r.json({success:!1,msg:e.message})}}let S=(0,a.M)(t,"default"),E=(0,a.M)(t,"config"),f=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/changeDbUserPassword",pathname:"/api/changeDbUserPassword",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),n=s(72835),o=s(29021),a=s(31341);async function i(e,r,s,i){let{keyCookieName:c,csrfCookieName:u}=a();if(!e.cookies?.[c]?.match(/./))return null;let l=n({encryptedString:e.cookies[c]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!o.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:c+=n}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",t(a,i,c),o.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},14533:(e,r,s)=>{let{createHmac:t}=s(55511);e.exports=function({password:e,encryptionKey:r}){let s=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!s?.match(/.{8,}/))throw Error("Encryption key is invalid");let n=t("sha512",s);return n.update(e),n.digest("base64")}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),o=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=6523);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7963,e.ids=[7963],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},94649:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>l});var n=t(89947),i=t(2706),a=t(96762),o=t(48786),u=t(69842),c=t(83919);async function l(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await (0,u.A)(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{userId:t,password:s,dbId:n}=e.body;try{let e=!!String(n).match(/^\d+$/),i=!!String(t).match(/^\d+$/),a=!!String(s).match(/ /);if(!e||!i)throw Error("Invalud Parameters!");if(a)throw Error("Invalid Password!");let u=await (0,o.A)("SELECT * FROM user_databases WHERE id = ?",[n]),l=u?.[0]?.db_full_name,d=(0,c.A)({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:s});await (0,o.A)(`UPDATE \`${l}\`.\`users\` SET password = ? WHERE id = ?`,[d,t]),r.json({success:!0,msg:"DB user Password Changed!"})}catch(e){r.json({success:!1,msg:e.message})}}let d=(0,a.M)(s,"default"),_=(0,a.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/changeDbUserPassword",pathname:"/api/changeDbUserPassword",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var s=t(48786),n=t(95969),i=t(29021),a=t.n(i),o=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,n.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:u+=n}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var s=t(55511),n=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,s.scryptSync)(i,a,o),c=n.Buffer.alloc(16,0),l=(0,s.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},83919:(e,r,t)=>{t.d(r,{A:()=>n});var s=t(55511);function n({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let n=(0,s.createHmac)("sha512",t);return n.update(e),n.digest("base64")}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=94649);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js.nft.json b/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/changeDbUserPassword.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js b/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js index 50265be..630d861 100644 --- a/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js +++ b/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=6856,e.ids=[6856],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},43634:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>u,routeModule:()=>d});var s={};t.r(s),t.d(s,{default:()=>l});var n=t(89947),a=t(2706),o=t(96762),c=t(57638),i=t.n(c);async function l(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed!"});let{type:t,value:s,tableName:n,dbFullName:a,userId:o,dbId:c,userType:l,database:u}=e.query,p=`SELECT \`${t}\` FROM \`${n}\` WHERE \`${t}\`=?`,d=[s];o&&(p+=" AND user_id=?",d.push(o)),c&&(p+=" AND db_id=?",d.push(c)),l&&(p+=" AND user_type=?",d.push(l)),u&&(p+=" AND `database`=?",d.push(u));let _=await i()({queryString:p,queryValuesArray:d,database:a&&"string"==typeof a?a.replace(/[^a-z0-9_]/g,""):"datasquirel"});r.json({result:!!_&&!!_[0]})}let u=(0,o.M)(s,"default"),p=(0,o.M)(s,"config"),d=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/checkDuplicateData",pathname:"/api/checkDuplicateData",bundlePath:"",filename:""},userland:s})},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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,c=(()=>{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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=6856,e.ids=[6856],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},88525:(e,r,t)=>{t.r(r),t.d(r,{config:()=>u,default:()=>i,routeModule:()=>d});var n={};t.r(n),t.d(n,{default:()=>c});var a=t(89947),s=t(2706),o=t(96762),l=t(30944);async function c(e,r){if("GET"!==e.method)return r.json({success:!1,msg:"Failed!"});let{type:t,value:n,tableName:a,dbFullName:s,userId:o,dbId:c,userType:i,database:u}=e.query,d=s&&"string"==typeof s?s.replace(/[^a-z0-9_]/g,""):"datasquirel",p=`SELECT \`${t}\` FROM ${d}.\`${a}\` WHERE \`${t}\`=?`,f=[n];o&&(p+=" AND user_id=?",f.push(o)),c&&(p+=" AND db_id=?",f.push(c)),i&&(p+=" AND user_type=?",f.push(i)),u&&(p+=" AND `database`=?",f.push(u));let g=await (0,l.A)({queryString:p,queryValuesArray:f,database:d});r.json({result:!!g&&!!g[0]})}let i=(0,o.M)(n,"default"),u=(0,o.M)(n,"config"),d=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/checkDuplicateData",pathname:"/api/checkDuplicateData",bundlePath:"",filename:""},userland:n})},43775:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(95969);let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),a=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let o=new Date,l=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||n||r||s.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),c&&(n+=` -IP: ${c}`),n+=` +User Email: ${e?.email}`),s?.url&&(n+=` +URL: ${s.url}`),s?.body&&(n+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let c=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",n),a().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),c=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:l}){let u;let p=!!l||!!t?.match(/^datasquirel$/),d=l?c:p?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?p?await d(e,r):await d({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):p?await d(e):await d({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await s({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,c,i),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function p(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function d(e){o.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:c,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),c&&Array.isArray(c)&&c[0]?o.query(t,c).then(p).catch(d):o.query(t).then(p).catch(d)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=43634);module.exports=t})(); \ No newline at end of file +${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(43775),a=t(67619),s=t(48786),o=t(37275),l=t(7971);async function c({queryString:e,queryValuesArray:r,database:t,tableSchema:c,useLocal:i}){let u;let d=!!i||!!t?.match(/^datasquirel$/),p=i?l.A:d?s.A:o.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,a.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&c)try{let e=u;return await (0,n.A)({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,a.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),a=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,n.scryptSync)(s,o,l),i=a.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",c,i);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(a(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;ns})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),a=t.n(n),s=t(29021),o=t.n(s);async function l(...e){let r=a()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=88525);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js.nft.json b/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/checkDuplicateData.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js b/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js index 420bcf5..5b59c9b 100644 --- a/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js +++ b/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6422,e.ids=[6422],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},82651:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>d,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),o=t(2706),i=t(96762),c=t(33873),u=t.n(c),a=t(6420),l=t.n(a);let _=t(29021);async function p(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{name:s,folder:n}=e.query,o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)return console.log("Static File ENV not Found!"),r.json({success:!1,msg:"No Static Path!"});let i=u().join(o,`images/user-images/user-${t.id}/${n?n+"/":""}`),c=_.existsSync(i+s);r.json({success:c})}let d=(0,i.M)(s,"default"),f=(0,i.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/checkExistingFolder",pathname:"/api/checkExistingFolder",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function c(e,r,t,c){let{keyCookieName:u,csrfCookieName:a}=i();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),{keyCookieName:i,csrfCookieName:c,oneTimeCodeName:u+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let a=n("aes-192-cbc",s(i,c,u),o.alloc(16,0));try{let r=a.update(e,"hex","utf8");return r+=a.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=82651);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6422,e.ids=[6422],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},49860:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>d,routeModule:()=>E});var n={};t.r(n),t.d(n,{default:()=>_});var s=t(89947),i=t(2706),o=t(96762),u=t(33873),a=t.n(u),c=t(69842);let l=t(29021);async function _(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,c.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{name:n,folder:s}=e.query,i=process.env.DSQL_STATIC_SERVER_DIR;if(!i)return console.log("Static File ENV not Found!"),r.json({success:!1,msg:"No Static Path!"});let o=a().join(i,`images/user-images/user-${t.id}/${s?s+"/":""}`),u=l.existsSync(o+n);r.json({success:u})}let d=(0,o.M)(n,"default"),f=(0,o.M)(n,"config"),E=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/checkExistingFolder",pathname:"/api/checkExistingFolder",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),u=t(89159);async function a(e,r,t){let{keyCookieName:i,csrfCookieName:a}=(0,u.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${_}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let u=r;e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),u+=n;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),{keyCookieName:o,csrfCookieName:u,oneTimeCodeName:a+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let a=(0,n.scryptSync)(i,o,u),c=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",a,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=49860);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js.nft.json b/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/clientSideAuth.js b/dsql-app/.local_dist/server/pages/api/clientSideAuth.js index 753ecb6..00b2278 100644 --- a/dsql-app/.local_dist/server/pages/api/clientSideAuth.js +++ b/dsql-app/.local_dist/server/pages/api/clientSideAuth.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6237,e.ids=[6237],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},7616:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>l,routeModule:()=>p});var s={};t.r(s),t.d(s,{default:()=>c});var n=t(89947),o=t(2706),i=t(96762),u=t(6420),a=t.n(u);async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await a()(e,r,!0);r.json({user:t})}let l=(0,i.M)(s,"default"),_=(0,i.M)(s,"config"),p=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/clientSideAuth",pathname:"/api/clientSideAuth",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function u(e,r,t,u){let{keyCookieName:a,csrfCookieName:c}=i();if(!e.cookies?.[a]?.match(/./))return null;let l=n({encryptedString:e.cookies[a]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=u},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=s;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:i,csrfCookieName:u,oneTimeCodeName:a+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,u,a),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=7616);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6237,e.ids=[6237],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},27215:(e,r,t)=>{t.r(r),t.d(r,{config:()=>l,default:()=>c,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>a});var s=t(89947),i=t(2706),o=t(96762),u=t(69842);async function a(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);r.json({user:t})}let c=(0,o.M)(n,"default"),l=(0,o.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/clientSideAuth",pathname:"/api/clientSideAuth",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),u=t(89159);async function a(e,r,t){let{keyCookieName:i,csrfCookieName:a}=(0,u.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${_}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let u=r;e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),u+=n;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),{keyCookieName:o,csrfCookieName:u,oneTimeCodeName:a+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let a=(0,n.scryptSync)(i,o,u),c=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",a,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=27215);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/clientSideAuth.js.nft.json b/dsql-app/.local_dist/server/pages/api/clientSideAuth.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/clientSideAuth.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/clientSideAuth.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect.js b/dsql-app/.local_dist/server/pages/api/connect.js index 34d9aef..4b48d60 100644 --- a/dsql-app/.local_dist/server/pages/api/connect.js +++ b/dsql-app/.local_dist/server/pages/api/connect.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=7539,e.ids=[7539],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},8953:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>_,routeModule:()=>P});var n={};t.r(n),t.d(n,{default:()=>m});var i=t(89947),s=t(2706),o=t(96762),a=t(48225),l=t.n(a),c=t(77619),u=t.n(c),d=t(72835),p=t.n(d),f=t(33873),g=t.n(f);let S=t(29021);async function m(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=e.body,{url:n,key:i,database:s,dbSchema:o,type:a}=t;try{let e=u()({key:i,database:s?.db_slug,user_id:t.user_id});if(!e?.user_id)throw Error("Api Credentials invalid!");let n=p()({encryptedString:i}),{user_id:o,full_access:a,csrf:l}=n?JSON.parse(n):null;if(!a||!l)return r.json({success:!1,msg:"Unauthorized"});let c=g().resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${o}`,"main.json");if(!S.existsSync(c))throw Error("User Shcema data file doesn't exist!");let d=JSON.parse(S.readFileSync(c,"utf-8"));r.json({success:!0,payload:d})}catch(e){console.log("Connect Verification Error, =>",e.message),l()({component:"/api/connect/main-catch-error",message:e.message}),r.json({success:!1,msg:"Connect Verification Operation Failed!"})}}let _=(0,o.M)(n,"default"),E=(0,o.M)(n,"config"),P=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/connect",pathname:"/api/connect",bundlePath:"",filename:""},userland:n})},77619:(e,r,t)=>{let n=t(29021),i=t(72835);e.exports=({key:e,database:r,table:t,user_id:s,media:o})=>{if(!e||!s)return null;try{let a=process.env.DSQL_API_KEYS_PATH;if(!a)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=i({encryptedString:e}),c=JSON.parse(l||""),u=n.existsSync(`${a}/${c.sign}`);if(String(c.user_id)!==String(s)||!u)return null;if(!c.target_database||o)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},48225:(e,r,t)=>{let n=t(29021),{IncomingMessage:i}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:i,req:s}){let o=new Date,a=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||n||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=7539,e.ids=[7539],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},68084:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>g,routeModule:()=>m});var n={};t.r(n),t.d(n,{default:()=>f});var i=t(89947),s=t(2706),a=t(96762),o=t(67619),l=t(56081),c=t(95969),u=t(33873),d=t.n(u);let p=t(29021);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=e.body,{url:n,key:i,database:s,dbSchema:a,type:u}=t;try{let e=(0,l.A)({key:i,database:s?.db_slug,user_id:t.user_id});if(!e?.user_id)throw Error("Api Credentials invalid!");let n=(0,c.A)({encryptedString:i}),{user_id:a,full_access:o,csrf:u}=n?JSON.parse(n):null;if(!o||!u)return r.json({success:!1,msg:"Unauthorized"});let f=d().resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${a}`,"main.json");if(!p.existsSync(f))throw Error("User Shcema data file doesn't exist!");let g=JSON.parse(p.readFileSync(f,"utf-8"));r.json({success:!0,payload:g})}catch(e){console.log("Connect Verification Error, =>",e.message),(0,o.default)({component:"/api/connect/main-catch-error",message:e.message}),r.json({success:!1,msg:"Connect Verification Operation Failed!"})}}let g=(0,a.M)(n,"default"),S=(0,a.M)(n,"config"),m=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/connect",pathname:"/api/connect",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(29021),i=t.n(n),s=t(95969);let a=({key:e,database:r,table:t,user_id:n,media:a})=>{if(!e||!n)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,s.A)({encryptedString:e}),c=JSON.parse(l||""),u=i().existsSync(`${o}/${c.sign}`);if(String(c.user_id)!==String(n)||!u)return null;if(!c.target_database||a)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),i=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let a=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||n||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),s?.url&&(i+=` -URL: ${s.url}`),s?.body&&(i+=` -Request Body: ${JSON.stringify(s.body,null,4)}`),a&&(i+=` -IP: ${a}`),i+=` -Date: ${o.toDateString()} -========================================`,n.existsSync("./.tmp/error.log")||n.writeFileSync("./.tmp/error.log","","utf-8");let l=n.readFileSync("./.tmp/error.log","utf-8");n.writeFileSync("./.tmp/error.log",i),n.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),s?.url&&(n+=` +URL: ${s.url}`),s?.body&&(n+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${a.toDateString()} +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let l=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",n),i().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:n,createDecipheriv:i}=t(55511),{Buffer:s}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=i("aes-192-cbc",n(o,a,l),s.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=8953);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),i=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(s,a,o),c=i.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=68084);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect.js.nft.json b/dsql-app/.local_dist/server/pages/api/connect.js.nft.json index 2a657bf..7691c56 100644 --- a/dsql-app/.local_dist/server/pages/api/connect.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/connect.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect/disconnect.js b/dsql-app/.local_dist/server/pages/api/connect/disconnect.js index 3ff9f4b..87bc8ec 100644 --- a/dsql-app/.local_dist/server/pages/api/connect/disconnect.js +++ b/dsql-app/.local_dist/server/pages/api/connect/disconnect.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=964,e.ids=[964],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},79551:e=>{e.exports=require("url")},28354:e=>{e.exports=require("util")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},85617:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>f,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>S});var n=t(89947),o=t(2706),a=t(96762),i=t(48225),c=t.n(i),l=t(6420),u=t.n(l),_=t(33364),p=t.n(_);t(29021),t(28354);let{URL:d}=t(79551);async function S(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await u()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbId:s}=e.body;try{if(!s)throw Error("No Target Database ID provided");await p()({tableName:"user_databases",data:{remote_connected:0,remote_connection_host:"",remote_connection_key:"",remote_connection_type:"",remote_db_full_name:""},identifierColumnName:"id",identifierValue:s}),r.json({success:!0})}catch(e){console.log("Disconnect Error, =>",e.message),c()({component:"/api/connect/verify/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Operation Failed!"})}}let f=(0,a.M)(s,"default"),E=(0,a.M)(s,"config"),g=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/connect/disconnect",pathname:"/api/connect/disconnect",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),a=t(31341);async function i(e,r,t,i){let{keyCookieName:c,csrfCookieName:l}=a();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:c+=n}}},33364:(e,r,t)=>{let s=t(72583),n=t(16570),o=t(51348),a=t(21339),i=t(20503),c=t(44900);async function l({dbContext:e,paradigm:r,dbFullName:t,tableName:l,data:u,tableSchema:_,identifierColumnName:p,identifierValue:d,encryptionKey:S,encryptionSalt:f,useLocal:E}){if(!u||!Object.keys(u).length)return null;let g=!!E||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),m=E?c:g?o:a,D=Object.keys(u),h=[],y=[];for(let e=0;ee.fieldName===r):null,a=o&&o[0]?o[0]:null;if(null==t||void 0==t)continue;let c=/<[^>]+>/g;(a?.richText||String(t).match(c))&&(t=s(t,n)),a?.encrypted&&(t=i({data:t,encryptionKey:S,encryptionSalt:f})),"object"==typeof t&&(t=JSON.stringify(t)),a?.pattern&&!new RegExp(a.pattern,a.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),h.push(`\`${r}\`=?`),"number"==typeof t?y.push(String(t)):y.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}h.push(`date_updated='${Date()}'`),h.push(`date_updated_code='${Date.now()}'`);let v=`UPDATE ${l} SET ${h.join(",")} WHERE \`${p}\`=?`;return y.push(d),g?await m(v,y):await m({paradigm:r,database:t,queryString:v,queryValues:y})}e.exports=l},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let a=new Date,i=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=964,e.ids=[964],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},79551:e=>{e.exports=require("url")},28354:e=>{e.exports=require("util")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},48171:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>f,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>d});var s=t(89947),o=t(2706),i=t(96762),a=t(67619),l=t(69842),c=t(30802);t(29021),t(28354);let{URL:u}=t(79551);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,l.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbId:n}=e.body;try{if(!n)throw Error("No Target Database ID provided");await (0,c.A)({tableName:"user_databases",data:{remote_connected:0,remote_connection_host:"",remote_connection_key:"",remote_connection_type:"",remote_db_full_name:""},identifierColumnName:"id",identifierValue:n}),r.json({success:!0})}catch(e){console.log("Disconnect Error, =>",e.message),(0,a.default)({component:"/api/connect/verify/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Operation Failed!"})}}let f=(0,i.M)(n,"default"),_=(0,i.M)(n,"config"),p=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/connect/disconnect",pathname:"/api/connect/disconnect",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),o=t(29021),i=t.n(o),a=t(89159);async function l(e,r,t){let{keyCookieName:o,csrfCookieName:l}=(0,a.A)();if(!e.cookies?.[o]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[o]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=s}}},30802:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(72583),s=t.n(n),o=t(92652),i=t(48786),a=t(37275),l=t(68829),c=t(7971);async function u({dbContext:e,paradigm:r,dbFullName:t,tableName:n,data:u,tableSchema:d,identifierColumnName:f,identifierValue:_,encryptionKey:p,encryptionSalt:S,useLocal:g}){if(!u||!Object.keys(u).length)return null;let y=!!g||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),E=g?c.A:y?i.A:a.default,m=Object.keys(u),h=[],D=[];for(let e=0;ee.fieldName===r):null,i=n&&n[0]?n[0]:null;if(null==t||void 0==t)continue;let a=/<[^>]+>/g;(i?.richText||String(t).match(a))&&(t=s()(t,o.A)),i?.encrypted&&(t=(0,l.default)({data:t,encryptionKey:p,encryptionSalt:S})),"object"==typeof t&&(t=JSON.stringify(t)),i?.pattern&&!new RegExp(i.pattern,i.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),h.push(`\`${r}\`=?`),"number"==typeof t?D.push(String(t)):D.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}h.push(`date_updated='${Date()}'`),h.push(`date_updated_code='${Date.now()}'`);let N=`UPDATE \`${t}\`.\`${n}\` SET ${h.join(",")} WHERE \`${f}\`=?`;return D.push(_),y?await E(N,D):await E({paradigm:r,queryString:N,queryValues:D})}},92652:(e,r,t)=>{t.d(r,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(29021),s=t.n(n);async function o({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||o.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),o?.url&&(n+=` URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(o.body,null,4)}`),a&&(n+=` +IP: ${a}`),n+=` +Date: ${i.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(a,i,c),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=n("aes-192-cbc",s(a,i,c),o.alloc(16,0));try{let r=l.update(e,"utf8","hex");return r+=l.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),o=t(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((c,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){a.end(),c(JSON.parse(JSON.stringify(e)))}function p(e){a.end(),c({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),i&&Array.isArray(i)&&i[0]?a.query(t,i).then(_).catch(p):a.query(t).then(_).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function o(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=85617);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511),s=t(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(o,i,a),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(55511),s=t(79428);function o({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,n.scryptSync)(o,i,a),c=s.Buffer.alloc(16,0),u=(0,n.createCipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"utf8","hex");return r+=u.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;no})},7971:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(9973),s=t.n(n),o=t(29021),i=t.n(o);async function a(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!i().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:i().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=48171);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect/disconnect.js.nft.json b/dsql-app/.local_dist/server/pages/api/connect/disconnect.js.nft.json index 655e501..9f544cb 100644 --- a/dsql-app/.local_dist/server/pages/api/connect/disconnect.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/connect/disconnect.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect/handshake.js b/dsql-app/.local_dist/server/pages/api/connect/handshake.js index 906e0ec..714b8cf 100644 --- a/dsql-app/.local_dist/server/pages/api/connect/handshake.js +++ b/dsql-app/.local_dist/server/pages/api/connect/handshake.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4065,e.ids=[4065],e.modules={60818:e=>{e.exports=require("dotenv")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},79551:e=>{e.exports=require("url")},28354:e=>{e.exports=require("util")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},83919:(e,r,t)=>{t.r(r),t.d(r,{config:()=>D,default:()=>m,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>f});var n=t(89947),o=t(2706),a=t(96762),c=t(7753),i=t(48225),l=t.n(i),u=t(6420),_=t.n(u),d=t(33364),p=t.n(d);t(29021),t(28354);let{URL:S}=t(79551);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await _()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{url:s,key:n,database:o,dbSchema:a,type:i,remoteDbs:u,targetDb:d}=e.body;try{if(!d?.tables)throw Error("No Target Database");await p()({tableName:"user_databases",data:{remote_connected:1,remote_connection_host:s,remote_connection_key:n,remote_connection_type:i,remote_db_full_name:d.dbFullName},identifierColumnName:"db_full_name",identifierValue:o.db_full_name}),await (0,c.e)({dbSchema:d,database:o,userId:t.id}),r.json({success:!0})}catch(e){console.log("Connect Handshake Error, =>",e.message),l()({component:"/api/connect/verify/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Operation Failed!"})}}let m=(0,a.M)(s,"default"),D=(0,a.M)(s,"config"),g=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/connect/handshake",pathname:"/api/connect/handshake",bundlePath:"",filename:""},userland:s})},7753:(e,r,t)=>{let s=t(19261),{execSync:n}=t(79646),o=t(29021),a=t(33873),c=async({userId:e,dbSchema:r,targetDb:t})=>(await s({userId:e,targetDatabase:t}),`User ${e} Db Schema Updated`),i=async({userId:e,dbSchema:r,database:t})=>{let s=a.resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${e}`,"main.json"),n=JSON.parse(o.readFileSync(s,"utf-8")),i=n.findIndex(e=>e.dbFullName==t.db_full_name);if(i<0)throw Error("Target Database not found in user schema data");let l={...n[i]};return n[i]=r,n[i].dbName=l.dbName,n[i].dbFullName=l.dbFullName,n[i].dbSlug=l.dbSlug,n[i].dbImage=l.dbImage,await c({dbSchema:n,userId:e,targetDb:t.db_full_name})};r.e=i},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),a=t(31341);async function c(e,r,t,c){let{keyCookieName:i,csrfCookieName:l}=a();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),{keyCookieName:a,csrfCookieName:c,oneTimeCodeName:i+=n}}},33364:(e,r,t)=>{let s=t(72583),n=t(16570),o=t(51348),a=t(21339),c=t(20503),i=t(44900);async function l({dbContext:e,paradigm:r,dbFullName:t,tableName:l,data:u,tableSchema:_,identifierColumnName:d,identifierValue:p,encryptionKey:S,encryptionSalt:f,useLocal:m}){if(!u||!Object.keys(u).length)return null;let D=!!m||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),g=m?i:D?o:a,h=Object.keys(u),E=[],y=[];for(let e=0;ee.fieldName===r):null,a=o&&o[0]?o[0]:null;if(null==t||void 0==t)continue;let i=/<[^>]+>/g;(a?.richText||String(t).match(i))&&(t=s(t,n)),a?.encrypted&&(t=c({data:t,encryptionKey:S,encryptionSalt:f})),"object"==typeof t&&(t=JSON.stringify(t)),a?.pattern&&!new RegExp(a.pattern,a.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),E.push(`\`${r}\`=?`),"number"==typeof t?y.push(String(t)):y.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}E.push(`date_updated='${Date()}'`),E.push(`date_updated_code='${Date.now()}'`);let b=`UPDATE ${l} SET ${E.join(",")} WHERE \`${d}\`=?`;return y.push(p),D?await g(b,y):await g({paradigm:r,database:t,queryString:b,queryValues:y})}e.exports=l},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=n("aes-192-cbc",s(a,c,i),o.alloc(16,0));try{let r=l.update(e,"utf8","hex");return r+=l.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),o=t(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){a.end(),i(JSON.parse(JSON.stringify(e)))}function d(e){a.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:c,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),c&&Array.isArray(c)&&c[0]?a.query(t,c).then(_).catch(d):a.query(t).then(_).catch(d)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function o(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[2451],()=>t(83919));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4065,e.ids=[4065],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},79551:e=>{e.exports=require("url")},28354:e=>{e.exports=require("util")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},63177:(e,t,r)=>{r.r(t),r.d(t,{config:()=>y,default:()=>E,routeModule:()=>D});var n={};r.r(n),r.d(n,{default:()=>h});var s=r(89947),a=r(2706),o=r(96762),i=r(76856),l=r(29021),u=r.n(l),c=r(33873),d=r.n(c);let _=async({userId:e,dbSchema:t,targetDb:r})=>(await (0,i.A)({userId:e,targetDatabase:r}),`User ${e} Db Schema Updated`),f=async({userId:e,dbSchema:t,database:r})=>{let n=d().resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${e}`,"main.json"),s=JSON.parse(u().readFileSync(n,"utf-8")),a=s.findIndex(e=>e.dbFullName==r.db_full_name);if(a<0)throw Error("Target Database not found in user schema data");let o={...s[a]};return s[a]=t,s[a].dbName=o.dbName,s[a].dbFullName=o.dbFullName,s[a].dbSlug=o.dbSlug,s[a].dbImage=o.dbImage,await _({dbSchema:s,userId:e,targetDb:r.db_full_name})};var p=r(67619),S=r(69842),g=r(30802);r(29021),r(28354);let{URL:m}=r(79551);async function h(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});let r=await (0,S.A)(e,t,!0);if(!r)return t.json({success:!1,msg:"Unauthorized"});let{url:n,key:s,database:a,dbSchema:o,type:i,remoteDbs:l,targetDb:u}=e.body;try{if(!u?.tables)throw Error("No Target Database");await (0,g.A)({tableName:"user_databases",data:{remote_connected:1,remote_connection_host:n,remote_connection_key:s,remote_connection_type:i,remote_db_full_name:u.dbFullName},identifierColumnName:"db_full_name",identifierValue:a.db_full_name}),await f({dbSchema:u,database:a,userId:r.id}),t.json({success:!0})}catch(e){console.log("Connect Handshake Error, =>",e.message),(0,p.default)({component:"/api/connect/verify/main-catch-error",message:e.message,user:r}),t.json({success:!1,msg:"Operation Failed!"})}}let E=(0,o.M)(n,"default"),y=(0,o.M)(n,"config"),D=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/connect/handshake",pathname:"/api/connect/handshake",bundlePath:"",filename:""},userland:n})},69842:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(48786),s=r(95969),a=r(29021),o=r.n(a),i=r(89159);async function l(e,t,r){let{keyCookieName:a,csrfCookieName:l}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!o().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!r){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,t,r)=>{r.d(t,{A:()=>n});function n(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=n;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=s}}},30802:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(72583),s=r.n(n),a=r(92652),o=r(48786),i=r(37275),l=r(68829),u=r(7971);async function c({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:c,tableSchema:d,identifierColumnName:_,identifierValue:f,encryptionKey:p,encryptionSalt:S,useLocal:g}){if(!c||!Object.keys(c).length)return null;let m=!!g||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),h=g?u.A:m?o.A:i.default,E=Object.keys(c),y=[],D=[];for(let e=0;ee.fieldName===t):null,o=n&&n[0]?n[0]:null;if(null==r||void 0==r)continue;let i=/<[^>]+>/g;(o?.richText||String(r).match(i))&&(r=s()(r,a.A)),o?.encrypted&&(r=(0,l.default)({data:r,encryptionKey:p,encryptionSalt:S})),"object"==typeof r&&(r=JSON.stringify(r)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),y.push(`\`${t}\`=?`),"number"==typeof r?D.push(String(r)):D.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}y.push(`date_updated='${Date()}'`),y.push(`date_updated_code='${Date.now()}'`);let b=`UPDATE \`${r}\`.\`${n}\` SET ${y.join(",")} WHERE \`${_}\`=?`;return D.push(f),m?await h(b,D):await h({paradigm:t,queryString:b,queryValues:D})}},92652:(e,t,r)=>{r.d(t,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},68829:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(55511),s=r(79428);function a({data:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,n.scryptSync)(a,o,i),u=s.Buffer.alloc(16,0),c=(0,n.createCipheriv)("aes-192-cbc",l,u);try{let t=c.update(e,"utf8","hex");return t+=c.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},48786:(e,t,r)=>{r.d(t,{A:()=>n});async function n(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},37275:(e,t,r)=>{async function n(e,t,r){try{if("string"==typeof t){let n=await e.query(s(t),r);return JSON.parse(JSON.stringify(n))}if("object"!=typeof t)return null;{let r=[];for(let n=0;na})},7971:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(9973),s=r.n(n),a=r(29021),o=r.n(a);async function i(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!o().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[2282],()=>r(63177));module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect/handshake.js.nft.json b/dsql-app/.local_dist/server/pages/api/connect/handshake.js.nft.json index 3d0c116..90dc3ac 100644 --- a/dsql-app/.local_dist/server/pages/api/connect/handshake.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/connect/handshake.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../.env","../../../../../jsonData/dbSchemas/main.json","../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/dotenv/lib/main.js","../../../../../node_modules/dotenv/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package-shared/data/defaultFields.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../jsonData/dbSchemas/main.json","../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package-shared/data/defaultFields.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect/verify.js b/dsql-app/.local_dist/server/pages/api/connect/verify.js index 91b6898..689564e 100644 --- a/dsql-app/.local_dist/server/pages/api/connect/verify.js +++ b/dsql-app/.local_dist/server/pages/api/connect/verify.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=3033,e.ids=[3033],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")},55591:e=>{e.exports=require("https")},79551:e=>{e.exports=require("url")},28354:e=>{e.exports=require("util")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},94871:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>m,routeModule:()=>E});var s={};t.r(s),t.d(s,{default:()=>f});var n=t(89947),o=t(2706),i=t(96762),a=t(83634),c=t.n(a),l=t(48225),u=t.n(l),p=t(6420),d=t.n(p);t(29021),t(28354);let{URL:_}=t(79551);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await d()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{url:s,key:n,database:o,dbSchema:i,type:a}=e.body;try{let{hostname:e,port:t,protocol:o}=new _(s),i=await c()({scheme:o,headers:{Authorization:n},hostname:e,port:t,path:"/api/connect",method:"POST",body:{url:s,key:n}}),a=JSON.parse(i);if(!a?.success)throw Error(a.msg||"Remote request failed");r.json({success:!0,payload:a.payload})}catch(e){console.log("Connect Verification Initialtor Error, =>",e.message),u()({component:"/api/connect/verify/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Operation Failed!"})}}let m=(0,i.M)(s,"default"),S=(0,i.M)(s,"config"),E=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/connect/verify",pathname:"/api/connect/verify",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:c,csrfCookieName:l}=i();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${d}/${p.csrf_k}`))return null;if(0==p.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:c+=n}}},83634:(e,r,t)=>{let s=t(55591),n=t(81630),{URL:o}=t(79551);e.exports=function({url:e,method:r,hostname:t,path:i,headers:a,body:c,port:l,scheme:u}){let p=c?JSON.stringify(c):null,d=e?new o(e):null,_={method:r||"GET",hostname:d?d.hostname:t,port:u?.match(/https/i)?443:d?d.protocol?.match(/https/i)?443:d.port:l?Number(l):80,headers:{}};return i&&(_.path=i),a&&(_.headers=a),c&&(_.headers["Content-Type"]="application/json",_.headers["Content-Length"]=p?Buffer.from(p).length:void 0),new Promise((e,r)=>{let t=(u?.match(/https/i)?s:d?.protocol?.match(/https/i)?s:n).request(_,t=>{var s="";t.on("data",function(e){s+=e}),t.on("end",function(){e(s)}),t.on("error",e=>{console.log("HTTP response error =>",e.message),r(`HTTP response error =>, ${e.message}`)}),t.on("close",()=>{console.log("HTTP(S) Response Closed Successfully")})});c&&t.write(p),t.on("error",e=>{console.log("HTTPS request ERROR =>",e.message),r(`HTTP request error =>, ${e.message}`)}),t.end()})}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=3033,e.ids=[3033],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},55591:e=>{e.exports=require("https")},79551:e=>{e.exports=require("url")},28354:e=>{e.exports=require("util")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},77666:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>p,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>d});var s=t(89947),o=t(2706),i=t(96762),a=t(61556),l=t(67619),c=t(69842);t(29021),t(28354);let{URL:u}=t(79551);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,c.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{url:n,key:s,database:o,dbSchema:i,type:d}=e.body;try{let{hostname:e,port:t,protocol:o}=new u(n),i=await (0,a.A)({scheme:o,headers:{Authorization:s},hostname:e,port:t,path:"/api/connect",method:"POST",body:{url:n,key:s}}),l=JSON.parse(i);if(!l?.success)throw Error(l.msg||"Remote request failed");r.json({success:!0,payload:l.payload})}catch(e){console.log("Connect Verification Initialtor Error, =>",e.message),(0,l.default)({component:"/api/connect/verify/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Operation Failed!"})}}let p=(0,i.M)(n,"default"),f=(0,i.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/connect/verify",pathname:"/api/connect/verify",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),o=t(29021),i=t.n(o),a=t(89159);async function l(e,r,t){let{keyCookieName:o,csrfCookieName:l}=(0,a.A)();if(!e.cookies?.[o]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[o]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=s}}},61556:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(55591),s=t.n(n),o=t(81630),i=t.n(o),a=t(79551);function l({url:e,method:r,hostname:t,path:n,headers:o,body:l,port:c,scheme:u}){let d=l?JSON.stringify(l):null,p=e?new a.URL(e):null,f={method:r||"GET",hostname:p?p.hostname:t,port:u?.match(/https/i)?443:p?p.protocol?.match(/https/i)?443:p.port:c?Number(c):80,headers:{}};return n&&(f.path=n),o&&(f.headers=o),l&&(f.headers["Content-Type"]="application/json",f.headers["Content-Length"]=d?Buffer.from(d).length:void 0),new Promise((e,r)=>{let t=(u?.match(/https/i)?s():p?.protocol?.match(/https/i)?s():i()).request(f,t=>{var n="";t.on("data",function(e){n+=e}),t.on("end",function(){e(n)}),t.on("error",e=>{console.log("HTTP response error =>",e.message),r(`HTTP response error =>, ${e.message}`)}),t.on("close",()=>{console.log("HTTP(S) Response Closed Successfully")})});l&&t.write(d),t.on("error",e=>{console.log("HTTPS request ERROR =>",e.message),r(`HTTP request error =>, ${e.message}`)}),t.end()})}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(29021),s=t.n(n);async function o({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||o.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${o.url}`),o?.body&&(n+=` Request Body: ${JSON.stringify(o.body,null,4)}`),a&&(n+=` IP: ${a}`),n+=` Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(i,a,c),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=94871);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511),s=t(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(o,i,a),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=77666);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/connect/verify.js.nft.json b/dsql-app/.local_dist/server/pages/api/connect/verify.js.nft.json index 2fb36eb..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/connect/verify.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/connect/verify.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/contact.js b/dsql-app/.local_dist/server/pages/api/contact.js index 318d067..abd2eac 100644 --- a/dsql-app/.local_dist/server/pages/api/contact.js +++ b/dsql-app/.local_dist/server/pages/api/contact.js @@ -1,7 +1,7 @@ -"use strict";(()=>{var e={};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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},93987:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>m,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>d});var n=t(89947),a=t(2706),o=t(96762),i=t(59474),l=t.n(i),c=t(48225),u=t.n(c);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let{name:t,email:s,message:n}=e.body;if(!s.match(/.*@.*\..*/))return r.json({success:!1,msg:"Invalid Email"});if(!t.match(/./)||!n.match(/./))return r.json({success:!1,msg:"Please Fill in all Fields"});try{(await l()({to:process.env.DSQL_CONTACT_EMAIL,html:` -

Message From ${t}, ${s}

-

${n}

- `,subject:"Contact Form Submission",text:`Message from ${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})},59474:(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}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},63133:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>u,routeModule:()=>m});var n={};t.r(n),t.d(n,{default:()=>c});var s=t(89947),a=t(2706),o=t(96762),i=t(96052),l=t(67619);async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let{name:t,email:n,message:s}=e.body;if(!n.match(/.*@.*\..*/))return r.json({success:!1,msg:"Invalid Email"});if(!t.match(/./)||!s.match(/./))return r.json({success:!1,msg:"Please Fill in all Fields"});try{(await (0,i.default)({to:process.env.DSQL_CONTACT_EMAIL,html:` +

Message From ${t}, ${n}

+

${s}

+ `,subject:"Contact Form Submission",text:`Message from ${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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} @@ -11,9 +11,9 @@ URL: ${a.url}`),a?.body&&(n+=` Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` IP: ${i}`),n+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=93987);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=63133);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/contact.js.nft.json b/dsql-app/.local_dist/server/pages/api/contact.js.nft.json index a849a3c..5000d59 100644 --- a/dsql-app/.local_dist/server/pages/api/contact.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/contact.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/createUserDatabase.js b/dsql-app/.local_dist/server/pages/api/createUserDatabase.js index a0fff56..812fb9e 100644 --- a/dsql-app/.local_dist/server/pages/api/createUserDatabase.js +++ b/dsql-app/.local_dist/server/pages/api/createUserDatabase.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=8893,e.ids=[8893],e.modules={60818:e=>{e.exports=require("dotenv")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},34932:(e,s,r)=>{r.r(s),r.d(s,{config:()=>R,default:()=>A,routeModule:()=>O});var a={};r.r(a),r.d(a,{default:()=>h});var t=r(89947),i=r(2706),n=r(96762),l=r(51348),u=r.n(l),o=r(48225),d=r.n(o),c=r(6420),_=r.n(c),p=r(47670),S=r.n(p),b=r(51926),m=r.n(b),E=r(19261),D=r.n(E);let f=r(29021);r(33873);let{execSync:N}=r(79646);async function h(e,s){if("POST"!==e.method)return s.json({msg:"Failed!"});let r=await _()(e,s,!0);if(!r)return s.json({success:!1,msg:"Unauthorized"});let a=await u()("SELECT * FROM users WHERE id = ?",[r.id]),t=a?.[0],{db_name:i,db_slug:n,db_description:l,db_image:o,duplicate:c,keepUpdated:p,keepDataUpdated:b}=e.body;if(n.match(/[^a-zA-Z0-9-_]/))return s.json({success:!1,msg:"Input Error"});let E=`datasquirel_user_${r.id}_${n}`,N=await m()(`CREATE DATABASE IF NOT EXISTS \`${E}\` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin`);if(!N?.affectedRows)return s.json({success:!1,msg:"Database Could Not be created!"});let h={user_id:r.id,db_name:i,db_slug:n,db_full_name:E,db_description:l,db_image:o};c&&p&&(h.active_clone="1",h.active_clone_parent_db=c),c&&b&&(h.active_data="1");let A=await S()({dbFullName:"datasquirel",tableName:"user_databases",data:h});if(A.insertId)try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r.id}/main.json`,a=JSON.parse(f.readFileSync(e,"utf8")),u={dbName:i,dbSlug:n,dbFullName:E,dbDescription:l,dbImage:o,tables:[]};if(c)try{let e=a.filter(e=>e.dbFullName===c)[0];u.tables=e.tables,p&&(u.childDatabase=!0,u.childDatabaseDbFullName=c,b&&(u.updateData=!0),e.childrenDatabases?e.childrenDatabases.push({dbFullName:E}):e.childrenDatabases=[{dbFullName:E}]);for(let e=0;e{r(81630);let a=r(51348),t=r(72835),i=r(29021),n=r(31341);async function l(e,s,r,l){let{keyCookieName:u,csrfCookieName:o}=n();if(!e.cookies?.[u]?.match(/./))return null;let d=t({encryptedString:e.cookies[u]});if(!d)return null;let c=JSON.parse(d);if(!c.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!i.existsSync(`${_}/${c.csrf_k}`))return null;if(0==c.verification_status&&!r){let e=await a(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&s.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=l},31341:e=>{e.exports=function(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=s;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=r;let l=s;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=a;let u=s;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:u+=t}}},51926:(e,s,r)=>{let a=r(29021),t=r(48225),i=r(45356);e.exports=async function(e){let s;"production".match(/dev/)&&a.appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{s=await i(e)}catch(e){t({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return s||null}},45356:(e,s,r)=>{let a=r(9973),t=r(21580),i=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,charset:"utf8mb4",ssl:t()}});e.exports=function(...e){try{return new Promise((s,r)=>{i.query(...e).then(e=>{i.end(),s(JSON.parse(JSON.stringify(e)))}).catch(e=>{i.end(),s({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}}};var s=require("../../webpack-api-runtime.js");s.C(e);var r=e=>s(s.s=e),a=s.X(0,[4050,2451],()=>r(34932));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8893,e.ids=[8893],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},8325:(e,a,s)=>{s.r(a),s.d(a,{config:()=>p,default:()=>S,routeModule:()=>f});var r={};s.r(r),s.d(r,{default:()=>E});var t=s(89947),i=s(2706),n=s(96762),l=s(48786),u=s(67619),d=s(69842),o=s(98e3),c=s(14160),_=s(76856);let b=s(29021);s(33873);let{execSync:m}=s(79646);async function E(e,a){if("POST"!==e.method)return a.json({msg:"Failed!"});let s=await (0,d.A)(e,a,!0);if(!s)return a.json({success:!1,msg:"Unauthorized"});let r=await (0,l.A)("SELECT * FROM users WHERE id = ?",[s.id]),t=r?.[0],{db_name:i,db_slug:n,db_description:m,db_image:E,duplicate:S,keepUpdated:p,keepDataUpdated:f}=e.body;if(n.match(/[^a-zA-Z0-9-_]/))return a.json({success:!1,msg:"Input Error"});let A=`datasquirel_user_${s.id}_${n}`,D=await (0,c.A)(`CREATE DATABASE IF NOT EXISTS \`${A}\` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin`);if(!D?.affectedRows)return a.json({success:!1,msg:"Database Could Not be created!"});let N={user_id:s.id,db_name:i,db_slug:n,db_full_name:A,db_description:m,db_image:E};S&&p&&(N.active_clone="1",N.active_clone_parent_db=S),S&&f&&(N.active_data="1");let O=await (0,o.A)({dbFullName:"datasquirel",tableName:"user_databases",data:N});if(O.insertId)try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s.id}/main.json`,r=JSON.parse(b.readFileSync(e,"utf8")),l={dbName:i,dbSlug:n,dbFullName:A,dbDescription:m,dbImage:E,tables:[]};if(S)try{let e=r.filter(e=>e.dbFullName===S)[0];l.tables=e.tables,p&&(l.childDatabase=!0,l.childDatabaseDbFullName=S,f&&(l.updateData=!0),e.childrenDatabases?e.childrenDatabases.push({dbFullName:A}):e.childrenDatabases=[{dbFullName:A}]);for(let e=0;e{s.d(a,{A:()=>u});var r=s(48786),t=s(95969),i=s(29021),n=s.n(i),l=s(89159);async function u(e,a,s){let{keyCookieName:i,csrfCookieName:u}=(0,l.A)();if(!e.cookies?.[i]?.match(/./))return null;let d=(0,t.A)({encryptedString:e.cookies[i]});if(!d)return null;let o=JSON.parse(d);if(!o.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(o.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!n().existsSync(`${c}/${o.csrf_k}`))return null;if(0==o.verification_status&&!s){let e=await (0,r.A)(`SELECT verification_status FROM users WHERE id='${o.id}'`);e&&e[0]&&1==e[0].verification_status&&a.setHeader("Set-Cookie",["user_refresh=1"])}return o?.date&&Date.now()-o.date>6048e5?null:o}},89159:(e,a,s)=>{s.d(a,{A:()=>r});function r(e){let a=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=a;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=s;let l=a;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=r;let u=a;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:u+=t}}},14160:(e,a,s)=>{s.d(a,{A:()=>l});var r=s(29021),t=s.n(r),i=s(67619),n=s(47546);async function l(e){let a;"production".match(/dev/)&&t().appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{a=await (0,n.A)(e)}catch(e){(0,i.default)({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return a||null}},47546:(e,a,s)=>{s.d(a,{A:()=>r});function r(...e){let a=global.DSQL_DB_CONN;try{return new Promise((s,r)=>{a.query(...e).then(e=>{a.end(),s(JSON.parse(JSON.stringify(e)))}).catch(e=>{a.end(),s({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}}};var a=require("../../webpack-api-runtime.js");a.C(e);var s=e=>a(a.s=e),r=a.X(0,[1251,2282],()=>s(8325));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/createUserDatabase.js.nft.json b/dsql-app/.local_dist/server/pages/api/createUserDatabase.js.nft.json index bc90831..dc22bbc 100644 --- a/dsql-app/.local_dist/server/pages/api/createUserDatabase.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/createUserDatabase.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.env","../../../../jsonData/dbSchemas/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/main.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteApiKey.js b/dsql-app/.local_dist/server/pages/api/deleteApiKey.js index 2c6d2a3..ea37f8f 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteApiKey.js +++ b/dsql-app/.local_dist/server/pages/api/deleteApiKey.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=7015,e.ids=[7015],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},5261:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>m,routeModule:()=>A});var s={};t.r(s),t.d(s,{default:()=>D});var n=t(89947),o=t(2706),a=t(96762),i=t(72835),l=t.n(i),c=t(48225),u=t.n(c),_=t(6420),p=t.n(_),d=t(64122),S=t.n(d),f=t(77619),E=t.n(f);let g=t(29021);async function D(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await p()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{id:s,key:n,user_id:o}=e.body;try{let e=process.env.DSQL_API_KEYS_PATH;if(!e)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let o=E()({key:String(l()({encryptedString:n})),user_id:t.id});if(!o?.sign)throw await S()({dbFullName:"datasquirel",tableName:"api_keys",identifierColumnName:"id",identifierValue:s}),Error("API KEY is Invalid");try{let r=`${e}/${o?.sign}`;g.unlinkSync(r)}catch(e){console.log("Error Deleting API key",e.message)}await S()({dbFullName:"datasquirel",tableName:"api_keys",identifierColumnName:"id",identifierValue:s}),r.json({success:!0})}catch(e){console.log(`ERROR Deleting API Key => ${e.message}`),u()({component:"/api/deleteApiKey/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Deletion Failed!"})}}let m=(0,a.M)(s,"default"),y=(0,a.M)(s,"config"),A=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/deleteApiKey",pathname:"/api/deleteApiKey",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),a=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:c}=a();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=i},77619:(e,r,t)=>{let s=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:o,media:a})=>{if(!e||!o)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=n({encryptedString:e}),c=JSON.parse(l||""),u=s.existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(o)||!u)return null;if(!c.target_database||a)return c;if(!r&&c.target_database)return null;let _=c.target_database?.split(",").includes(String(r));if(_&&!c.target_table)return c;if(_&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:l+=n}}},64122:(e,r,t)=>{let s=t(51348),n=t(21339),o=t(44900);async function a({dbContext:e,paradigm:r,dbFullName:t,tableName:a,identifierColumnName:i,identifierValue:l,useLocal:c}){try{let u=!!c||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),_=c?o:u?s:n,p=`DELETE FROM ${a} WHERE \`${i}\`=?`;return u?await _(p,[l]):await _({paradigm:r,queryString:p,database:t,queryValues:[l]})}catch(e){return null}}e.exports=a},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let a=new Date,i=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=7015,e.ids=[7015],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},33336:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>p,routeModule:()=>g});var n={};t.r(n),t.d(n,{default:()=>f});var s=t(89947),a=t(2706),i=t(96762),o=t(95969),l=t(67619),u=t(69842),c=t(61932),d=t(56081);let _=t(29021);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{id:n,key:s,user_id:a}=e.body;try{let e=process.env.DSQL_API_KEYS_PATH;if(!e)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let a=(0,d.A)({key:String((0,o.A)({encryptedString:s})),user_id:t.id});if(!a?.sign)throw await (0,c.A)({dbFullName:"datasquirel",tableName:"api_keys",identifierColumnName:"id",identifierValue:n}),Error("API KEY is Invalid");try{let r=`${e}/${a?.sign}`;_.unlinkSync(r)}catch(e){console.log("Error Deleting API key",e.message)}await (0,c.A)({dbFullName:"datasquirel",tableName:"api_keys",identifierColumnName:"id",identifierValue:n}),r.json({success:!0})}catch(e){console.log(`ERROR Deleting API Key => ${e.message}`),(0,l.default)({component:"/api/deleteApiKey/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Deletion Failed!"})}}let p=(0,i.M)(n,"default"),S=(0,i.M)(n,"config"),g=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/deleteApiKey",pathname:"/api/deleteApiKey",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),a=t(29021),i=t.n(a),o=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},56081:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(29021),s=t.n(n),a=t(95969);let i=({key:e,database:r,table:t,user_id:n,media:i})=>{if(!e||!n)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,a.A)({encryptedString:e}),u=JSON.parse(l||""),c=s().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(n)||!c)return null;if(!u.target_database||i)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=s}}},61932:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(48786),s=t(37275),a=t(7971);async function i({dbContext:e,paradigm:r,dbFullName:t,tableName:i,identifierColumnName:o,identifierValue:l,useLocal:u}){try{let c=!!u||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=u?a.A:c?n.A:s.default,_=`DELETE FROM \`${t}\`.\`${i}\` WHERE \`${o}\`=?`;return c?await d(_,[l]):await d({paradigm:r,queryString:_,queryValues:[l]})}catch(e){return null}}},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 i=new Date,o=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(n+=` -URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),a?.url&&(n+=` +URL: ${a.url}`),a?.body&&(n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${i.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(a,i,l),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),o=t(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){a.end(),l(JSON.parse(JSON.stringify(e)))}function p(e){a.end(),l({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),i&&Array.isArray(i)&&i[0]?a.query(t,i).then(_).catch(p):a.query(t).then(_).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function o(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=5261);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(a,i,o),u=s.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(9973),s=t.n(n),a=t(29021),i=t.n(a);async function o(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!i().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:i().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=33336);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteApiKey.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteApiKey.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteApiKey.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteApiKey.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteDbUser.js b/dsql-app/.local_dist/server/pages/api/deleteDbUser.js index e2abd19..c902c47 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteDbUser.js +++ b/dsql-app/.local_dist/server/pages/api/deleteDbUser.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=7081,e.ids=[7081],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},80061:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),a=t(2706),o=t(96762),c=t(57638),i=t.n(c),l=t(6420),u=t.n(l);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await u()(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{dbFullName:t,userId:s}=e.body;await i()({database:t,queryString:"DELETE FROM users WHERE id = ?",queryValuesArray:[s]}),r.json({success:!0,msg:"User Deleted!"})}t(29021);let d=(0,o.M)(s,"default"),p=(0,o.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/deleteDbUser",pathname:"/api/deleteDbUser",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function c(e,r,t,c){let{keyCookieName:i,csrfCookieName:l}=o();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),c+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:c,oneTimeCodeName:i+=n}}},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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,c=(()=>{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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=7081,e.ids=[7081],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},67859:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>u,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>c});var s=t(89947),a=t(2706),o=t(96762),l=t(30944),i=t(69842);async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await (0,i.A)(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{dbFullName:t,userId:n}=e.body;await (0,l.A)({database:t,queryString:`DELETE FROM ${t}.users WHERE id = ?`,queryValuesArray:[n]}),r.json({success:!0,msg:"User Deleted!"})}t(29021);let u=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/deleteDbUser",pathname:"/api/deleteDbUser",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(48786),s=t(95969),a=t(29021),o=t.n(a),l=t(89159);async function i(e,r,t){let{keyCookieName:a,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[a]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[a]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=n;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function a({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},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,l=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),c&&(n+=` -IP: ${c}`),n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let i=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),c=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:l}){let u;let _=!!l||!!t?.match(/^datasquirel$/),d=l?c:_?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?_?await d(e,r):await d({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):_?await d(e):await d({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await s({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,c,i),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function d(e){o.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:c,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),c&&Array.isArray(c)&&c[0]?o.query(t,c).then(_).catch(d):o.query(t).then(_).catch(d)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=80061);module.exports=t})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(43775),s=t(67619),a=t(48786),o=t(37275),l=t(7971);async function i({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?l.A:d?a.A:o.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await (0,n.A)({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,n.scryptSync)(a,o,l),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",i,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function l(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=67859);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteDbUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteDbUser.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteDbUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteDbUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteInvitation.js b/dsql-app/.local_dist/server/pages/api/deleteInvitation.js index 229bc4f..7d878ea 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteInvitation.js +++ b/dsql-app/.local_dist/server/pages/api/deleteInvitation.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=291,e.ids=[291],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},50667:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),i=t(2706),o=t(96762),a=t(51348),u=t.n(a),c=t(6420),l=t.n(c);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});await u()("DELETE FROM invitations WHERE id = ? AND inviting_user_id = ?",[e.body.id,t.id]),r.json({success:!0})}let d=(0,o.M)(s,"default"),p=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/deleteInvitation",pathname:"/api/deleteInvitation",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),i=t(29021),o=t(31341);async function a(e,r,t,a){let{keyCookieName:u,csrfCookieName:c}=o();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,a,u),i.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=50667);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=291,e.ids=[291],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},7808:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>l,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>c});var i=t(89947),s=t(2706),o=t(96762),a=t(48786),u=t(69842);async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});await (0,a.A)("DELETE FROM invitations WHERE id = ? AND inviting_user_id = ?",[e.body.id,t.id]),r.json({success:!0})}let l=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),_=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/deleteInvitation",pathname:"/api/deleteInvitation",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(48786),i=t(95969),s=t(29021),o=t.n(s),a=t(89159);async function u(e,r,t){let{keyCookieName:s,csrfCookieName:u}=(0,a.A)();if(!e.cookies?.[s]?.match(/./))return null;let c=(0,i.A)({encryptedString:e.cookies[s]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),s&&(o+=`${s}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),s&&(a+=`${s}_`),a+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),s&&(u+=`${s}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=i}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),i=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(s,o,a),c=i.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=7808);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteInvitation.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteInvitation.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteInvitation.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteInvitation.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js b/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js index 9c32f84..238060c 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js +++ b/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=9918,e.ids=[9918],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},30976:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>m,routeModule:()=>y});var s={};t.r(s),t.d(s,{default:()=>E});var n=t(89947),o=t(2706),a=t(96762),i=t(51348),c=t.n(i),l=t(48225),u=t.n(l),d=t(6420),_=t.n(d),p=t(33873),S=t.n(p);let f=t(29021);async function E(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await _()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{folder:s}=e.body;try{async function n({path:e}){try{let r=f.readdirSync(e);for(let t=0;t",e.message)}}let e=process.env.DSQL_STATIC_SERVER_DIR;if(!e)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let o=S().join(e,`images/user-images/user-${t.id}/`),a=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/media/`,i=o+(s?s.replace(/\.| /g,"")+"/":""),l=a+(s?s.replace(/\.| /g,"")+"/":"");await n({path:i}),await n({path:l}),r.json({success:!0})}catch(e){u()({component:"/api/deleteMediaFolder/main-catch-error",message:e.message,user:t}),r.json({success:!1})}}let m=(0,a.M)(s,"default"),g=(0,a.M)(s,"config"),y=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/deleteMediaFolder",pathname:"/api/deleteMediaFolder",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),a=t(31341);async function i(e,r,t,i){let{keyCookieName:c,csrfCookieName:l}=a();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:c+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let a=new Date,i=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=9918,e.ids=[9918],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},32306:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>p,routeModule:()=>S});var n={};t.r(n),t.d(n,{default:()=>f});var s=t(89947),i=t(2706),a=t(96762),o=t(48786),l=t(67619),c=t(69842),u=t(33873),d=t.n(u);let _=t(29021);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,c.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{folder:n}=e.body;try{async function s({path:e}){try{let r=_.readdirSync(e);for(let t=0;t",e.message)}}let e=process.env.DSQL_STATIC_SERVER_DIR;if(!e)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let i=d().join(e,`images/user-images/user-${t.id}/`),a=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/media/`,l=i+(n?n.replace(/\.| /g,"")+"/":""),c=a+(n?n.replace(/\.| /g,"")+"/":"");await s({path:l}),await s({path:c}),r.json({success:!0})}catch(e){(0,l.default)({component:"/api/deleteMediaFolder/main-catch-error",message:e.message,user:t}),r.json({success:!1})}}let p=(0,a.M)(n,"default"),E=(0,a.M)(n,"config"),S=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/deleteMediaFolder",pathname:"/api/deleteMediaFolder",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),i=t(29021),a=t.n(i),o=t(89159);async function l(e,r,t){let{keyCookieName:i,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:l+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var n=t(29021),s=t.n(n);async function i({user:e,message:r,component:t,noMail:n,req:i}){let a=new Date,o=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(n+=` -URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` +User Email: ${e?.email}`),i?.url&&(n+=` +URL: ${i.url}`),i?.body&&(n+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(a,i,c),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=30976);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(i,a,o),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=32306);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteMediaFolder.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js b/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js index 51d1fc7..79929dd 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js +++ b/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=1658,e.ids=[1658],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},43390:(e,r,s)=>{s.r(r),s.d(r,{config:()=>m,default:()=>g,routeModule:()=>y});var t={};s.r(t),s.d(t,{default:()=>D});var n=s(89947),a=s(2706),o=s(96762),i=s(64122),l=s.n(i),c=s(73677),u=s.n(c),d=s(39831),_=s.n(d),p=s(48225),S=s.n(p),E=s(6420),f=s.n(E);async function D(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let s=await f()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{dbFullName:t,tableName:n,entryId:a,dbSlug:o,dbId:i,delegated:c}=e.body;try{let c=await _()({databaseSlug:o,request:e,user:s,query:e.query});if(!await u()({user:s,confirmedDelegetedUser:c,database:o,table:n,dbId:i,priviledgeRegex:/Delete Entries/i}))return r.json({success:!1,msg:"Unauthorized"});await l()({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:t,tableName:n,identifierColumnName:"id",identifierValue:a}),r.json({success:!0})}catch(e){S()({component:"/api/deleteTableEntry/main-catch-error",message:e.message,user:s}),r.json({success:!1,msg:"Deletion Failed!"})}}let g=(0,o.M)(t,"default"),m=(0,o.M)(t,"config"),y=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/deleteTableEntry",pathname:"/api/deleteTableEntry",bundlePath:"",filename:""},userland:t})},73677:(e,r,s)=>{let t=s(51348),n=s(48225);e.exports=async function({user:e,confirmedDelegetedUser:r,database:s,table:a,priviledgeRegex:o,dbId:i}){let l,c;try{r?.delegated?(l=await t("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,s,a]),c=l[0]?.priviledge?.match(o)):(l=await t("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,a,i]),c=!0)}catch(r){n({component:"checkUserRights",message:r.message,user:e})}return!!l&&!!l[0]&&!!c}},39831:(e,r,s)=>{s(81630);let t=s(72835);e.exports=async function({request:e,databaseSlug:r,user:s,query:n}){try{let a=s.id,o=null;if(!n?.delegated)return{dbUserId:a};let i=n.dbUserId,l=`${process.env.DSQL_USER_DB_PREFIX}${i}_${r}`,c=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${l}`;try{if(!e.cookies?.[c])throw Error("Cookie not present");let s=t({encryptedString:e.cookies[c]});if(!s)throw Error("Invalid Token");if((o=JSON.parse(s)).databaseSlug===r)return{dbUserId:a=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:a}}catch(e){return null}}},6420:(e,r,s)=>{s(81630);let t=s(51348),n=s(72835),a=s(29021),o=s(31341);async function i(e,r,s,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},64122:(e,r,s)=>{let t=s(51348),n=s(21339),a=s(44900);async function o({dbContext:e,paradigm:r,dbFullName:s,tableName:o,identifierColumnName:i,identifierValue:l,useLocal:c}){try{let u=!!c||!e?.match(/dsql.user/i)&&(!s||!!s.match(/^datasquirel$/)),d=c?a:u?t:n,_=`DELETE FROM ${o} WHERE \`${i}\`=?`;return u?await d(_,[l]):await d({paradigm:r,queryString:_,database:s,queryValues:[l]})}catch(e){return null}}e.exports=o},48225:(e,r,s)=>{let t=s(29021),{IncomingMessage:n}=s(81630);e.exports=async function({user:e,message:r,component:s,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"],s=a.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||t||r||a.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=1658,e.ids=[1658],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},17675:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>f,routeModule:()=>p});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),a=t(2706),o=t(96762),l=t(61932),i=t(31495),u=t(60125),c=t(67619),d=t(69842);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,d.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbFullName:s,tableName:n,entryId:a,dbSlug:o,dbId:_,delegated:f}=e.body;try{let c=await (0,u.A)({databaseSlug:o,request:e,user:t,query:e.query});if(!await (0,i.A)({user:t,confirmedDelegetedUser:c,database:o,table:n,dbId:_,priviledgeRegex:/Delete Entries/i}))return r.json({success:!1,msg:"Unauthorized"});await (0,l.A)({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:s,tableName:n,identifierColumnName:"id",identifierValue:a}),r.json({success:!0})}catch(e){(0,c.default)({component:"/api/deleteTableEntry/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Deletion Failed!"})}}let f=(0,o.M)(s,"default"),E=(0,o.M)(s,"config"),p=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/deleteTableEntry",pathname:"/api/deleteTableEntry",bundlePath:"",filename:""},userland:s})},31495:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(48786),n=t(67619);async function a({user:e,confirmedDelegetedUser:r,database:t,table:a,priviledgeRegex:o,dbId:l}){let i,u;try{r?.delegated?(i=await (0,s.A)("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,t,a]),u=i[0]?.priviledge?.match(o)):(i=await (0,s.A)("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,a,l]),u=!0)}catch(r){(0,n.default)({component:"checkUserRights",message:r.message,user:e})}return!!i&&!!i[0]&&!!u}},60125:(e,r,t)=>{t.d(r,{A:()=>n});var s=t(95969);async function n({request:e,databaseSlug:r,user:t,query:n}){try{let a=t.id,o=null;if(!n?.delegated)return{dbUserId:a};let l=n.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,u=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[u])throw Error("Cookie not present");let t=(0,s.A)({encryptedString:e.cookies[u]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:a=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:a}}catch(e){return null}}},69842:(e,r,t)=>{t.d(r,{A:()=>i});var s=t(48786),n=t(95969),a=t(29021),o=t.n(a),l=t(89159);async function i(e,r,t){let{keyCookieName:a,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,n.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=n}}},61932:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(48786),n=t(37275),a=t(7971);async function o({dbContext:e,paradigm:r,dbFullName:t,tableName:o,identifierColumnName:l,identifierValue:i,useLocal:u}){try{let c=!!u||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=u?a.A:c?s.A:n.default,_=`DELETE FROM \`${t}\`.\`${o}\` WHERE \`${l}\`=?`;return c?await d(_,[i]):await d({paradigm:r,queryString:_,queryValues:[i]})}catch(e){return null}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(29021),n=t.n(s);async function a({user:e,message:r,component:t,noMail:s,req:a}){let o=new Date,l=(()=>{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 s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(s+=` +IP: ${l}`),s+=` Date: ${o.toDateString()} -========================================`,t.existsSync("./.tmp/error.log")||t.writeFileSync("./.tmp/error.log","","utf-8");let l=t.readFileSync("./.tmp/error.log","utf-8");t.writeFileSync("./.tmp/error.log",n),t.appendFileSync("./.tmp/error.log",` +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let i=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:a}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",t(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),a=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,s)=>{let t=s(29021);s(33873);let n=s(9973),a=s(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:s,queryValues:i}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),l(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),l({error:e.message,queryStringGenerated:s,queryValuesGenerated:i,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),i&&Array.isArray(i)&&i[0]?o.query(s,i).then(d).catch(_):o.query(s).then(d).catch(_)}catch(e){t.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,s)=>{let t=s(9973),n=s(21580);async function a(...e){let r=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let s=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=43390);module.exports=s})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511),n=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,s.scryptSync)(a,o,l),u=n.Buffer.alloc(16,0),c=(0,s.createDecipheriv)("aes-192-cbc",i,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function s(e,r,t){try{if("string"==typeof r){let s=await e.query(n(r),t);return JSON.parse(JSON.stringify(s))}if("object"!=typeof r)return null;{let t=[];for(let s=0;sa})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(9973),n=t.n(s),a=t(29021),o=t.n(a);async function l(...e){let r=n()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=17675);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteTableEntry.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUser.js b/dsql-app/.local_dist/server/pages/api/deleteUser.js index a4ced0f..d16f1fc 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUser.js +++ b/dsql-app/.local_dist/server/pages/api/deleteUser.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=2735,e.ids=[2735],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},21734:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>m,routeModule:()=>D});var s={};t.r(s),t.d(s,{default:()=>R});var i=t(89947),n=t(2706),a=t(96762),o=t(51348),u=t.n(o),l=t(83743),c=t.n(l),d=t(48225),E=t.n(d),_=t(6420),p=t.n(_);let S=t(29021),f=t(33873);async function R(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await p()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});"production".match(/prod/i);try{await u()(`DELETE FROM users WHERE id='${t.id}'`),await u()(`DELETE FROM user_users WHERE invited_user_id='${t.id}' OR user_id='${t.id}'`),await u()(`DELETE FROM delegated_user_tables WHERE delegated_user_id='${t.id}' OR root_user_id='${t.id}'`),await u()(`DELETE FROM user_databases WHERE user_id='${t.id}'`),await u()(`DELETE FROM user_database_tables WHERE user_id='${t.id}'`),await u()(`DELETE FROM user_media WHERE user_id='${t.id}'`),await u()(`DELETE FROM delegated_users WHERE user_id='${t.id}' OR delegated_user_id='${t.id}'`),await u()(`DELETE FROM unsubscribes WHERE user_id='${t.id}'`),await u()(`DELETE FROM notifications WHERE user_id='${t.id}'`),await u()(`DELETE FROM api_keys WHERE user_id='${t.id}'`),await u()(`DELETE FROM invitations WHERE inviting_user_id='${t.id}' OR invited_user_email='${t.email}'`);let e=await u()("SELECT * FROM mariadb_users WHERE user_id = ?",[t.id]);for(let r=0;r{let s=t(29021);e.exports=function({rootFolderPath:e}){try{return function e(r){try{let t=s.readdirSync(r);for(let i=0;i",e.message),!1}}},6420:(e,r,t)=>{t(81630);let s=t(51348),i=t(72835),n=t(29021),a=t(31341);async function o(e,r,t,o){let{keyCookieName:u,csrfCookieName:l}=a();if(!e.cookies?.[u]?.match(/./))return null;let c=i({encryptedString:e.cookies[u]});if(!c)return null;let d=JSON.parse(c);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let E=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!E)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n.existsSync(`${E}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),n&&(a+=`${n}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:u+=i}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:i}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:i,req:n}){let a=new Date,o=(()=>{if(!n)return null;try{let e=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],i=t||s||r||n.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2735,e.ids=[2735],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},12057:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>S,routeModule:()=>R});var i={};t.r(i),t.d(i,{default:()=>f});var s=t(89947),n=t(2706),a=t(96762),o=t(48786),u=t(29021),l=t.n(u),d=t(67619),c=t(69842);let E=t(29021),_=t(33873);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,c.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});"production".match(/prod/i);try{await (0,o.A)(`DELETE FROM users WHERE id='${t.id}'`),await (0,o.A)(`DELETE FROM user_users WHERE invited_user_id='${t.id}' OR user_id='${t.id}'`),await (0,o.A)(`DELETE FROM delegated_user_tables WHERE delegated_user_id='${t.id}' OR root_user_id='${t.id}'`),await (0,o.A)(`DELETE FROM user_databases WHERE user_id='${t.id}'`),await (0,o.A)(`DELETE FROM user_database_tables WHERE user_id='${t.id}'`),await (0,o.A)(`DELETE FROM user_media WHERE user_id='${t.id}'`),await (0,o.A)(`DELETE FROM delegated_users WHERE user_id='${t.id}' OR delegated_user_id='${t.id}'`),await (0,o.A)(`DELETE FROM unsubscribes WHERE user_id='${t.id}'`),await (0,o.A)(`DELETE FROM notifications WHERE user_id='${t.id}'`),await (0,o.A)(`DELETE FROM api_keys WHERE user_id='${t.id}'`),await (0,o.A)(`DELETE FROM invitations WHERE inviting_user_id='${t.id}' OR invited_user_email='${t.email}'`);let e=await (0,o.A)("SELECT * FROM mariadb_users WHERE user_id = ?",[t.id]);for(let r=0;r",e.message),!1}}({rootFolderPath:a}),r.json({success:!0})}catch(e){(0,d.default)({component:"/api/addApiKey/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"User could not be deleted!"})}}let S=(0,a.M)(i,"default"),p=(0,a.M)(i,"config"),R=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/deleteUser",pathname:"/api/deleteUser",bundlePath:"",filename:""},userland:i})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var i=t(48786),s=t(95969),n=t(29021),a=t.n(n),o=t(89159);async function u(e,r,t){let{keyCookieName:n,csrfCookieName:u}=(0,o.A)();if(!e.cookies?.[n]?.match(/./))return null;let l=(0,s.A)({encryptedString:e.cookies[n]});if(!l)return null;let d=JSON.parse(l);if(!d.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(d.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${c}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await (0,i.A)(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}},89159:(e,r,t)=>{t.d(r,{A:()=>i});function i(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",i=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),n&&(a+=`${n}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=i;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:u+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>n});var i=t(29021),s=t.n(i);async function n({user:e,message:r,component:t,noMail:i,req:n}){let a=new Date,o=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],r=n.headers["x-real-ip"],t=n.headers["cf-connecting-ip"],i=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||i||r||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${n.url}`),n?.body&&(i+=` Request Body: ${JSON.stringify(n.body,null,4)}`),o&&(i+=` IP: ${o}`),i+=` Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let u=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",i),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let u=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",i),s().appendFileSync("./.tmp/error.log",` -${u}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:i}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=i("aes-192-cbc",s(a,o,u),n.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),i=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:i()}});async function a(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=21734);module.exports=t})(); \ No newline at end of file +${u}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>n});var i=t(55511),s=t(79428);function n({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,i.scryptSync)(n,a,o),l=s.Buffer.alloc(16,0),d=(0,i.createDecipheriv)("aes-192-cbc",u,l);try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>i});async function i(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=12057);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteUser.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js b/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js index 791af0a..7cdfb9a 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js +++ b/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=3e3,e.ids=[3e3],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},47389:(e,r,t)=>{t.r(r),t.d(r,{config:()=>D,default:()=>m,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>E});var n=t(89947),a=t(2706),o=t(96762),i=t(51348),l=t.n(i),c=t(48225),u=t.n(c),d=t(6420),_=t.n(d),p=t(51926),f=t.n(p);let S=t(29021);async function E(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await _()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{id:s,db_slug:n,db_full_name:a}=e.body;if(!a.match(`user_${t.id}_`))throw Error("Database doesn't belong to user");await f()(`DROP DATABASE \`${a}\``),await l()("DELETE FROM user_databases WHERE id = ?",[s]),await l()("DELETE FROM user_users WHERE user_id = ? AND `database` = ?",[t.id,n]);try{let e;let s=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,n=JSON.parse(S.readFileSync(s,"utf8")),o=n.filter((r,t)=>{if(r.dbFullName===a)return e=t,!0});if(o[0].childDatabase){let e=n.filter(e=>e.dbFullName===o[0].childDatabaseDbFullName)[0],r=e.childrenDatabases?.findIndex(e=>e.dbFullName===o[0].childDatabaseDbFullName);e.childrenDatabases&&"number"==typeof r&&e.childrenDatabases.splice(r,1)}n.splice(e,1),S.writeFileSync(`${s}`,JSON.stringify(n),"utf8"),r.json({success:!0})}catch(e){u()({component:"/api/deleteUserDatabase/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"File Updates Failed"})}}let m=(0,o.M)(s,"default"),D=(0,o.M)(s,"config"),g=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/deleteUserDatabase",pathname:"/api/deleteUserDatabase",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},51926:(e,r,t)=>{let s=t(29021),n=t(48225),a=t(45356);e.exports=async function(e){let r;"production".match(/dev/)&&s.appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{r=await a(e)}catch(e){n({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return r||null}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=3e3,e.ids=[3e3],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},96257:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>p,routeModule:()=>m});var n={};t.r(n),t.d(n,{default:()=>_});var s=t(89947),a=t(2706),i=t(96762),l=t(29021),o=t.n(l),u=t(48786),c=t(67619),d=t(69842),f=t(14160);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,d.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{id:n,db_slug:s,db_full_name:a}=e.body;if(!a.match(`user_${t.id}_`))throw Error("Database doesn't belong to user");await (0,f.A)(`DROP DATABASE \`${a}\``),await (0,u.A)("DELETE FROM user_databases WHERE id = ?",[n]),await (0,u.A)("DELETE FROM user_users WHERE user_id = ? AND `database` = ?",[t.id,s]);try{let e;let n=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,s=JSON.parse(o().readFileSync(n,"utf8")),i=s.filter((r,t)=>{if(r.dbFullName===a)return e=t,!0});if(i[0].childDatabase){let e=s.filter(e=>e.dbFullName===i[0].childDatabaseDbFullName)[0],r=e.childrenDatabases?.findIndex(e=>e.dbFullName===i[0].childDatabaseDbFullName);e.childrenDatabases&&"number"==typeof r&&e.childrenDatabases.splice(r,1)}s.splice(e,1),o().writeFileSync(`${n}`,JSON.stringify(s),"utf8"),r.json({success:!0})}catch(e){(0,c.default)({component:"/api/deleteUserDatabase/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"File Updates Failed"})}}let p=(0,i.M)(n,"default"),E=(0,i.M)(n,"config"),m=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/deleteUserDatabase",pathname:"/api/deleteUserDatabase",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(48786),s=t(95969),a=t(29021),i=t.n(a),l=t(89159);async function o(e,r,t){let{keyCookieName:a,csrfCookieName:o}=(0,l.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=n;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),{keyCookieName:i,csrfCookieName:l,oneTimeCodeName:o+=s}}},14160:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(29021),s=t.n(n),a=t(67619),i=t(47546);async function l(e){let r;"production".match(/dev/)&&s().appendFileSync("./.tmp/sqlQuery.sql",e+"\n"+Date()+"\n\n\n","utf8");try{r=await (0,i.A)(e)}catch(e){(0,a.default)({component:"noDatabaseDbHandler",message:e.message}),console.log("ERROR in noDatabaseDbHandler =>",e.message)}return r||null}},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 i=new Date,l=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` +Date: ${i.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let o=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},45356:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function(...e){try{return new Promise((r,t)=>{a.query(...e).then(e=>{a.end(),r(JSON.parse(JSON.stringify(e)))}).catch(e=>{a.end(),r({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=47389);module.exports=t})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,n.scryptSync)(a,i,l),u=s.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",o,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},47546:(e,r,t)=>{t.d(r,{A:()=>n});function n(...e){let r=global.DSQL_DB_CONN;try{return new Promise((t,n)=>{r.query(...e).then(e=>{r.end(),t(JSON.parse(JSON.stringify(e)))}).catch(e=>{r.end(),t({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=96257);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteUserDatabase.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js b/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js index bdb0917..e3735f2 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js +++ b/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8105,e.ids=[8105],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},71405:(e,r,s)=>{s.r(r),s.d(r,{config:()=>v,default:()=>g,routeModule:()=>y});var t={};s.r(t),s.d(t,{default:()=>D});var n=s(89947),o=s(2706),a=s(96762),i=s(33873),c=s.n(i),l=s(48225),u=s.n(l),_=s(6420),d=s.n(_),S=s(48227),p=s.n(S),f=s(64122),E=s.n(f);let m=s(29021);async function D(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let s=await d()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let t=e.body,{media_name:n,media_url:o,media_thumbnail_url:a,media_path:i,media_thumbnail_path:l,folder:_}=t;"production".match(/production/);try{let e=t?.private==1;if(!process.env.DSQL_STATIC_SERVER_DIR)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let n=p()({isPrivate:e,userId:s.id,folder:t.folder?t.folder+"/":"",video:!!t.media_type?.match(/video/i)});if(!n)throw Error("Couldn't grab paths!");let{fileRootPath:i,urlRootPath:l,relativePath:u}=n;_?.match(/./);let d=o.match(/[^\/]+$/)[0],S=a.match(/[^\/]+$/)[0],f=c().normalize(i+d),D=c().normalize(i+S);m.unlinkSync(f);try{m.unlinkSync(D)}catch(e){}await E()({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"id",identifierValue:t.id}),r.json({success:!0})}catch(e){console.log("ERROR in deleting user media =>",e.message),u()({component:"/api/deleteUserMedia/main-catch-error",message:e.message,user:s}),r.json({success:!1,msg:"Database Files could not be written!"})}}let g=(0,a.M)(t,"default"),v=(0,a.M)(t,"config"),y=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/deleteUserMedia",pathname:"/api/deleteUserMedia",bundlePath:"",filename:""},userland:t})},48227:(e,r,s)=>{let t=s(29021),n=s(33873);e.exports=function({isPrivate:e,userId:r,folder:s,video:o,pathOnly:a}){"production".match(/production/);let i=process.env.DSQL_STATIC_SERVER_DIR;if(!i)return console.log("Static File ENV not Found!"),null;let c=e?`@/${o?"videos":"media"}/${s?s+"/":""}`:o?`/videos/user-videos/user-${r}/${s?s+"/":""}`:`/images/user-images/user-${r}/${s?s+"/":""}`,l=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${s?s+"/":""}`:n.join(i,c);return t.existsSync(l)||a||t.mkdirSync(l,{recursive:!0}),{fileRootPath:l,urlRootPath:e?`@/media/${s?s+"/":""}`:`${process.env.DSQL_STATIC_HOST}${c}`,relativePath:c}}},6420:(e,r,s)=>{s(81630);let t=s(51348),n=s(72835),o=s(29021),a=s(31341);async function i(e,r,s,i){let{keyCookieName:c,csrfCookieName:l}=a();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!o.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:c+=n}}},64122:(e,r,s)=>{let t=s(51348),n=s(21339),o=s(44900);async function a({dbContext:e,paradigm:r,dbFullName:s,tableName:a,identifierColumnName:i,identifierValue:c,useLocal:l}){try{let u=!!l||!e?.match(/dsql.user/i)&&(!s||!!s.match(/^datasquirel$/)),_=l?o:u?t:n,d=`DELETE FROM ${a} WHERE \`${i}\`=?`;return u?await _(d,[c]):await _({paradigm:r,queryString:d,database:s,queryValues:[c]})}catch(e){return null}}e.exports=a},48225:(e,r,s)=>{let t=s(29021),{IncomingMessage:n}=s(81630);e.exports=async function({user:e,message:r,component:s,noMail:n,req:o}){let a=new Date,i=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],s=o.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||t||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8105,e.ids=[8105],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")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},5134:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>p,routeModule:()=>m});var n={};t.r(n),t.d(n,{default:()=>S});var s=t(89947),o=t(2706),i=t(96762),a=t(33873),l=t.n(a),c=t(67619),u=t(69842),d=t(45185),_=t(61932);let f=t(29021);async function S(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=e.body,{media_name:s,media_url:o,media_thumbnail_url:i,media_path:a,media_thumbnail_path:S,folder:p}=n;"production".match(/production/);try{let e=n?.private==1;if(!process.env.DSQL_STATIC_SERVER_DIR)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let s=(0,d.A)({isPrivate:e,userId:t.id,folder:n.folder?n.folder+"/":"",video:!!n.media_type?.match(/video/i)});if(!s)throw Error("Couldn't grab paths!");let{fileRootPath:a,urlRootPath:c,relativePath:u}=s;p?.match(/./);let S=o.match(/[^\/]+$/)[0],E=i.match(/[^\/]+$/)[0],m=l().normalize(a+S),g=l().normalize(a+E);f.unlinkSync(m);try{f.unlinkSync(g)}catch(e){}await (0,_.A)({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"id",identifierValue:n.id}),r.json({success:!0})}catch(e){console.log("ERROR in deleting user media =>",e.message),(0,c.default)({component:"/api/deleteUserMedia/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!"})}}let p=(0,i.M)(n,"default"),E=(0,i.M)(n,"config"),m=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/deleteUserMedia",pathname:"/api/deleteUserMedia",bundlePath:"",filename:""},userland:n})},45185:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(29021),s=t.n(n),o=t(33873),i=t.n(o);function a({isPrivate:e,userId:r,folder:t,video:n,pathOnly:o}){"production".match(/production/);let a=process.env.DSQL_STATIC_SERVER_DIR;if(!a)return console.log("Static File ENV not Found!"),null;let l=e?`@/${n?"videos":"media"}/${t?t+"/":""}`:n?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,c=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:i().join(a,l);return s().existsSync(c)||o||s().mkdirSync(c,{recursive:!0}),{fileRootPath:c,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${l}`,relativePath:l}}},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),o=t(29021),i=t.n(o),a=t(89159);async function l(e,r,t){let{keyCookieName:o,csrfCookieName:l}=(0,a.A)();if(!e.cookies?.[o]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[o]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=s}}},61932:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(48786),s=t(37275),o=t(7971);async function i({dbContext:e,paradigm:r,dbFullName:t,tableName:i,identifierColumnName:a,identifierValue:l,useLocal:c}){try{let u=!!c||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=c?o.A:u?n.A:s.default,_=`DELETE FROM \`${t}\`.\`${i}\` WHERE \`${a}\`=?`;return u?await d(_,[l]):await d({paradigm:r,queryString:_,queryValues:[l]})}catch(e){return null}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(29021),s=t.n(n);async function o({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||o.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),o?.url&&(n+=` URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${a.toDateString()} -========================================`,t.existsSync("./.tmp/error.log")||t.writeFileSync("./.tmp/error.log","","utf-8");let c=t.readFileSync("./.tmp/error.log","utf-8");t.writeFileSync("./.tmp/error.log",n),t.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(o.body,null,4)}`),a&&(n+=` +IP: ${a}`),n+=` +Date: ${i.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",t(a,i,c),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),o=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,s)=>{let t=s(29021);s(33873);let n=s(9973),o=s(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:s,queryValues:i}){try{return new Promise((c,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){a.end(),c(JSON.parse(JSON.stringify(e)))}function d(e){a.end(),c({error:e.message,queryStringGenerated:s,queryValuesGenerated:i,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),i&&Array.isArray(i)&&i[0]?a.query(s,i).then(_).catch(d):a.query(s).then(_).catch(d)}catch(e){t.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,s)=>{let t=s(9973),n=s(21580);async function o(...e){let r=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let s=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=71405);module.exports=s})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511),s=t(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(o,i,a),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;no})},7971:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(9973),s=t.n(n),o=t(29021),i=t.n(o);async function a(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!i().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:i().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=5134);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteUserMedia.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserTable.js b/dsql-app/.local_dist/server/pages/api/deleteUserTable.js index e274cb2..fbc89d8 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserTable.js +++ b/dsql-app/.local_dist/server/pages/api/deleteUserTable.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=5757,e.ids=[5757],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},77379:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>D,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>m});var a=t(89947),n=t(2706),l=t(96762),o=t(57638),i=t.n(o),c=t(48225),u=t.n(c),d=t(6420),_=t.n(d),p=t(51348),S=t.n(p);let f=t(29021);async function m(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await _()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body,{id:a,user_id:n,table_name:l,table_slug:o,table_description:c}=s.table,{db_full_name:d}=s.database;await i()({database:d,queryString:`DROP TABLE \`${o}\``});let p=a?[a]:[o,t.id,s.database.id];await S()(a?"DELETE FROM user_database_tables WHERE id=?":"DELETE FROM user_database_tables WHERE table_slug=? AND user_id=? AND db_id=?",p);try{let e;let s=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,a=JSON.parse(f.readFileSync(s,"utf8")),n=a.filter((e,r)=>{if(e.dbFullName===d)return!0}),l=n[0].tables.filter((r,t)=>{if(r?.tableName===o)return e=t,!0});if(l[0].childTable){let e;let r=a.filter(e=>e.dbFullName===l[0].childTableDbFullName)[0].tables.filter(e=>{if(e.tableName===l[0].childTableName)return!0})[0];r.childrenTables?.filter((r,t)=>{r.tableName===o&&(e=t)}),"number"==typeof e&&r.childrenTables?.splice(e,1)}if(n[0].tables.splice(e,1),n[0].childrenDatabases)for(let e=0;ee.dbFullName===r.dbFullName)[0];e.tables=n[0].tables,await S()("DELETE FROM user_database_tables WHERE table_slug=? AND user_id=? AND db_slug=?",[o,t.id,e.dbSlug])}catch(e){u()({component:"/api/deleteUserTable/lines-125-128",message:e.message,user:t})}}f.writeFileSync(`${s}`,JSON.stringify(a),"utf8"),r.json({success:!0})}catch(e){u()({component:"/api/deleteUserTable/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"File Updates Failed"})}}let D=(0,l.M)(s,"default"),E=(0,l.M)(s,"config"),g=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/deleteUserTable",pathname:"/api/deleteUserTable",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),a=t(72835),n=t(29021),l=t(31341);async function o(e,r,t,o){let{keyCookieName:i,csrfCookieName:c}=l();if(!e.cookies?.[i]?.match(/./))return null;let u=a({encryptedString:e.cookies[i]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:l,csrfCookieName:o,oneTimeCodeName:i+=a}}},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)=>{let s=t(72835),a=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let n=0;n",r.message),e}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:a,req:n}){let l=new Date,o=(()=>{if(!n)return null;try{let e=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)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=5757,e.ids=[5757],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},96332:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>f,routeModule:()=>m});var a={};t.r(a),t.d(a,{default:()=>_});var s=t(89947),n=t(2706),l=t(96762),i=t(30944),o=t(67619),c=t(69842),u=t(48786);let d=t(29021);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,c.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let a=e.body,{id:s,user_id:n,table_name:l,table_slug:_,table_description:f}=a.table,{db_full_name:p}=a.database;await (0,i.A)({database:p,queryString:`DROP TABLE \`${p}\`.\`${_}\``});let m=s?[s]:[_,t.id,a.database.id];await (0,u.A)(s?"DELETE FROM user_database_tables WHERE id=?":"DELETE FROM user_database_tables WHERE table_slug=? AND user_id=? AND db_id=?",m);try{let e;let a=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,s=JSON.parse(d.readFileSync(a,"utf8")),n=s.filter((e,r)=>{if(e.dbFullName===p)return!0}),l=n[0].tables.filter((r,t)=>{if(r?.tableName===_)return e=t,!0});if(l[0].childTable){let e;let r=s.filter(e=>e.dbFullName===l[0].childTableDbFullName)[0].tables.filter(e=>{if(e.tableName===l[0].childTableName)return!0})[0];r.childrenTables?.filter((r,t)=>{r.tableName===_&&(e=t)}),"number"==typeof e&&r.childrenTables?.splice(e,1)}if(n[0].tables.splice(e,1),n[0].childrenDatabases)for(let e=0;ee.dbFullName===r.dbFullName)[0];e.tables=n[0].tables,await (0,u.A)("DELETE FROM user_database_tables WHERE table_slug=? AND user_id=? AND db_slug=?",[_,t.id,e.dbSlug])}catch(e){(0,o.default)({component:"/api/deleteUserTable/lines-125-128",message:e.message,user:t})}}d.writeFileSync(`${a}`,JSON.stringify(s),"utf8"),r.json({success:!0})}catch(e){(0,o.default)({component:"/api/deleteUserTable/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"File Updates Failed"})}}let f=(0,l.M)(a,"default"),p=(0,l.M)(a,"config"),m=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/deleteUserTable",pathname:"/api/deleteUserTable",bundlePath:"",filename:""},userland:a})},69842:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(48786),s=t(95969),n=t(29021),l=t.n(n),i=t(89159);async function o(e,r,t){let{keyCookieName:n,csrfCookieName:o}=(0,i.A)();if(!e.cookies?.[n]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[n]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!l().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=a;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),{keyCookieName:l,csrfCookieName:i,oneTimeCodeName:o+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:r}){let t=[];try{for(let n=0;n",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>n});var a=t(29021),s=t.n(a);async function n({user:e,message:r,component:t,noMail:a,req:n}){let l=new Date,i=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],r=n.headers["x-real-ip"],t=n.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||a||r||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),n?.url&&(a+=` URL: ${n.url}`),n?.body&&(a+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),o&&(a+=` -IP: ${o}`),a+=` +Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(a+=` +IP: ${i}`),a+=` Date: ${l.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let o=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),a=t(48225),n=t(51348),l=t(21339),o=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?o:d?n:l;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",database:t,queryString:e})}catch(e){a({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await s({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),a({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:a}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=a("aes-192-cbc",s(l,o,i),n.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),a=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function l(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=l},21339:(e,r,t)=>{let s=t(29021);t(33873);let a=t(9973),n=t(21580),l=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:o}){try{return new Promise((i,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){l.end(),i(JSON.parse(JSON.stringify(e)))}function _(e){l.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:o,sql:e.sql})}l=u?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:n()}}),o&&Array.isArray(o)&&o[0]?l.query(t,o).then(d).catch(_):l.query(t).then(d).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),a=t(21580);async function n(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=77379);module.exports=t})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(43775),s=t(67619),n=t(48786),l=t(37275),i=t(7971);async function o({queryString:e,queryValuesArray:r,database:t,tableSchema:o,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?i.A:d?n.A:l.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&o)try{let e=u;return await (0,a.A)({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(55511),s=t(79428);function n({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,a.scryptSync)(n,l,i),c=s.Buffer.alloc(16,0),u=(0,a.createDecipheriv)("aes-192-cbc",o,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function a(e,r,t){try{if("string"==typeof r){let a=await e.query(s(r),t);return JSON.parse(JSON.stringify(a))}if("object"!=typeof r)return null;{let t=[];for(let a=0;an})},7971:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(9973),s=t.n(a),n=t(29021),l=t.n(n);async function i(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!l().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=96332);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserTable.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteUserTable.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserTable.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteUserTable.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserUser.js b/dsql-app/.local_dist/server/pages/api/deleteUserUser.js index 5bfc76d..e985fb4 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserUser.js +++ b/dsql-app/.local_dist/server/pages/api/deleteUserUser.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3462,e.ids=[3462],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},83246:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>d,routeModule:()=>p});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),i=t(2706),o=t(96762),a=t(51348),u=t.n(a),c=t(6420),l=t.n(c);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body,{user_type:n,user_id:i,email:o,invited_user_id:a}=s;await u()("DELETE FROM user_users WHERE id=?",[s.id]),n?.match(/admin/i)&&(await u()("DELETE FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[t.id,o]),await u()("DELETE FROM delegated_user_tables WHERE delegated_user_id=? AND root_user_id=?",[a,t.id])),r.json({success:!0,msg:"User Deleted!"})}t(29021);let d=(0,o.M)(s,"default"),E=(0,o.M)(s,"config"),p=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/deleteUserUser",pathname:"/api/deleteUserUser",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),i=t(29021),o=t(31341);async function a(e,r,t,a){let{keyCookieName:u,csrfCookieName:c}=o();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,a,u),i.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=83246);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3462,e.ids=[3462],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},22792:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>l,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>c});var s=t(89947),i=t(2706),o=t(96762),a=t(48786),u=t(69842);async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=e.body,{user_type:s,user_id:i,email:o,invited_user_id:c}=n;await (0,a.A)("DELETE FROM user_users WHERE id=?",[n.id]),s?.match(/admin/i)&&(await (0,a.A)("DELETE FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[t.id,o]),await (0,a.A)("DELETE FROM delegated_user_tables WHERE delegated_user_id=? AND root_user_id=?",[c,t.id])),r.json({success:!0,msg:"User Deleted!"})}t(29021);let l=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/deleteUserUser",pathname:"/api/deleteUserUser",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),a=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,a.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(i,o,a),c=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=22792);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/deleteUserUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/deleteUserUser.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/deleteUserUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/deleteUserUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js b/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js index f25235e..1444b3f 100644 --- a/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js +++ b/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js @@ -1,16 +1 @@ -"use strict";(()=>{var e={};e.id=7317,e.ids=[7317],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")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},3535:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),o=t(2706),i=t(96762);t(17029);var a=t(6420),l=t.n(a);let c=t(29021),u=t(33873);async function p(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbName:s}=e.query;try{let e=u.resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${t.id}/main.json`);if(!c.existsSync(e))return r.end();let n=JSON.parse(c.readFileSync(e,"utf-8")).find(e=>e.dbFullName==s);if(!n)throw Error("Database not found!");let o=u.resolve(process.cwd(),"./.tmp/_tmp.json");c.writeFileSync(o,JSON.stringify(n),"utf-8");let i=c.createReadStream(o);i.pipe(r),i.on("close",()=>{c.unlinkSync(o)})}catch(e){return console.log(e),r.end()}}let d=(0,i.M)(s,"default"),_=(0,i.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/downloadDatabaseSchema",pathname:"/api/downloadDatabaseSchema",bundlePath:"",filename:""},userland:s})},17029:(e,r,t)=>{let s=t(29021),n=t(21820),{execSync:o}=t(79646),i=t(48225),{ServerResponse:a}=t(81630);e.exports=async function({dbName:e,user:r,res:t}){let a=n.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysqldump.exe'":"mysqldump";try{let i={cwd:process.cwd()},l=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r.id}/export.sql`;n.platform().match(/win/i)&&(i.shell="bash.exe");let c=`${a} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${e} > ${l}`;console.log(`exportDb.js exe => ${c}`),o(c,i),t.setHeader("Content-Type","application/zip"),t.setHeader("Content-Disposition","attachment; filename=export.sql"),s.createReadStream(l).pipe(t)}catch(e){i({component:"/functions/backend/exportDb/lines-30-46",message:e.message,user:r})}}},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${d}/${p.csrf_k}`))return null;if(0==p.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== -Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(n+=` -URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),a&&(n+=` -IP: ${a}`),n+=` -Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` - - - - -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,a,l),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=3535);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7317,e.ids=[7317],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},86254:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>l});var s=t(89947),i=t(2706),o=t(96762),a=t(69842);let u=t(29021),c=t(33873);async function l(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,a.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbName:n}=e.query;try{let e=c.resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${t.id}/main.json`);if(!u.existsSync(e))return r.end();let s=JSON.parse(u.readFileSync(e,"utf-8")).find(e=>e.dbFullName==n);if(!s)throw Error("Database not found!");let i=c.resolve(process.cwd(),"./.tmp/_tmp.json");u.writeFileSync(i,JSON.stringify(s),"utf-8");let o=u.createReadStream(i);o.pipe(r),o.on("close",()=>{u.unlinkSync(i)})}catch(e){return console.log(e),r.end()}}let d=(0,o.M)(n,"default"),_=(0,o.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/downloadDatabaseSchema",pathname:"/api/downloadDatabaseSchema",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),a=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,a.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(i,o,a),c=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=86254);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js.nft.json b/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js.nft.json index 47d34c9..7691c56 100644 --- a/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/downloadDatabaseSchema.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/exportDatabase.js b/dsql-app/.local_dist/server/pages/api/exportDatabase.js index f32b5f8..fb58a11 100644 --- a/dsql-app/.local_dist/server/pages/api/exportDatabase.js +++ b/dsql-app/.local_dist/server/pages/api/exportDatabase.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=7402,e.ids=[7402],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")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},21820:e=>{e.exports=require("os")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},46897:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>_,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),o=t(2706),i=t(96762),a=t(17029),l=t.n(a),c=t(6420),u=t.n(c);async function p(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await u()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbName:s}=e.query;await l()({dbName:s?.toString()||"",res:r,user:t})}let _=(0,i.M)(s,"default"),d=(0,i.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/exportDatabase",pathname:"/api/exportDatabase",bundlePath:"",filename:""},userland:s})},17029:(e,r,t)=>{let s=t(29021),n=t(21820),{execSync:o}=t(79646),i=t(48225),{ServerResponse:a}=t(81630);e.exports=async function({dbName:e,user:r,res:t}){let a=n.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysqldump.exe'":"mysqldump";try{let i={cwd:process.cwd()},l=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r.id}/export.sql`;n.platform().match(/win/i)&&(i.shell="bash.exe");let c=`${a} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${e} > ${l}`;console.log(`exportDb.js exe => ${c}`),o(c,i),t.setHeader("Content-Type","application/zip"),t.setHeader("Content-Disposition","attachment; filename=export.sql"),s.createReadStream(l).pipe(t)}catch(e){i({component:"/functions/backend/exportDb/lines-30-46",message:e.message,user:r})}}},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${_}/${p.csrf_k}`))return null;if(0==p.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=7402,e.ids=[7402],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},21820:e=>{e.exports=require("os")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},87476:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>E,routeModule:()=>y});var n={};t.r(n),t.d(n,{default:()=>S});var s=t(89947),o=t(2706),i=t(96762),a=t(29021),l=t.n(a),c=t(21820),u=t.n(c),d=t(79646),p=t(67619);async function _({dbName:e,user:r,res:t}){let n=u().platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysqldump.exe'":"mysqldump";try{let s={cwd:process.cwd()},o=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r.id}/export.sql`;u().platform().match(/win/i)&&(s.shell="bash.exe");let i=`${n} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${e} > ${o}`;console.log(`exportDb.ts exe => ${i}`),(0,d.execSync)(i,s),t.setHeader("Content-Type","application/zip"),t.setHeader("Content-Disposition","attachment; filename=export.sql"),l().createReadStream(o).pipe(t)}catch(e){(0,p.default)({component:"/functions/backend/exportDb/lines-30-46",message:e.message,user:r})}}var f=t(69842);async function S(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,f.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbName:n}=e.query;await _({dbName:n?.toString()||"",res:r,user:t})}let E=(0,i.M)(n,"default"),m=(0,i.M)(n,"config"),y=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/exportDatabase",pathname:"/api/exportDatabase",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),o=t(29021),i=t.n(o),a=t(89159);async function l(e,r,t){let{keyCookieName:o,csrfCookieName:l}=(0,a.A)();if(!e.cookies?.[o]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[o]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:l+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(29021),s=t.n(n);async function o({user:e,message:r,component:t,noMail:n,req:o}){let i=new Date,a=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||o.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${o.url}`),o?.body&&(n+=` Request Body: ${JSON.stringify(o.body,null,4)}`),a&&(n+=` IP: ${a}`),n+=` Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,a,l),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=46897);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511),s=t(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(o,i,a),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=87476);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/exportDatabase.js.nft.json b/dsql-app/.local_dist/server/pages/api/exportDatabase.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/exportDatabase.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/exportDatabase.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/exportTableData.js b/dsql-app/.local_dist/server/pages/api/exportTableData.js index 08b1a6c..aa422bd 100644 --- a/dsql-app/.local_dist/server/pages/api/exportTableData.js +++ b/dsql-app/.local_dist/server/pages/api/exportTableData.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=4727,e.ids=[4727],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},724:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>p,routeModule:()=>f});var s={};t.r(s),t.d(s,{config:()=>c,default:()=>d});var a=t(89947),n=t(2706),i=t(96762),o=t(6420),l=t.n(o),u=t(27444);let c={api:{responseLimit:"1mb",bodyParser:{sizeLimit:"200mb"}}};async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{paradigm:s,dbName:a,tableName:n,payload:i}=e.body;try{let e=await (0,u.A)({dbName:a,paradigm:s,payload:i,tableName:n,userId:t.id,payloadType:"base64"});if(!e)return r.json({success:!1,msg:"Operation Failed!"});r.json({success:!0,msg:"Success!",data:e?.tableData})}catch(e){r.json({success:!1,msg:e.message})}}let p=(0,i.M)(s,"default"),_=(0,i.M)(s,"config"),f=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/exportTableData",pathname:"/api/exportTableData",bundlePath:"",filename:""},userland:s})},27444:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(47670),a=t.n(s);let n=t(48225),i=t(51348);async function o({paradigm:e,userId:r,dbName:t,tableName:s,payload:o,payloadType:l}){let u={};try{let n=`${process.env.DSQL_USER_DB_PREFIX}${r}_${t.replace(/ /g,"")}`;switch(e){case"export":let c=await i(`SELECT * FROM \`${n}\`.\`${s}\``);u.tableData=c;break;case"import":let d="base64"==l?Buffer.from(o,"base64").toString():o,p="object"===l?o:JSON.parse(d);for(let e=0;e{t(81630);let s=t(51348),a=t(72835),n=t(29021),i=t(31341);async function o(e,r,t,o){let{keyCookieName:l,csrfCookieName:u}=i();if(!e.cookies?.[l]?.match(/./))return null;let c=a({encryptedString:e.cookies[l]});if(!c)return null;let d=JSON.parse(c);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n.existsSync(`${p}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=a}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:a,req:n}){let i=new Date,o=(()=>{if(!n)return null;try{let e=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)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=4727,e.ids=[4727],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},27310:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>_});var s={};t.r(s),t.d(s,{config:()=>u,default:()=>c});var a=t(89947),n=t(2706),i=t(96762),l=t(69842),o=t(33170);let u={api:{responseLimit:"1mb",bodyParser:{sizeLimit:"200mb"}}};async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,l.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{paradigm:s,dbName:a,tableName:n,payload:i}=e.body;try{let e=await (0,o.A)({dbName:a,paradigm:s,payload:i,tableName:n,userId:t.id,payloadType:"base64"});if(!e)return r.json({success:!1,msg:"Operation Failed!"});r.json({success:!0,msg:"Success!",data:e?.tableData})}catch(e){r.json({success:!1,msg:e.message})}}let d=(0,i.M)(s,"default"),p=(0,i.M)(s,"config"),_=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/exportTableData",pathname:"/api/exportTableData",bundlePath:"",filename:""},userland:s})},33170:(e,r,t)=>{t.d(r,{A:()=>i});var s=t(98e3),a=t(67619),n=t(48786);async function i({paradigm:e,userId:r,dbName:t,tableName:i,payload:l,payloadType:o}){let u={};try{let a=`${process.env.DSQL_USER_DB_PREFIX}${r}_${t.replace(/ /g,"")}`;switch(e){case"export":let c=await (0,n.A)(`SELECT * FROM \`${a}\`.\`${i}\``);u.tableData=c;break;case"import":let d="base64"==o?Buffer.from(l,"base64").toString():l,p="object"===o?l:JSON.parse(d);for(let e=0;e{t.d(r,{A:()=>o});var s=t(48786),a=t(95969),n=t(29021),i=t.n(n),l=t(89159);async function o(e,r,t){let{keyCookieName:n,csrfCookieName:o}=(0,l.A)();if(!e.cookies?.[n]?.match(/./))return null;let u=(0,a.A)({encryptedString:e.cookies[n]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=s;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),{keyCookieName:i,csrfCookieName:l,oneTimeCodeName:o+=a}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>n});var s=t(29021),a=t.n(s);async function n({user:e,message:r,component:t,noMail:s,req:n}){let i=new Date,l=(()=>{if(!n)return null;try{let e=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)return null;return String(a)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(a+=` -URL: ${n.url}`),n?.body&&(a+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),o&&(a+=` -IP: ${o}`),a+=` +User Email: ${e?.email}`),n?.url&&(s+=` +URL: ${n.url}`),n?.body&&(s+=` +Request Body: ${JSON.stringify(n.body,null,4)}`),l&&(s+=` +IP: ${l}`),s+=` Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let o=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",s),a().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:a}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=a("aes-192-cbc",s(i,o,l),n.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050],()=>t(724));module.exports=s})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>n});var s=t(55511),a=t(79428);function n({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,s.scryptSync)(n,i,l),u=a.Buffer.alloc(16,0),c=(0,s.createDecipheriv)("aes-192-cbc",o,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[1251],()=>t(27310));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/exportTableData.js.nft.json b/dsql-app/.local_dist/server/pages/api/exportTableData.js.nft.json index 8310cb4..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/exportTableData.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/exportTableData.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js b/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js index 59367c4..173a56d 100644 --- a/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js +++ b/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=3319,e.ids=[3319],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},62229:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>S,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>p});var a=t(89947),n=t(2706),o=t(96762),l=t(57638),i=t.n(l);let c=t(73677),u=t(39831),d=t(48225),_=t(6420);async function p(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await _(e,r,!0);if(!t)return r.json({success:!1,msg:"User Auth Failed"});let{tableName:s,dbSlug:a,dbId:n,isTitle:o,isSlug:l,isFullName:p,defaultField:S}=e.body;try{let d=await u({databaseSlug:a,request:e,user:t,query:e.query});if(!await c({user:t,confirmedDelegetedUser:d,database:a,table:s,dbId:n,priviledgeRegex:/Update Entries/i}))return r.json({success:!1,msg:"Unauthorized"});let _=d?.rootUserId?`datasquirel_user_${d.rootUserId}_${a}`:`datasquirel_user_${t.id}_${a}`,f=`SELECT id${o?",title":l?",slug":p?",CONCAT(first_name, ' ', last_name) AS full_name":S?","+S:""} FROM ${s}`,g=await i()({database:_,queryString:f});r.json({success:!0,entries:g})}catch(e){d({component:"/api/addTableEntry/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!",err:e.message})}}let S=(0,o.M)(s,"default"),f=(0,o.M)(s,"config"),g=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/fetch-entries-basic",pathname:"/api/fetch-entries-basic",bundlePath:"",filename:""},userland:s})},73677:(e,r,t)=>{let s=t(51348),a=t(48225);e.exports=async function({user:e,confirmedDelegetedUser:r,database:t,table:n,priviledgeRegex:o,dbId:l}){let i,c;try{r?.delegated?(i=await s("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,t,n]),c=i[0]?.priviledge?.match(o)):(i=await s("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,n,l]),c=!0)}catch(r){a({component:"checkUserRights",message:r.message,user:e})}return!!i&&!!i[0]&&!!c}},39831:(e,r,t)=>{t(81630);let s=t(72835);e.exports=async function({request:e,databaseSlug:r,user:t,query:a}){try{let n=t.id,o=null;if(!a?.delegated)return{dbUserId:n};let l=a.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,c=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[c])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[c]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},6420:(e,r,t)=>{t(81630);let s=t(51348),a=t(72835),n=t(29021),o=t(31341);async function l(e,r,t,l){let{keyCookieName:i,csrfCookieName:c}=o();if(!e.cookies?.[i]?.match(/./))return null;let u=a({encryptedString:e.cookies[i]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=l},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=a}}},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)=>{let s=t(72835),a=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let n=0;n",r.message),e}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:a,req:n}){let o=new Date,l=(()=>{if(!n)return null;try{let e=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)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=3319,e.ids=[3319],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},3034:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>f,routeModule:()=>g});var a={};t.r(a),t.d(a,{default:()=>_});var s=t(89947),n=t(2706),o=t(96762),l=t(30944),i=t(31495),u=t(60125),c=t(67619),d=t(69842);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,d.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"User Auth Failed"});let{tableName:a,dbSlug:s,dbId:n,isTitle:o,isSlug:_,isFullName:f,defaultField:p}=e.body;try{let c=await (0,u.A)({databaseSlug:s,request:e,user:t,query:e.query});if(!await (0,i.A)({user:t,confirmedDelegetedUser:c,database:s,table:a,dbId:n,priviledgeRegex:/Update Entries/i}))return r.json({success:!1,msg:"Unauthorized"});let d=c?.rootUserId?`datasquirel_user_${c.rootUserId}_${s}`:`datasquirel_user_${t.id}_${s}`,g=`SELECT id${o?",title":_?",slug":f?",CONCAT(first_name, ' ', last_name) AS full_name":p?","+p:""} FROM ${d}.${a}`,m=await (0,l.A)({database:d,queryString:g});r.json({success:!0,entries:m})}catch(e){(0,c.default)({component:"/api/addTableEntry/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!",err:e.message})}}let f=(0,o.M)(a,"default"),p=(0,o.M)(a,"config"),g=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/fetch-entries-basic",pathname:"/api/fetch-entries-basic",bundlePath:"",filename:""},userland:a})},31495:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(48786),s=t(67619);async function n({user:e,confirmedDelegetedUser:r,database:t,table:n,priviledgeRegex:o,dbId:l}){let i,u;try{r?.delegated?(i=await (0,a.A)("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,t,n]),u=i[0]?.priviledge?.match(o)):(i=await (0,a.A)("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,n,l]),u=!0)}catch(r){(0,s.default)({component:"checkUserRights",message:r.message,user:e})}return!!i&&!!i[0]&&!!u}},60125:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);async function s({request:e,databaseSlug:r,user:t,query:s}){try{let n=t.id,o=null;if(!s?.delegated)return{dbUserId:n};let l=s.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,u=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[u])throw Error("Cookie not present");let t=(0,a.A)({encryptedString:e.cookies[u]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},69842:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(48786),s=t(95969),n=t(29021),o=t.n(n),l=t(89159);async function i(e,r,t){let{keyCookieName:n,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[n]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[n]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=a;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:r}){let t=[];try{for(let n=0;n",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>n});var a=t(29021),s=t.n(a);async function n({user:e,message:r,component:t,noMail:a,req:n}){let o=new Date,l=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],r=n.headers["x-real-ip"],t=n.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||a||r||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${n.url}`),n?.body&&(a+=` Request Body: ${JSON.stringify(n.body,null,4)}`),l&&(a+=` IP: ${l}`),a+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let i=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),a=t(48225),n=t(51348),o=t(21339),l=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?l:d?n:o;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",database:t,queryString:e})}catch(e){a({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await s({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),a({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:a}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=a("aes-192-cbc",s(o,l,i),n.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),a=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function o(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let a=t(9973),n=t(21580),o=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:l}){try{return new Promise((i,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:l,sql:e.sql})}o=u?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:n()}}),l&&Array.isArray(l)&&l[0]?o.query(t,l).then(d).catch(_):o.query(t).then(d).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),a=t(21580);async function n(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=62229);module.exports=t})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(43775),s=t(67619),n=t(48786),o=t(37275),l=t(7971);async function i({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:u}){let c;let d=!!u||!!t?.match(/^datasquirel$/),_=u?l.A:d?n.A:o.default;try{c=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&i)try{let e=c;return await (0,a.A)({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(55511),s=t(79428);function n({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,a.scryptSync)(n,o,l),u=s.Buffer.alloc(16,0),c=(0,a.createDecipheriv)("aes-192-cbc",i,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function a(e,r,t){try{if("string"==typeof r){let a=await e.query(s(r),t);return JSON.parse(JSON.stringify(a))}if("object"!=typeof r)return null;{let t=[];for(let a=0;an})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(9973),s=t.n(a),n=t(29021),o=t.n(n);async function l(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=3034);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js.nft.json b/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/fetch-entries-basic.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/fetch-media.js b/dsql-app/.local_dist/server/pages/api/fetch-media.js index 34e849e..5e2a337 100644 --- a/dsql-app/.local_dist/server/pages/api/fetch-media.js +++ b/dsql-app/.local_dist/server/pages/api/fetch-media.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2310,e.ids=[2310],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},56750:(e,t,r)=>{r.r(t),r.d(t,{config:()=>l,default:()=>P,routeModule:()=>A});var n={};r.r(n),r.d(n,{config:()=>c,default:()=>f});var i=r(89947),o=r(2706),a=r(96762),s=r(29021),u=r.n(s),d=r(33873),p=r.n(d);let c={api:{responseLimit:"1mb",bodyParser:{sizeLimit:"200mb"}}};async function f(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});let r=String(e.query.url).replace(process.env.DSQL_STATIC_HOST||"",""),n=p().join(process.env.DSQL_STATIC_SERVER_DIR||"","/",r);if(!u().existsSync(n))return t.json({success:!1});console.log("mediaStoragePath",n),u().createReadStream(n).pipe(t)}let P=(0,a.M)(n,"default"),l=(0,a.M)(n,"config"),A=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/fetch-media",pathname:"/api/fetch-media",bundlePath:"",filename:""},userland:n})},2706:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=t(t.s=56750);module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2310,e.ids=[2310],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},16328:(e,t,r)=>{r.r(t),r.d(t,{config:()=>l,default:()=>P,routeModule:()=>A});var n={};r.r(n),r.d(n,{config:()=>c,default:()=>f});var i=r(89947),o=r(2706),a=r(96762),u=r(29021),s=r.n(u),d=r(33873),p=r.n(d);let c={api:{responseLimit:"1mb",bodyParser:{sizeLimit:"200mb"}}};async function f(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});let r=String(e.query.url).replace(process.env.DSQL_STATIC_HOST||"",""),n=p().join(process.env.DSQL_STATIC_SERVER_DIR||"","/",r);if(!s().existsSync(n))return t.json({success:!1});console.log("mediaStoragePath",n),s().createReadStream(n).pipe(t)}let P=(0,a.M)(n,"default"),l=(0,a.M)(n,"config"),A=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/fetch-media",pathname:"/api/fetch-media",bundlePath:"",filename:""},userland:n})},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=t(t.s=16328);module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/fetch-media.js.nft.json b/dsql-app/.local_dist/server/pages/api/fetch-media.js.nft.json index b4306a5..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/fetch-media.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/fetch-media.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js b/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js index 8ae92c0..9f672f8 100644 --- a/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js +++ b/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=3040,e.ids=[3040],e.modules={27825:e=>{e.exports=require("lodash")},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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},0:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>h,routeModule:()=>D});var s={};t.r(s),t.d(s,{default:()=>g});var n=t(89947),o=t(2706),a=t(96762),i=t(2258),l=t.n(i),u=t(48225),c=t.n(u),d=t(6420),_=t.n(d),p=t(27825),f=t.n(p),S=t(51348),E=t.n(S);t(29021),t(33873);let{execSync:m}=t(79646);async function g(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await _()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.query.dbUserId;e.query.delegated;try{if(!s)throw Error("No Root user Id Found!");let e=await E()("SELECT * FROM datasquirel.delegated_user_tables WHERE delegated_user_id=? AND root_user_id=?",[String(t.id),String(s)]),n=l()({userId:String(s)});if(!n)throw Error("Root user schema not found!");let o=[];e.forEach(e=>{let r=o.findIndex(r=>r.dbSlug===e.database),t=n.find(r=>r.dbSlug===e.database);if(t){let s=o[r]?o[r]:{...t,tables:[]},n=f().cloneDeep(t.tables).find(r=>r.tableName===e.table);n&&o[r]?o[r]={...s,tables:[...o[r].tables,n]}:n&&!o[r]&&o.push({...t,tables:[n]})}}),r.json({success:!0,payload:o})}catch(e){console.log("ERROR:",e.message),c()({component:"/api/get-authorized-databases",message:e.message,user:t}),r.json({success:!1,msg:e.message})}}let h=(0,a.M)(s,"default"),y=(0,a.M)(s,"config"),D=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/get-authorized-databases",pathname:"/api/get-authorized-databases",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),a=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:u}=a();if(!e.cookies?.[l]?.match(/./))return null;let c=n({encryptedString:e.cookies[l]});if(!c)return null;let d=JSON.parse(c);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:l+=n}}},2258:(e,r,t)=>{let s=t(48225),n=t(29021),o=t(33873);e.exports=function({userId:e}){try{let r=o.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(n.readFileSync(r,"utf-8"))}catch(e){return s({component:"grabUserSchemaData",message:e.message}),null}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let a=new Date,i=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=3040,e.ids=[3040],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},61980:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>E,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),a=t(2706),o=t(96762),i=t(4820),l=t(67619),u=t(69842),c=t(27825),d=t.n(c),_=t(48786);t(29021),t(33873);let{execSync:f}=t(79646);async function p(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.query.dbUserId;e.query.delegated;try{if(!s)throw Error("No Root user Id Found!");let e=await (0,_.A)("SELECT * FROM datasquirel.delegated_user_tables WHERE delegated_user_id=? AND root_user_id=?",[String(t.id),String(s)]),n=(0,i.A)({userId:String(s)});if(!n)throw Error("Root user schema not found!");let a=[];e.forEach(e=>{let r=a.findIndex(r=>r.dbSlug===e.database),t=n.find(r=>r.dbSlug===e.database);if(t){let s=a[r]?a[r]:{...t,tables:[]},n=d().cloneDeep(t.tables).find(r=>r.tableName===e.table);n&&a[r]?a[r]={...s,tables:[...a[r].tables,n]}:n&&!a[r]&&a.push({...t,tables:[n]})}}),r.json({success:!0,payload:a})}catch(e){console.log("ERROR:",e.message),(0,l.default)({component:"/api/get-authorized-databases",message:e.message,user:t}),r.json({success:!1,msg:e.message})}}let E=(0,o.M)(s,"default"),S=(0,o.M)(s,"config"),g=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/get-authorized-databases",pathname:"/api/get-authorized-databases",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(48786),n=t(95969),a=t(29021),o=t.n(a),i=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,n.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},4820:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(67619),n=t(29021),a=t.n(n),o=t(33873),i=t.n(o);function l({userId:e}){try{let r=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(a().readFileSync(r,"utf-8"))}catch(e){return(0,s.default)({component:"grabUserSchemaData",message:e.message}),null}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(29021),n=t.n(s);async function a({user:e,message:r,component:t,noMail:s,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 s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(n+=` -URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(s+=` +IP: ${i}`),s+=` +Date: ${o.toDateString()} +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",s(a,i,l),o.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=0);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511),n=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,s.scryptSync)(a,o,i),u=n.Buffer.alloc(16,0),c=(0,s.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=61980);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js.nft.json b/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js.nft.json index f497874..3efe597 100644 --- a/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/get-authorized-databases.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js b/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js index a7b15c4..f12b5b6 100644 --- a/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js +++ b/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},34029:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>f,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),a=t(2706),o=t(96762),i=t(6420),l=t.n(i),u=t(48225),c=t.n(u),d=t(51348),_=t.n(d);async function p(e,r){if("GET"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await l()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.query.dbSlug,n=e.query.dbOwnerId,a=e.query.delegatedUserId;try{let e=await _()("SELECT id FROM user_databases WHERE user_id=? AND db_slug=?",[n,s]);if(!e||!e[0])return r.json({success:!1,msg:"Database not found"});let t=await _()("SELECT table_name,table_slug FROM user_database_tables WHERE user_id=? AND db_id=?",[n,e[0].id]),o=await _()("SELECT `database`,`table` FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[n,a]);r.json({success:!0,tables:t,accessed_tables:o})}catch(e){c()({component:"/api/getDatabaseTables/main-catch-error",message:e.message,user:t}),r.json({success:!1})}}t(29021);let f=(0,o.M)(s,"default"),E=(0,o.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/getDatabaseTables",pathname:"/api/getDatabaseTables",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:u}=o();if(!e.cookies?.[l]?.match(/./))return null;let c=n({encryptedString:e.cookies[l]});if(!c)return null;let d=JSON.parse(c);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=245,e.ids=[245],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},37811:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>c});var n=t(89947),a=t(2706),i=t(96762),o=t(69842),l=t(67619),u=t(48786);async function c(e,r){if("GET"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,o.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.query.dbSlug,n=e.query.dbOwnerId,a=e.query.delegatedUserId;try{let e=await (0,u.A)("SELECT id FROM user_databases WHERE user_id=? AND db_slug=?",[n,s]);if(!e||!e[0])return r.json({success:!1,msg:"Database not found"});let t=await (0,u.A)("SELECT table_name,table_slug FROM user_database_tables WHERE user_id=? AND db_id=?",[n,e[0].id]),i=await (0,u.A)("SELECT `database`,`table` FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[n,a]);r.json({success:!0,tables:t,accessed_tables:i})}catch(e){(0,l.default)({component:"/api/getDatabaseTables/main-catch-error",message:e.message,user:t}),r.json({success:!1})}}t(29021);let d=(0,i.M)(s,"default"),_=(0,i.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/getDatabaseTables",pathname:"/api/getDatabaseTables",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(48786),n=t(95969),a=t(29021),i=t.n(a),o=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,n.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=n}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(29021),n=t.n(s);async function a({user:e,message:r,component:t,noMail:s,req:a}){let i=new Date,o=(()=>{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 s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(s+=` +IP: ${o}`),s+=` +Date: ${i.toDateString()} +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=34029);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511),n=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,s.scryptSync)(a,i,o),u=n.Buffer.alloc(16,0),c=(0,s.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=37811);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js.nft.json b/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getDatabaseTables.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js index 3b9fd62..f02a8fd 100644 --- a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js +++ b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8282,e.ids=[8282],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},94057:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>f,routeModule:()=>m});var s={};t.r(s),t.d(s,{default:()=>S});var n=t(89947),a=t(2706),o=t(96762),i=t(51348),l=t.n(i),c=t(20503),u=t.n(c),d=t(48225),_=t.n(d),p=t(6420),E=t.n(p);async function S(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await E()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body.rootUserId,n=e.body.priviledges,a=e.body.database;try{let e=await l()("SELECT * FROM user_users WHERE user_id=? AND invited_user_id=? AND MATCH(database_access) AGAINST(?)",[s,t.id,a]);if(!e||!e[0])throw Error(`user with id ${t.id} has no access to ${a} database belonging to user ${s}`);let o=(await l()("SELECT * FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=?",[s,t.id,a])).map(e=>e.table),i=await l()("SELECT * FROM users WHERE id=?",[s]),c={rootUserId:s,rootUserName:`${i[0].first_name} ${i[0].last_name}`,rootUserEmail:i[0].email,rootUserImage:i[0].image_thumbnail,delegatedUserId:t.id,databaseFullName:`datasquirel_user_${s}_${a}`,databaseSlug:a,allowedTables:o,priviledges:n,dateCreated:Date.now()},d=u()({data:JSON.stringify(c)}),_=`${process.env.DSQL_USER_DB_PREFIX}${c.rootUserId}_${a}`,p=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${_}`;r.setHeader("Set-Cookie",[`${p}=${d};path=/`]),r.json({success:!0,msg:"Processed Successfully"})}catch(e){return console.log("ERROR:",e.message),_()({component:"/api/getDelegatedDatabaseToken/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Unauthorized"})}}let f=(0,o.M)(s,"default"),g=(0,o.M)(s,"config"),m=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/getDelegatedDatabaseToken",pathname:"/api/getDelegatedDatabaseToken",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8282,e.ids=[8282],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},19991:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>_,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>d});var n=t(89947),a=t(2706),o=t(96762),i=t(48786),l=t(68829),u=t(67619),c=t(69842);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,c.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body.rootUserId,n=e.body.priviledges,a=e.body.database;try{let e=await (0,i.A)("SELECT * FROM user_users WHERE user_id=? AND invited_user_id=? AND MATCH(database_access) AGAINST(?)",[s,t.id,a]);if(!e||!e[0])throw Error(`user with id ${t.id} has no access to ${a} database belonging to user ${s}`);let o=(await (0,i.A)("SELECT * FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=?",[s,t.id,a])).map(e=>e.table),u=await (0,i.A)("SELECT * FROM users WHERE id=?",[s]),c={rootUserId:s,rootUserName:`${u[0].first_name} ${u[0].last_name}`,rootUserEmail:u[0].email,rootUserImage:u[0].image_thumbnail,delegatedUserId:t.id,databaseFullName:`datasquirel_user_${s}_${a}`,databaseSlug:a,allowedTables:o,priviledges:n,dateCreated:Date.now()},d=(0,l.default)({data:JSON.stringify(c)}),_=`${process.env.DSQL_USER_DB_PREFIX}${c.rootUserId}_${a}`,E=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${_}`;r.setHeader("Set-Cookie",[`${E}=${d};path=/`]),r.json({success:!0,msg:"Processed Successfully"})}catch(e){return console.log("ERROR:",e.message),(0,u.default)({component:"/api/getDelegatedDatabaseToken/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Unauthorized"})}}let _=(0,o.M)(s,"default"),E=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/getDelegatedDatabaseToken",pathname:"/api/getDelegatedDatabaseToken",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(48786),n=t(95969),a=t(29021),o=t.n(a),i=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,n.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(29021),n=t.n(s);async function a({user:e,message:r,component:t,noMail:s,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 s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(s+=` +IP: ${i}`),s+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=94057);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511),n=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,s.scryptSync)(a,o,i),u=n.Buffer.alloc(16,0),c=(0,s.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var s=t(55511),n=t(79428);function a({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,s.scryptSync)(a,o,i),u=n.Buffer.alloc(16,0),c=(0,s.createCipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=19991);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js.nft.json b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabaseToken.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js index 6d83d69..3186037 100644 --- a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js +++ b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js @@ -1,8 +1,8 @@ -"use strict";(()=>{var e={};e.id=7258,e.ids=[7258],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,s)=>{Object.defineProperty(s,"M",{enumerable:!0,get:function(){return function e(s,r){return r in s?s[r]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,r)):"function"==typeof s&&"default"===r?s:void 0}}})},1199:(e,s,r)=>{r.r(s),r.d(s,{config:()=>p,default:()=>d,routeModule:()=>f});var t={};r.r(t),r.d(t,{default:()=>c});var n=r(89947),i=r(2706),a=r(96762),u=r(51348),_=r.n(u),o=r(6420),l=r.n(o);async function c(e,s){if("GET"!==e.method)return s.json({msg:"Failed!"});let r=await l()(e,s);if(!r)return s.json({success:!1,msg:"Unauthorized"});let t=await _()(` +"use strict";(()=>{var e={};e.id=7258,e.ids=[7258],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},45310:(e,r,s)=>{s.r(r),s.d(r,{config:()=>d,default:()=>l,routeModule:()=>c});var t={};s.r(t),s.d(t,{default:()=>o});var n=s(89947),i=s(2706),a=s(96762),u=s(48786),_=s(69842);async function o(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let s=await (0,_.A)(e,r);if(!s)return r.json({success:!1,msg:"Unauthorized"});let t=await (0,u.A)(` SELECT user_users.user_id,user_users.database_access,user_users.user_id,user_users.user_priviledge,users.first_name,users.last_name,users.email,users.image_thumbnail FROM user_users JOIN users ON user_users.user_id=users.id WHERE - user_users.invited_user_id='${r.id}' - `),n=[];if(t&&t[0])for(let e=0;e`db_slug='${e}'`).join(" OR ")}) AND user_id=${i}`);for(let e=0;e{r(81630);let t=r(51348),n=r(72835),i=r(29021),a=r(31341);async function u(e,s,r,u){let{keyCookieName:_,csrfCookieName:o}=a();if(!e.cookies?.[_]?.match(/./))return null;let l=n({encryptedString:e.cookies[_]});if(!l)return null;let c=JSON.parse(l);if(!c.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!i.existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!r){let e=await t(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&s.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=u},31341:e=>{e.exports=function(e){let s=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=s;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=r;let u=s;e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),u+=t;let _=s;return e?.userId&&(_+=`user_${e.userId}_`),i&&(_+=`${i}_`),{keyCookieName:a,csrfCookieName:u,oneTimeCodeName:_+=n}}},72835:(e,s,r)=>{let{scryptSync:t,createDecipheriv:n}=r(55511),{Buffer:i}=r(79428);e.exports=({encryptedString:e,encryptionKey:s,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=s||process.env.DSQL_ENCRYPTION_PASSWORD,u=r||process.env.DSQL_ENCRYPTION_SALT,_=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=n("aes-192-cbc",t(a,u,_),i.alloc(16,0));try{let s=o.update(e,"hex","utf8");return s+=o.final("utf8")}catch(s){return console.log("Error in decrypting =>",s.message),e}}},51348:(e,s,r)=>{let t=r(9973),n=r(21580),i=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let s=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,s,r)=>{let t=r(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let s=`${e}/ca-cert.pem`;if(!t.existsSync(s)){console.log(`${s} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,s)=>{var r;Object.defineProperty(s,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,s,r)=>{e.exports=r(75600)}};var s=require("../../webpack-api-runtime.js");s.C(e);var r=s(s.s=1199);module.exports=r})(); \ No newline at end of file + user_users.invited_user_id='${s.id}' + `),n=[];if(t&&t[0])for(let e=0;e`db_slug='${e}'`).join(" OR ")}) AND user_id=${i}`);for(let e=0;e<_.length;e++){let s=_[e];n.push({id:s.id,user_id:r.user_id,first_name:r.first_name,last_name:r.last_name,email:r.email,image_thumbnail:r.image_thumbnail,db_name:s.db_name,db_slug:s.db_slug,db_full_name:s.db_full_name,db_image:s.db_image,db_description:s.db_description,date_created:s.date_created,user_priviledge:a})}}r.json({success:!0,databases:n})}let l=(0,a.M)(t,"default"),d=(0,a.M)(t,"config"),c=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/getDelegatedDatabases",pathname:"/api/getDelegatedDatabases",bundlePath:"",filename:""},userland:t})},69842:(e,r,s)=>{s.d(r,{A:()=>_});var t=s(48786),n=s(95969),i=s(29021),a=s.n(i),u=s(89159);async function _(e,r,s){let{keyCookieName:i,csrfCookieName:_}=(0,u.A)();if(!e.cookies?.[i]?.match(/./))return null;let o=(0,n.A)({encryptedString:e.cookies[i]});if(!o)return null;let l=JSON.parse(o);if(!l.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!s){let e=await (0,t.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,s)=>{s.d(r,{A:()=>t});function t(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let u=r;e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),u+=t;let _=r;return e?.userId&&(_+=`user_${e.userId}_`),i&&(_+=`${i}_`),{keyCookieName:a,csrfCookieName:u,oneTimeCodeName:_+=n}}},95969:(e,r,s)=>{s.d(r,{A:()=>i});var t=s(55511),n=s(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:s}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=s||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let _=(0,t.scryptSync)(i,a,u),o=n.Buffer.alloc(16,0),l=(0,t.createDecipheriv)("aes-192-cbc",_,o);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,s)=>{s.d(r,{A:()=>t});async function t(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let s=await r.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=45310);module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js.nft.json b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getDelegatedDatabases.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDiskUsage.js b/dsql-app/.local_dist/server/pages/api/getDiskUsage.js index 14a2468..060f6d9 100644 --- a/dsql-app/.local_dist/server/pages/api/getDiskUsage.js +++ b/dsql-app/.local_dist/server/pages/api/getDiskUsage.js @@ -1,22 +1,22 @@ -"use strict";(()=>{var e={};e.id=2139,e.ids=[2139],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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},12155:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>f,routeModule:()=>h});var s={};t.r(s),t.d(s,{default:()=>E});var n=t(89947),i=t(2706),o=t(96762),a=t(51348),c=t.n(a),l=t(48225),u=t.n(l),_=t(6420),d=t.n(_);let p=t(29021),S=t(33873),{execSync:m}=t(79646);async function E(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await d()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});try{"production".match(/production/);let e=(await c()(` +"use strict";(()=>{var e={};e.id=2139,e.ids=[2139],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},53662:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>p,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>m});var n=t(89947),i=t(2706),a=t(96762),o=t(29021),l=t.n(o),c=t(33873),u=t.n(c),d=t(48786),_=t(67619),f=t(69842);async function m(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,f.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});try{"production".match(/production/);let e=await (0,d.A)(` SELECT table_schema, SUM((data_length+index_length)/1024/1024) AS "mb" from information_schema.tables where table_schema like ? group by table_schema - `,[`datasquirel_user_${t.id}%`])).reduce((e,r,t)=>e?.mb?e.mb+r.mb:e+r.mb,0),n=0,i=process.env.DSQL_STATIC_SERVER_DIR;if(!i)throw console.log("Static File ENV not Found!"),Error("No Static Path!");i||p.existsSync(i)||p.mkdirSync(i,{recursive:!0});let o=S.join(i,`images/user-images/user-${t.id}`);p.existsSync(o)||p.mkdirSync(o,{recursive:!0});let a=S.join(i,`images/user-images/user-${t.id}`),l=S.join(i,`videos/user-videos/user-${t.id}`);async function s(e){try{let r=p.readdirSync(e);for(let t=0;t ${e} DELETED FROM DATABASE`)}}}catch(e){console.log("ERROR in getDiskUsage API route =>",e.message),u()({component:"/api/getDiskUsage/lines-93-101",message:e.message})}}p.existsSync(l)||p.mkdirSync(l,{recursive:!0}),await s(a),await s(l);let _=n+e;r.json({success:!0,total:_})}catch(e){u()({component:"/api/getDiskUsage/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Disk Usage Calculation Error!"})}}let f=(0,o.M)(s,"default"),g=(0,o.M)(s,"config"),h=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/getDiskUsage",pathname:"/api/getDiskUsage",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),i=t(29021),o=t(31341);async function a(e,r,t,a){let{keyCookieName:c,csrfCookieName:l}=o();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),i&&(c+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:c+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:i}){let o=new Date,a=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||i.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== + `,[`datasquirel_user_${t.id}%`]),n=(Array.isArray(e)?e:[]).reduce((e,r,t)=>e?.mb?e.mb+r.mb:e+r.mb,0),i=0,a=process.env.DSQL_STATIC_SERVER_DIR;if(!a)throw console.log("Static File ENV not Found!"),Error("No Static Path!");a||l().existsSync(a)||l().mkdirSync(a,{recursive:!0});let o=u().join(a,`images/user-images/user-${t.id}`);l().existsSync(o)||l().mkdirSync(o,{recursive:!0});let c=u().join(a,`images/user-images/user-${t.id}`),f=u().join(a,`videos/user-videos/user-${t.id}`);async function s(e){try{let r=l().readdirSync(e);for(let t=0;t ${e} DELETED FROM DATABASE`)}}}catch(e){console.log("ERROR in getDiskUsage API route =>",e.message),(0,_.default)({component:"/api/getDiskUsage/lines-93-101",message:e.message})}}l().existsSync(f)||l().mkdirSync(f,{recursive:!0}),await s(c),await s(f);let m=i+n;r.json({success:!0,total:m})}catch(e){(0,_.default)({component:"/api/getDiskUsage/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Disk Usage Calculation Error!"})}}let p=(0,a.M)(s,"default"),E=(0,a.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/getDiskUsage",pathname:"/api/getDiskUsage",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(48786),n=t(95969),i=t(29021),a=t.n(i),o=t(89159);async function l(e,r,t){let{keyCookieName:i,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,n.A)({encryptedString:e.cookies[i]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:l+=n}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var s=t(29021),n=t.n(s);async function i({user:e,message:r,component:t,noMail:s,req:i}){let a=new Date,o=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||i.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(n+=` -URL: ${i.url}`),i?.body&&(n+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),a&&(n+=` -IP: ${a}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),i?.url&&(s+=` +URL: ${i.url}`),i?.body&&(s+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),o&&(s+=` +IP: ${o}`),s+=` +Date: ${a.toDateString()} +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,a,c),i.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=12155);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var s=t(55511),n=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,s.scryptSync)(i,a,o),c=n.Buffer.alloc(16,0),u=(0,s.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=53662);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getDiskUsage.js.nft.json b/dsql-app/.local_dist/server/pages/api/getDiskUsage.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getDiskUsage.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getDiskUsage.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js b/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js index 29916d2..87ba101 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js +++ b/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2312,e.ids=[2312],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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},34132:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>p,routeModule:()=>E});var s={};t.r(s),t.d(s,{default:()=>d});var n=t(89947),o=t(2706),i=t(96762),a=t(51348),u=t.n(a),c=t(6420),l=t.n(c);t(29021),t(33873);let{execSync:_}=t(79646);async function d(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=await u()(`SELECT id, table_name, table_slug FROM user_database_tables WHERE user_id='${t.id}' AND db_id='${e.query.dbId}'`);r.json({success:!0,tables:s})}let p=(0,i.M)(s,"default"),f=(0,i.M)(s,"config"),E=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/getUserDatabaseTables",pathname:"/api/getUserDatabaseTables",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:u,csrfCookieName:c}=i();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:u+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,a,u),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=34132);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2312,e.ids=[2312],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},37075:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>_,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>l});var n=t(89947),i=t(2706),a=t(96762),o=t(48786),u=t(69842);t(29021),t(33873);let{execSync:c}=t(79646);async function l(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=await (0,o.A)(`SELECT id, table_name, table_slug FROM user_database_tables WHERE user_id='${t.id}' AND db_id='${e.query.dbId}'`);r.json({success:!0,tables:s})}let _=(0,a.M)(s,"default"),d=(0,a.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/getUserDatabaseTables",pathname:"/api/getUserDatabaseTables",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var s=t(48786),n=t(95969),i=t(29021),a=t.n(i),o=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,n.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${_}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:u+=n}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var s=t(55511),n=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,s.scryptSync)(i,a,o),c=n.Buffer.alloc(16,0),l=(0,s.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=37075);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js.nft.json b/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getUserDatabaseTables.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserDatabases.js b/dsql-app/.local_dist/server/pages/api/getUserDatabases.js index 5d1b349..bc404be 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserDatabases.js +++ b/dsql-app/.local_dist/server/pages/api/getUserDatabases.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2,e.ids=[2],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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},31829:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>p,routeModule:()=>E});var s={};t.r(s),t.d(s,{default:()=>d});var n=t(89947),o=t(2706),i=t(96762),a=t(51348),u=t.n(a),c=t(6420),l=t.n(c);t(29021),t(33873);let{execSync:_}=t(79646);async function d(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=await u()(`SELECT id,db_name,db_slug,db_full_name FROM user_databases WHERE user_id='${t.id}'`);r.json({success:!0,databases:s})}let p=(0,i.M)(s,"default"),f=(0,i.M)(s,"config"),E=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/getUserDatabases",pathname:"/api/getUserDatabases",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:u,csrfCookieName:c}=i();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:u+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,a,u),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=31829);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2,e.ids=[2],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},36857:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>_,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>l});var n=t(89947),i=t(2706),a=t(96762),o=t(48786),u=t(69842);t(29021),t(33873);let{execSync:c}=t(79646);async function l(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=await (0,o.A)(`SELECT id,db_name,db_slug,db_full_name FROM user_databases WHERE user_id='${t.id}'`);r.json({success:!0,databases:s})}let _=(0,a.M)(s,"default"),d=(0,a.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/getUserDatabases",pathname:"/api/getUserDatabases",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var s=t(48786),n=t(95969),i=t(29021),a=t.n(i),o=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,n.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${_}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:u+=n}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var s=t(55511),n=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,s.scryptSync)(i,a,o),c=n.Buffer.alloc(16,0),l=(0,s.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=36857);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserDatabases.js.nft.json b/dsql-app/.local_dist/server/pages/api/getUserDatabases.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserDatabases.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getUserDatabases.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserMedia.js b/dsql-app/.local_dist/server/pages/api/getUserMedia.js index 6210e65..244d22c 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserMedia.js +++ b/dsql-app/.local_dist/server/pages/api/getUserMedia.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7664,e.ids=[7664],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},77148:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),i=t(2706),o=t(96762),a=t(51348),u=t.n(a),c=t(6420),l=t.n(c);async function _(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=await u()(`SELECT * FROM user_media WHERE user_id=${t.id} ORDER BY id DESC`);r.json({media:s})}let d=(0,o.M)(s,"default"),p=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/getUserMedia",pathname:"/api/getUserMedia",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),i=t(29021),o=t(31341);async function a(e,r,t,a){let{keyCookieName:u,csrfCookieName:c}=o();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,a,u),i.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=77148);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7664,e.ids=[7664],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},35179:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>l,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>c});var s=t(89947),i=t(2706),o=t(96762),a=t(48786),u=t(69842);async function c(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=await (0,a.A)(`SELECT * FROM user_media WHERE user_id=${t.id} ORDER BY id DESC`);r.json({media:n})}let l=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/getUserMedia",pathname:"/api/getUserMedia",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),a=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,a.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(i,o,a),c=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=35179);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserMedia.js.nft.json b/dsql-app/.local_dist/server/pages/api/getUserMedia.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserMedia.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getUserMedia.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js b/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js index d207610..66dd748 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js +++ b/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=2221,e.ids=[2221],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},58301:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>p,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),a=t(2706),o=t(96762);t(39831);var i=t(48225),l=t.n(i),c=t(6420),u=t.n(c);let d=t(29021);async function _(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await u()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,s=JSON.parse(d.readFileSync(e,"utf8"));r.json({success:!0,schemaData:s})}catch(e){l()({component:"/api/getUserSchemaData/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Couldn't read schema data"})}}let p=(0,o.M)(s,"default"),S=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/getUserSchemaData",pathname:"/api/getUserSchemaData",bundlePath:"",filename:""},userland:s})},39831:(e,r,t)=>{t(81630);let s=t(72835);e.exports=async function({request:e,databaseSlug:r,user:t,query:n}){try{let a=t.id,o=null;if(!n?.delegated)return{dbUserId:a};let i=n.dbUserId,l=`${process.env.DSQL_USER_DB_PREFIX}${i}_${r}`,c=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${l}`;try{if(!e.cookies?.[c])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[c]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:a=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:a}}catch(e){return null}}},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2221,e.ids=[2221],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},22133:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>c});var s=t(89947),a=t(2706),i=t(96762),o=t(67619),l=t(69842);let u=t(29021);async function c(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,l.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,n=JSON.parse(u.readFileSync(e,"utf8"));r.json({success:!0,schemaData:n})}catch(e){(0,o.default)({component:"/api/getUserSchemaData/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Couldn't read schema data"})}}let d=(0,i.M)(n,"default"),_=(0,i.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/getUserSchemaData",pathname:"/api/getUserSchemaData",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),a=t(29021),i=t.n(a),o=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=s}}},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 i=new Date,o=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${i.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=58301);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(a,i,o),u=s.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=22133);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js.nft.json b/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/getUserSchemaData.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/healthcheck.js b/dsql-app/.local_dist/server/pages/api/healthcheck.js index a748b75..058bd50 100644 --- a/dsql-app/.local_dist/server/pages/api/healthcheck.js +++ b/dsql-app/.local_dist/server/pages/api/healthcheck.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9163,e.ids=[9163],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,n){return n in t?t[n]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,n)):"function"==typeof t&&"default"===n?t:void 0}}})},94253:(e,t,n)=>{n.r(t),n.d(t,{config:()=>P,default:()=>d,routeModule:()=>s});var r={};n.r(r),n.d(r,{default:()=>o});var i=n(89947),u=n(2706),a=n(96762);async function o(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});t.json({success:!0})}let d=(0,a.M)(r,"default"),P=(0,a.M)(r,"config"),s=new i.PagesAPIRouteModule({definition:{kind:u.A.PAGES_API,page:"/api/healthcheck",pathname:"/api/healthcheck",bundlePath:"",filename:""},userland:r})},2706:(e,t)=>{var n;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return n}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(n||(n={}))},89947:(e,t,n)=>{e.exports=n(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var n=t(t.s=94253);module.exports=n})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9163,e.ids=[9163],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,n){return n in t?t[n]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,n)):"function"==typeof t&&"default"===n?t:void 0}}})},49001:(e,t,n)=>{n.r(t),n.d(t,{config:()=>P,default:()=>d,routeModule:()=>s});var r={};n.r(r),n.d(r,{default:()=>o});var i=n(89947),u=n(2706),a=n(96762);async function o(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});t.json({success:!0})}let d=(0,a.M)(r,"default"),P=(0,a.M)(r,"config"),s=new i.PagesAPIRouteModule({definition:{kind:u.A.PAGES_API,page:"/api/healthcheck",pathname:"/api/healthcheck",bundlePath:"",filename:""},userland:r})},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,n)=>{e.exports=n(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var n=t(t.s=49001);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/healthcheck.js.nft.json b/dsql-app/.local_dist/server/pages/api/healthcheck.js.nft.json index b4306a5..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/healthcheck.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/healthcheck.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/importDatabase.js b/dsql-app/.local_dist/server/pages/api/importDatabase.js index 6a4fd3a..ff80cd7 100644 --- a/dsql-app/.local_dist/server/pages/api/importDatabase.js +++ b/dsql-app/.local_dist/server/pages/api/importDatabase.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8675,e.ids=[8675],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},75588:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>g,routeModule:()=>y});var a={};r.r(a),r.d(a,{default:()=>S});var s=r(89947),l=r(2706),n=r(96762),i=r(72350),o=r.n(i),u=r(48225),c=r.n(u),d=r(6420),p=r.n(d);let m=r(29021),_=r(21820),{execSync:f}=r(79646);async function S(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});let r=await p()(e,t,!0);if(!r)return t.json({success:!1,msg:"Unauthorized"});let{database:a,fileBase64:s}=e.body;a?.db_full_name?.match(/datasquirel_user_.*/)||t.json({success:!1,msg:"Unauthorized"});try{let e=`user-${r.id}-temp-sql`,l=_.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql.exe'":"mysql";m.writeFileSync(`./.tmp/${e}.sql`,s,"base64");let n={cwd:process.cwd()};_.platform().match(/win/i)&&(n.shell="bash.exe"),f(`${l} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${a.db_full_name} < .tmp/${e}.sql`,n);let i=await o()({database:a,userId:r.id});t.json({success:!!i})}catch(e){console.log(e),c()({component:"/api/importDatabase/catch-error",message:e.message,user:r}),t.json({success:!1,msg:"Import Failed!"})}}let g=(0,n.M)(a,"default"),h=(0,n.M)(a,"config"),y=new s.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/importDatabase",pathname:"/api/importDatabase",bundlePath:"",filename:""},userland:a})},72350:(e,t,r)=>{let a=r(57638),{default:s}=r(2258),{default:l}=r(78634),n=r(47670),i=r(24256);e.exports=async function({userId:e,database:t}){try{if(!e){console.log("No user Id provided");return}let r=s({userId:e});if(!r)throw Error("User schema data not found!");let o=r.filter(e=>e.dbFullName===t.db_full_name)[0],u=await a({database:t.db_full_name,queryString:"SHOW TABLES"});if(!u)throw Error("No Existing Tables");for(let r=0;re.Field===a)[0],u=c.indexes?.filter(e=>e.indexName==r);u&&u[0]?u[0].indexTableFields?.push({value:a,dataType:o.Type.toUpperCase()}):(i.indexTableFields=[{value:a,dataType:o.Type.toUpperCase()}],c.indexes?.push(i))}o.tables.push(c)}return l({schemaData:r,userId:e}),!0}catch(e){return console.log(e),!1}}},6420:(e,t,r)=>{r(81630);let a=r(51348),s=r(72835),l=r(29021),n=r(31341);async function i(e,t,r,i){let{keyCookieName:o,csrfCookieName:u}=n();if(!e.cookies?.[o]?.match(/./))return null;let c=s({encryptedString:e.cookies[o]});if(!c)return null;let d=JSON.parse(c);if(!d.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!l.existsSync(`${p}/${d.csrf_k}`))return null;if(0==d.verification_status&&!r){let e=await a(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=t;e?.userId&&(n+=`user_${e.userId}_`),l&&(n+=`${l}_`),n+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),i+=a;let o=t;return e?.userId&&(o+=`user_${e.userId}_`),l&&(o+=`${l}_`),{keyCookieName:n,csrfCookieName:i,oneTimeCodeName:o+=s}}},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},2258:(e,t,r)=>{let a=r(48225),s=r(29021),l=r(33873);e.exports=function({userId:e}){try{let t=l.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(s.readFileSync(t,"utf-8"))}catch(e){return a({component:"grabUserSchemaData",message:e.message}),null}}},6061:(e,t,r)=>{let a=r(72835),s=r(30003);e.exports=async function({unparsedResults:e,tableSchema:t}){let r=[];try{for(let l=0;l",t.message),e}}},48225:(e,t,r)=>{let a=r(29021),{IncomingMessage:s}=r(81630);e.exports=async function({user:e,message:t,component:r,noMail:s,req:l}){let n=new Date,i=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],t=l.headers["x-real-ip"],r=l.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||a||t||l.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8675,e.ids=[8675],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},54356:(e,t,r)=>{r.r(t),r.d(t,{config:()=>y,default:()=>h,routeModule:()=>E});var a={};r.r(a),r.d(a,{default:()=>b});var s=r(89947),l=r(2706),n=r(96762),i=r(30944),o=r(4820),u=r(21724),d=r(98e3);function c(e){return e?e.split("-").filter(e=>""!==e).map(e=>e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()).join(" "):null}async function m({userId:e,database:t}){try{if(!e){console.log("No user Id provided");return}let r=(0,o.A)({userId:e});if(!r)throw Error("User schema data not found!");let a=r.filter(e=>e.dbFullName===t.db_full_name)[0],s=await (0,i.A)({database:t.db_full_name,queryString:`SHOW TABLES FROM ${t.db_full_name}`});if(!s)throw Error("No Existing Tables");for(let r=0;re.Field===a)[0],c=o.indexes?.filter(e=>e.indexName==r);c&&c[0]?c[0].indexTableFields?.push({value:a,dataType:d.Type.toUpperCase()}):(i.indexTableFields=[{value:a,dataType:d.Type.toUpperCase()}],o.indexes?.push(i))}a.tables.push(o)}return(0,u.A)({schemaData:r,userId:e}),!0}catch(e){return console.log(e),!1}}var p=r(67619),_=r(69842);let f=r(29021),S=r(21820),{execSync:g}=r(79646);async function b(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});let r=await (0,_.A)(e,t,!0);if(!r)return t.json({success:!1,msg:"Unauthorized"});let{database:a,fileBase64:s}=e.body;a?.db_full_name?.match(/datasquirel_user_.*/)||t.json({success:!1,msg:"Unauthorized"});try{let e=`user-${r.id}-temp-sql`,l=S.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql.exe'":"mysql";f.writeFileSync(`./.tmp/${e}.sql`,s,"base64");let n={cwd:process.cwd()};S.platform().match(/win/i)&&(n.shell="bash.exe"),g(`${l} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${a.db_full_name} < .tmp/${e}.sql`,n);let i=await m({database:a,userId:r.id});t.json({success:!!i})}catch(e){console.log(e),(0,p.default)({component:"/api/importDatabase/catch-error",message:e.message,user:r}),t.json({success:!1,msg:"Import Failed!"})}}let h=(0,n.M)(a,"default"),y=(0,n.M)(a,"config"),E=new s.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/importDatabase",pathname:"/api/importDatabase",bundlePath:"",filename:""},userland:a})},69842:(e,t,r)=>{r.d(t,{A:()=>o});var a=r(48786),s=r(95969),l=r(29021),n=r.n(l),i=r(89159);async function o(e,t,r){let{keyCookieName:l,csrfCookieName:o}=(0,i.A)();if(!e.cookies?.[l]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(d.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!n().existsSync(`${c}/${d.csrf_k}`))return null;if(0==d.verification_status&&!r){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}},89159:(e,t,r)=>{r.d(t,{A:()=>a});function a(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=t;e?.userId&&(n+=`user_${e.userId}_`),l&&(n+=`${l}_`),n+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),i+=a;let o=t;return e?.userId&&(o+=`user_${e.userId}_`),l&&(o+=`${l}_`),{keyCookieName:n,csrfCookieName:i,oneTimeCodeName:o+=s}}},4820:(e,t,r)=>{r.d(t,{A:()=>o});var a=r(67619),s=r(29021),l=r.n(s),n=r(33873),i=r.n(n);function o({userId:e}){try{let t=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(l().readFileSync(t,"utf-8"))}catch(e){return(0,a.default)({component:"grabUserSchemaData",message:e.message}),null}}},43775:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function l({unparsedResults:e,tableSchema:t}){let r=[];try{for(let l=0;l",t.message),e}}},67619:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var a=r(29021),s=r.n(a);async function l({user:e,message:t,component:r,noMail:a,req:l}){let n=new Date,i=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],t=l.headers["x-real-ip"],r=l.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||a||t||l.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${t} -Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),l?.url&&(s+=` -URL: ${l.url}`),l?.body&&(s+=` -Request Body: ${JSON.stringify(l.body,null,4)}`),i&&(s+=` -IP: ${i}`),s+=` +User Email: ${e?.email}`),l?.url&&(a+=` +URL: ${l.url}`),l?.body&&(a+=` +Request Body: ${JSON.stringify(l.body,null,4)}`),i&&(a+=` +IP: ${i}`),a+=` Date: ${n.toDateString()} -========================================`,a.existsSync("./.tmp/error.log")||a.writeFileSync("./.tmp/error.log","","utf-8");let o=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",s),a.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let o=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},78634:(e,t,r)=>{let a=r(48225),s=r(29021),l=r(33873);e.exports=function({userId:e,schemaData:t}){try{let r=l.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return s.writeFileSync(r,JSON.stringify(t),"utf8"),!0}catch(e){return a({component:"/functions/backend/setUserSchemaData",message:e.message}),!1}}},57638:(e,t,r)=>{r(29021);let a=r(6061),s=r(48225),l=r(51348),n=r(21339),i=r(44900);e.exports=async function({queryString:e,queryValuesArray:t,database:r,tableSchema:o,useLocal:u}){let c;let d=!!u||!!r?.match(/^datasquirel$/),p=u?i:d?l:n;try{c=e&&t&&Array.isArray(t)&&t[0]?d?await p(e,t):await p({paradigm:"Full Access",database:r,queryString:e,queryValues:t}):d?await p(e):await p({paradigm:"Full Access",database:r,queryString:e})}catch(e){s({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&o)try{let e=c;return await a({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",r,e),s({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},72835:(e,t,r)=>{let{scryptSync:a,createDecipheriv:s}=r(55511),{Buffer:l}=r(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=r||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=s("aes-192-cbc",a(n,i,o),l.alloc(16,0));try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},24256:e=>{e.exports=function(e){return e?e.split("-").filter(e=>""!==e).map(e=>e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()).join(" "):null}}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[4050],()=>r(75588));module.exports=a})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},21724:(e,t,r)=>{r.d(t,{A:()=>o});var a=r(67619),s=r(29021),l=r.n(s),n=r(33873),i=r.n(n);function o({userId:e,schemaData:t}){try{let r=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return l().writeFileSync(r,JSON.stringify(t),"utf8"),!0}catch(e){return(0,a.default)({component:"/functions/backend/setUserSchemaData",message:e.message}),!1}}},30944:(e,t,r)=>{r.d(t,{A:()=>o});var a=r(43775),s=r(67619),l=r(48786),n=r(37275),i=r(7971);async function o({queryString:e,queryValuesArray:t,database:r,tableSchema:o,useLocal:u}){let d;let c=!!u||!!r?.match(/^datasquirel$/),m=u?i.A:c?l.A:n.default;try{d=e&&t&&Array.isArray(t)&&t[0]?c?await m(e,t):await m({paradigm:"Full Access",queryString:e,queryValues:t}):c?await m(e):await m({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(d&&o)try{let e=d;return await (0,a.A)({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",r,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(d)return d;else return null}},95969:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(55511),s=r(79428);function l({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=t||process.env.DSQL_ENCRYPTION_PASSWORD,n=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,a.scryptSync)(l,n,i),u=s.Buffer.alloc(16,0),d=(0,a.createDecipheriv)("aes-192-cbc",o,u);try{let t=d.update(e,"hex","utf8");return t+=d.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[1251],()=>r(54356));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/importDatabase.js.nft.json b/dsql-app/.local_dist/server/pages/api/importDatabase.js.nft.json index 78bc7b4..8b2b17f 100644 --- a/dsql-app/.local_dist/server/pages/api/importDatabase.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/importDatabase.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js b/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js index 6ba1dd6..335a16a 100644 --- a/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js +++ b/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3382,e.ids=[3382],e.modules={60818:e=>{e.exports=require("dotenv")},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")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},56807:(e,r,t)=>{t.r(r),t.d(r,{config:()=>D,default:()=>E,routeModule:()=>v});var s={};t.r(s),t.d(s,{default:()=>m});var n=t(89947),a=t(2706),o=t(96762),i=t(48225),u=t.n(i),c=t(6420),l=t.n(c),_=t(19261),d=t.n(_);let p=t(29021),f=t(33873);t(21820);let{execSync:S}=t(79646);async function m(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{database:s,fileBase64:n}=e.body;s?.db_full_name?.match(/datasquirel_user_.*/)||r.json({success:!1,msg:"Unauthorized"});try{let e=Buffer.from(n,"base64").toString("utf-8"),a=JSON.parse(e),o=f.resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${t.id}/main.json`);if(!p.existsSync(o))return r.end();let i=JSON.parse(p.readFileSync(o,"utf-8")),u=i.find(e=>e.dbFullName==s.db_full_name);if(!u)throw Error("Database not found!");u.tables=a.tables,p.writeFileSync(o,JSON.stringify(i),"utf-8"),await d()({userId:t.id,targetDatabase:s.db_full_name}),r.json({success:!0})}catch(e){console.log("JSON import ERROR =>",e.message),u()({component:"/api/importDatabase/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Import Failed!"})}}let E=(0,o.M)(s,"default"),D=(0,o.M)(s,"config"),v=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/importDatabaseSchema",pathname:"/api/importDatabaseSchema",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function i(e,r,t,i){let{keyCookieName:u,csrfCookieName:c}=o();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),a&&(u+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:u+=n}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[2451],()=>t(56807));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3382,e.ids=[3382],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},84612:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>p,routeModule:()=>E});var s={};t.r(s),t.d(s,{default:()=>f});var n=t(89947),a=t(2706),i=t(96762),o=t(67619),u=t(69842),l=t(76856);let c=t(29021),d=t(33873);t(21820);let{execSync:_}=t(79646);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{database:s,fileBase64:n}=e.body;s?.db_full_name?.match(/datasquirel_user_.*/)||r.json({success:!1,msg:"Unauthorized"});try{let e=Buffer.from(n,"base64").toString("utf-8"),a=JSON.parse(e),i=d.resolve(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${t.id}/main.json`);if(!c.existsSync(i))return r.end();let o=JSON.parse(c.readFileSync(i,"utf-8")),u=o.find(e=>e.dbFullName==s.db_full_name);if(!u)throw Error("Database not found!");u.tables=a.tables,c.writeFileSync(i,JSON.stringify(o),"utf-8"),await (0,l.A)({userId:t.id,targetDatabase:s.db_full_name}),r.json({success:!0})}catch(e){console.log("JSON import ERROR =>",e.message),(0,o.default)({component:"/api/importDatabase/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Import Failed!"})}}let p=(0,i.M)(s,"default"),S=(0,i.M)(s,"config"),E=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/importDatabaseSchema",pathname:"/api/importDatabaseSchema",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var s=t(48786),n=t(95969),a=t(29021),i=t.n(a),o=t(89159);async function u(e,r,t){let{keyCookieName:a,csrfCookieName:u}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let l=(0,n.A)({encryptedString:e.cookies[a]});if(!l)return null;let c=JSON.parse(l);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),a&&(u+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:u+=n}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[2282],()=>t(84612));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js.nft.json b/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js.nft.json index c6bfca4..5fd959e 100644 --- a/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/importDatabaseSchema.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.env","../../../../jsonData/dbSchemas/main.json","../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/main.json","../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/infiniteScroll.js b/dsql-app/.local_dist/server/pages/api/infiniteScroll.js index 4dc08e3..00daaab 100644 --- a/dsql-app/.local_dist/server/pages/api/infiniteScroll.js +++ b/dsql-app/.local_dist/server/pages/api/infiniteScroll.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=8932,e.ids=[8932],e.modules={27825:e=>{e.exports=require("lodash")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},22790:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>E,routeModule:()=>D});var s={};t.r(s),t.d(s,{default:()=>f});var a=t(89947),n=t(2706),o=t(96762),l=t(6420),c=t.n(l),i=t(48225),u=t.n(i);t(27825);var d=t(39831),_=t.n(d),p=t(57638),S=t.n(p);async function f(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await c()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body;try{let a=await _()({databaseSlug:s.dbName,request:e,user:t,query:e.query}),n=a?a?.rootUserId?a.rootUserId:a.dbUserId:null;if(!n)throw Error("User not Found!");let o=`datasquirel_user_${n}_${s.dbName}`,l=s.tableName,c=s.page,i=20*c,u=`SELECT * FROM ${l}`,d=[];s.search&&s.searchField&&(u+=` WHERE LOWER(\`${s.searchField.toLowerCase().replace(/ /g,"_")}\`) LIKE ?`,d.push(`%${s.search.toLowerCase()}%`)),u+=` ORDER BY id DESC LIMIT 20 OFFSET ${i}`;let p=await S()({database:o,queryString:u,queryValuesArray:d,tableSchema:s.tableSchema}),f={success:!0,data:p,page:Number(c)+1};r.json(f)}catch(e){u()({component:"/api/infiniteScroll/catch-error",message:e.message,user:t}),r.json({success:!1,data:null})}}t(29021);let E=(0,o.M)(s,"default"),m=(0,o.M)(s,"config"),D=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/infiniteScroll",pathname:"/api/infiniteScroll",bundlePath:"",filename:""},userland:s})},39831:(e,r,t)=>{t(81630);let s=t(72835);e.exports=async function({request:e,databaseSlug:r,user:t,query:a}){try{let n=t.id,o=null;if(!a?.delegated)return{dbUserId:n};let l=a.dbUserId,c=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,i=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${c}`;try{if(!e.cookies?.[i])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[i]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},6420:(e,r,t)=>{t(81630);let s=t(51348),a=t(72835),n=t(29021),o=t(31341);async function l(e,r,t,l){let{keyCookieName:c,csrfCookieName:i}=o();if(!e.cookies?.[c]?.match(/./))return null;let u=a({encryptedString:e.cookies[c]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=l},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),n&&(c+=`${n}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:c+=a}}},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)=>{let s=t(72835),a=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let n=0;n",r.message),e}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:a,req:n}){let o=new Date,l=(()=>{if(!n)return null;try{let e=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)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8932,e.ids=[8932],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},36629:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>_,routeModule:()=>p});var a={};t.r(a),t.d(a,{default:()=>d});var s=t(89947),n=t(2706),o=t(96762),l=t(69842),i=t(67619),c=t(60125),u=t(30944);async function d(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,l.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let a=e.body;try{let s=await (0,c.A)({databaseSlug:a.dbName,request:e,user:t,query:e.query}),n=s?s?.rootUserId?s.rootUserId:s.dbUserId:null;if(!n)throw Error("User not Found!");let o=`datasquirel_user_${n}_${a.dbName}`,l=a.tableName,i=a.page,d=20*i,_=`SELECT * FROM ${o}.${l}`,f=[];a.search&&a.searchField&&(_+=` WHERE LOWER(\`${a.searchField.toLowerCase().replace(/ /g,"_")}\`) LIKE ?`,f.push(`%${a.search.toLowerCase()}%`)),_+=` ORDER BY id DESC LIMIT 20 OFFSET ${d}`;let p=await (0,u.A)({database:o,queryString:_,queryValuesArray:f,tableSchema:a.tableSchema}),S={success:!0,data:p,page:Number(i)+1};r.json(S)}catch(e){(0,i.default)({component:"/api/infiniteScroll/catch-error",message:e.message,user:t}),r.json({success:!1,data:null})}}t(29021);let _=(0,o.M)(a,"default"),f=(0,o.M)(a,"config"),p=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/infiniteScroll",pathname:"/api/infiniteScroll",bundlePath:"",filename:""},userland:a})},60125:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);async function s({request:e,databaseSlug:r,user:t,query:s}){try{let n=t.id,o=null;if(!s?.delegated)return{dbUserId:n};let l=s.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,c=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[c])throw Error("Cookie not present");let t=(0,a.A)({encryptedString:e.cookies[c]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},69842:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(48786),s=t(95969),n=t(29021),o=t.n(n),l=t(89159);async function i(e,r,t){let{keyCookieName:n,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[n]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[n]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=a;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function n({unparsedResults:e,tableSchema:r}){let t=[];try{for(let n=0;n",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>n});var a=t(29021),s=t.n(a);async function n({user:e,message:r,component:t,noMail:a,req:n}){let o=new Date,l=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],r=n.headers["x-real-ip"],t=n.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||a||r||n.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${n.url}`),n?.body&&(a+=` Request Body: ${JSON.stringify(n.body,null,4)}`),l&&(a+=` IP: ${l}`),a+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let i=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),a=t(48225),n=t(51348),o=t(21339),l=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:c,useLocal:i}){let u;let d=!!i||!!t?.match(/^datasquirel$/),_=i?l:d?n:o;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",database:t,queryString:e})}catch(e){a({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&c)try{let e=u;return await s({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),a({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:a}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=a("aes-192-cbc",s(o,l,c),n.alloc(16,0));try{let r=i.update(e,"hex","utf8");return r+=i.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),a=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function o(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let a=t(9973),n=t(21580),o=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:l}){try{return new Promise((c,i)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),c(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),c({error:e.message,queryStringGenerated:t,queryValuesGenerated:l,sql:e.sql})}o=u?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:n()}}),l&&Array.isArray(l)&&l[0]?o.query(t,l).then(d).catch(_):o.query(t).then(d).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),a=t(21580);async function n(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=22790);module.exports=t})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(43775),s=t(67619),n=t(48786),o=t(37275),l=t(7971);async function i({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?l.A:d?n.A:o.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await (0,a.A)({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(55511),s=t(79428);function n({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,a.scryptSync)(n,o,l),c=s.Buffer.alloc(16,0),u=(0,a.createDecipheriv)("aes-192-cbc",i,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function a(e,r,t){try{if("string"==typeof r){let a=await e.query(s(r),t);return JSON.parse(JSON.stringify(a))}if("object"!=typeof r)return null;{let t=[];for(let a=0;an})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(9973),s=t.n(a),n=t(29021),o=t.n(n);async function l(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=36629);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/infiniteScroll.js.nft.json b/dsql-app/.local_dist/server/pages/api/infiniteScroll.js.nft.json index cc084fc..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/infiniteScroll.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/infiniteScroll.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/loginUser.js b/dsql-app/.local_dist/server/pages/api/loginUser.js index d98f027..d05af23 100644 --- a/dsql-app/.local_dist/server/pages/api/loginUser.js +++ b/dsql-app/.local_dist/server/pages/api/loginUser.js @@ -1,19 +1,19 @@ -"use strict";(()=>{var e={};e.id=3303,e.ids=[3303],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},95122:(e,r,t)=>{t.r(r),t.d(r,{config:()=>O,default:()=>D,routeModule:()=>$});var s={};t.r(s),t.d(s,{default:()=>A});var i=t(89947),a=t(2706),n=t(96762),o=t(51348),l=t.n(o),u=t(44767),d=t.n(u),_=t(48225),m=t.n(_),c=t(59474),p=t.n(c),g=t(91766),f=t.n(g),E=t(31341),S=t.n(E),h=t(14533),L=t.n(h);let v=t(29021),y=t(20503);async function A(e,r){if("POST"===e.method){let t=e.body,s=t.email,i=t.password,a=t.query;if(s.match(/ /))return r.json({user:null,msg:"Invalid Email"});try{let t=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!t)throw Error("loginUser error: process.env.DSQL_USER_LOGIN_KEYS_PATH not present");v.existsSync(t)||v.mkdirSync(t,{recursive:!0});let n=e.headers["x-real-ip"]||e.headers["x-forwarded-for"]||e.connection.remoteAddress,o=process.env.DSQL_HOST||"https://datasquirel.com",u=L()({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:i});if(i?.match(/ /)||s?.match(/ /))return r.json({msg:"Failed!",user:null});let _=await l()("SELECT * FROM users WHERE email=? OR username=?",[s,s]);if(!_||!_[0])return r.json({msg:"No user found",user:null});let m=!1;if(_&&_[0]&&(m=u===_[0].password),!m)return await f()(),p()({to:process.env.DSQL_CONTACT_EMAIL,subject:`Failed Login from ${s}`,html:`

${s} tried to login with a wrong password

${s} attempted a login on ${o} from ${n} with a wrong password.

`}),r.json({msg:"Wrong Password, Wrong Social Media Credentials",user:null});let c=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),g={id:_[0].id,stripe_id:_[0].stripe_id||"",first_name:_[0].first_name,last_name:_[0].last_name,username:_[0].username,email:_[0].email,social_id:_[0].social_id,image:_[0].image,image_thumbnail:_[0].image_thumbnail,verification_status:_[0].verification_status,social_login:_[0].social_login,social_platform:_[0].social_platform,csrf_k:c,logged_in_status:!0,date:Date.now()},E=y({data:JSON.stringify(g)}),{keyCookieName:h,csrfCookieName:A}=S()();r.setHeader("Set-Cookie",[`${h}=${E};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${A}=${c};samesite=strict;path=/;HttpOnly=true`]),v.appendFile("./.tmp/userLoginLogs.log",`${_[0].first_name} ${_[0].last_name} Logged in from ${_[0].social_login?_[0].social_platform:"Regular Email Login"} at ${Date()} +"use strict";(()=>{var e={};e.id=3303,e.ids=[3303],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},19813:(e,r,t)=>{t.r(r),t.d(r,{config:()=>A,default:()=>S,routeModule:()=>h});var s={};t.r(s),t.d(s,{default:()=>E});var a=t(89947),i=t(2706),n=t(96762),o=t(29021),l=t.n(o),d=t(48786),u=t(49941),_=t(67619),m=t(96052),c=t(2416),p=t(89159),g=t(83919),f=t(68829);async function E(e,r){if("POST"===e.method){let t=e.body,s=t.email,a=t.password,i=t.query;if(s.match(/ /))return r.json({user:null,msg:"Invalid Email"});try{let t=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!t)throw Error("loginUser error: process.env.DSQL_USER_LOGIN_KEYS_PATH not present");l().existsSync(t)||l().mkdirSync(t,{recursive:!0});let n=e.headers["x-real-ip"]||e.headers["x-forwarded-for"]||e.connection.remoteAddress,o=process.env.DSQL_HOST||"https://datasquirel.com",_=(0,g.A)({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:a});if(a?.match(/ /)||s?.match(/ /))return r.json({msg:"Failed!",user:null});let E=await (0,d.A)("SELECT * FROM users WHERE email=? OR username=?",[s,s]);if(!E||!E[0])return r.json({msg:"No user found",user:null});let S=!1;if(E&&E[0]&&(S=_===E[0].password),!S)return await (0,c.A)(),(0,m.default)({to:process.env.DSQL_CONTACT_EMAIL,subject:`Failed Login from ${s}`,html:`

${s} tried to login with a wrong password

${s} attempted a login on ${o} from ${n} with a wrong password.

`}),r.json({msg:"Wrong Password, Wrong Social Media Credentials",user:null});let A=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),h={id:E[0].id,stripe_id:E[0].stripe_id||"",first_name:E[0].first_name,last_name:E[0].last_name,username:E[0].username,email:E[0].email,social_id:E[0].social_id,image:E[0].image,image_thumbnail:E[0].image_thumbnail,verification_status:E[0].verification_status,social_login:E[0].social_login,social_platform:E[0].social_platform,csrf_k:A,logged_in_status:!0,date:Date.now()},v=(0,f.default)({data:JSON.stringify(h)}),{keyCookieName:L,csrfCookieName:y}=(0,p.A)();r.setHeader("Set-Cookie",[`${L}=${v};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${y}=${A};samesite=strict;path=/;HttpOnly=true`]),l().appendFile("./.tmp/userLoginLogs.log",`${E[0].first_name} ${E[0].last_name} Logged in from ${E[0].social_login?E[0].social_platform:"Regular Email Login"} at ${Date()} -`,"utf8",e=>{e&&console.log("Loging log write error")}),v.writeFileSync(`${t}/${c}`,JSON.stringify(g)),a?.invite&&d()({query:a,user:{...g,phone:_[0].phone}}),await f()(),p()({to:process.env.DSQL_CONTACT_EMAIL,subject:`${s} Logged in successfully`,html:`

${s} successfully logged in

${s} successfully logged in on ${o} from ${n} on ${Date().substring(0,16)}.

`}),r.json({msg:"User Found",user:{auth:!0,userid:_[0].id,csrf_k:c,stripe_id:_[0].stripe_id||""},userPayload:g})}catch(e){console.log("Login Error =>",e.message),m()({component:"/api/loginUser/main-catch-error",message:e.message,user:{email:s}})}}else r.json({msg:"Oops ..."})}let D=(0,n.M)(s,"default"),O=(0,n.M)(s,"config"),$=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/loginUser",pathname:"/api/loginUser",bundlePath:"",filename:""},userland:s})},91766:e=>{e.exports=async function(e){return await new Promise((r,t)=>{setTimeout(()=>{r(!0)},e||1e3)}),!0}},44767:(e,r,t)=>{let s=t(48225),i=t(51348),a=t(47670),n=t(44900);e.exports=async function({query:e,user:r,useLocal:t}){try{let s=t?n:i,{invite:o,database_access:l,priviledge:u,email:d}=e,_=[o,d],m=await s("SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",_);if(!m||!m[0])throw Error("No Invitation Found");let c=[o],p=await s("SELECT first_name,last_name,email FROM users WHERE id=?",c);if(p?.[0]){let e=await s("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[o,r.id,d]);if(e?.[0])console.log("User already added");else{a({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:o,invited_user_id:r.id,database_access:l,first_name:r.first_name,last_name:r.last_name,phone:r.phone,email:r.email,username:r.username,user_type:"admin",user_priviledge:u,image:r.image,image_thumbnail:r.image_thumbnail},useLocal:t});let e=await s("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[o,d]);if(await s("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[o,r.id]),e&&e[0]){let s=e[0].db_tables_data.split("|");for(let e=0;e{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),a&&(n+=`${a}_`),n+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:n,csrfCookieName:o,oneTimeCodeName:l+=i}}},59474:(e,r,t)=>{let s=t(29021),i=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:n}){let o;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let l=(n?.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}}/,a||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"Datasquirel" <${l}>`,s.sender=l,n&&(s["replyTo "]=l),s.to=e,s.subject=r,s.text=t,s.html=u,o=await i.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return o}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:i}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:i,req:a}){let n=new Date,o=(()=>{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],i=t||s||r||a.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== +`,"utf8",e=>{e&&console.log("Loging log write error")}),l().writeFileSync(`${t}/${A}`,JSON.stringify(h)),i?.invite&&(0,u.A)({query:i,user:{...h,phone:E[0].phone}}),await (0,c.A)(),(0,m.default)({to:process.env.DSQL_CONTACT_EMAIL,subject:`${s} Logged in successfully`,html:`

${s} successfully logged in

${s} successfully logged in on ${o} from ${n} on ${Date().substring(0,16)}.

`}),r.json({msg:"User Found",user:{auth:!0,userid:E[0].id,csrf_k:A,stripe_id:E[0].stripe_id||""},userPayload:h})}catch(e){console.log("Login Error =>",e.message),(0,_.default)({component:"/api/loginUser/main-catch-error",message:e.message,user:{email:s}})}}else r.json({msg:"Oops ..."})}let S=(0,n.M)(s,"default"),A=(0,n.M)(s,"config"),h=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/loginUser",pathname:"/api/loginUser",bundlePath:"",filename:""},userland:s})},2416:(e,r,t)=>{t.d(r,{A:()=>s});async function s(e){return await new Promise((r,t)=>{setTimeout(()=>{r(!0)},e||1e3)}),!0}},49941:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(67619),a=t(48786),i=t(98e3),n=t(7971);async function o({query:e,user:r,useLocal:t}){try{let s=t?n.A:a.A,{invite:o,database_access:l,priviledge:d,email:u}=e,_=[o,u],m=await s("SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",_);if(!m||!m[0])throw Error("No Invitation Found");let c=[o],p=await s("SELECT first_name,last_name,email FROM users WHERE id=?",c);if(p?.[0]){let e=await s("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[o,r.id,u]);if(e?.[0])console.log("User already added");else{(0,i.A)({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:o,invited_user_id:r.id,database_access:l,first_name:r.first_name,last_name:r.last_name,phone:r.phone,email:r.email,username:r.username,user_type:"admin",user_priviledge:d,image:r.image,image_thumbnail:r.image_thumbnail},useLocal:t});let e=await s("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[o,u]);if(await s("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[o,r.id]),e&&e[0]){let s=e[0].db_tables_data.split("|");for(let e=0;e{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:n,csrfCookieName:o,oneTimeCodeName:l+=a}}},96052:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var s=t(29021),a=t.n(s),i=t(21572);let n=t.n(i)().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 o({to:e,subject:r,text:t,html:s,alias:i,senderName:o}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let d=(i?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!a().existsSync("./email/index.html"))return;let u=a().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,s||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"${o||"Datasquirel"}" <${d}>`,s.sender=d,i&&(s.replyTo=d),s.to=e,s.subject=r,s.text=t,s.html=u,l=await n.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return l}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var s=t(29021),a=t.n(s);async function i({user:e,message:r,component:t,noMail:s,req:i}){let n=new Date,o=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||s||r||i.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(i+=` -URL: ${a.url}`),a?.body&&(i+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(i+=` -IP: ${o}`),i+=` +User Email: ${e?.email}`),i?.url&&(s+=` +URL: ${i.url}`),i?.body&&(s+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),o&&(s+=` +IP: ${o}`),s+=` Date: ${n.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",i),s.appendFileSync("./.tmp/error.log",` +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let l=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",s),a().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},14533:(e,r,t)=>{let{createHmac:s}=t(55511);e.exports=function({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let i=s("sha512",t);return i.update(e),i.digest("base64")}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050],()=>t(95122));module.exports=s})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},83919:(e,r,t)=>{t.d(r,{A:()=>a});var s=t(55511);function a({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=(0,s.createHmac)("sha512",t);return a.update(e),a.digest("base64")}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[1251],()=>t(19813));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/loginUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/loginUser.js.nft.json index 377570b..3a4d399 100644 --- a/dsql-app/.local_dist/server/pages/api/loginUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/loginUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/logoutUser.js b/dsql-app/.local_dist/server/pages/api/logoutUser.js index bafcf4b..b5586af 100644 --- a/dsql-app/.local_dist/server/pages/api/logoutUser.js +++ b/dsql-app/.local_dist/server/pages/api/logoutUser.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=528,e.ids=[528],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},22380:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>l,routeModule:()=>p});var s={};t.r(s),t.d(s,{default:()=>c});var n=t(89947),o=t(2706),i=t(96762);t(6420);var u=t(31341),a=t.n(u);async function c(e,r){if("GET"!==e.method)return r.json({msg:"Logout Error"});{let{keyCookieName:e,csrfCookieName:t}=a()();r.setHeader("Set-Cookie",[`${e}=null;max-age=0`,`${t}=null;max-age=0`]),r.json({msg:"Logged Out"})}}t(29021);let l=(0,i.M)(s,"default"),_=(0,i.M)(s,"config"),p=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/logoutUser",pathname:"/api/logoutUser",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function u(e,r,t,u){let{keyCookieName:a,csrfCookieName:c}=i();if(!e.cookies?.[a]?.match(/./))return null;let l=n({encryptedString:e.cookies[a]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=u},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=s;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:i,csrfCookieName:u,oneTimeCodeName:a+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,u=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!u?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,u,a),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=22380);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=528,e.ids=[528],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},59805:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>i,routeModule:()=>l});var n={};t.r(n),t.d(n,{default:()=>d});var u=t(89947),s=t(2706),o=t(96762),a=t(89159);async function d(e,r){if("GET"!==e.method)return r.json({msg:"Logout Error"});{let{keyCookieName:e,csrfCookieName:t}=(0,a.A)();r.setHeader("Set-Cookie",[`${e}=null;max-age=0`,`${t}=null;max-age=0`]),r.json({msg:"Logged Out"})}}t(29021);let i=(0,o.M)(n,"default"),_=(0,o.M)(n,"config"),l=new u.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/logoutUser",pathname:"/api/logoutUser",bundlePath:"",filename:""},userland:n})},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",u=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),s&&(o+=`${s}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),s&&(a+=`${s}_`),a+=n;let d=r;return e?.userId&&(d+=`user_${e.userId}_`),s&&(d+=`${s}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:d+=u}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=59805);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/logoutUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/logoutUser.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/logoutUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/logoutUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js b/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js index 95ce05e..4f030db 100644 --- a/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js +++ b/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2678,e.ids=[2678],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},10304:(e,r,s)=>{s.r(r),s.d(r,{config:()=>E,default:()=>m,routeModule:()=>f});var t={};s.r(t),s.d(t,{default:()=>S});var i=s(89947),n=s(2706),a=s(96762),o=s(51348),c=s.n(o),u=s(6420),l=s.n(u),d=s(33873),_=s.n(d);let p=s(29021);async function S(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Failed!"});let s=await l()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let t=e.body;if(t.media_url?.match(/\.\./)||t.folder?.match(/\.\./)||t.id?.toString()?.match(/\.\./))return r.json({success:!1,msg:"Error!",error:"Invalid url"});try{let e=t?.private==1,i=e?t?.media_path?.replace(/\@\/media/i,"")||t?.media_url.replace(/\@\/media/i,""):t?.media_path?.match(/\/user-images\/user-.*/)||t?.media_url?.match(/\/user-images\/user-.*/),n=t.folder?`/${t.folder}`:"",a=process.env.DSQL_STATIC_SERVER_DIR;if(!a)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let o=_().join(a,"images"),u=`${process.env.DSQL_STATIC_HOST}/images/user-images/user-${s.id}`,l=`/images/user-images/user-${s.id}`,d=(e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s.id}/media`:o)+i,S=e?`${o}/user-images/user-${s.id}`:`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s.id}/media`;if(!p.existsSync(S))try{p.mkdirSync(S,{recursive:!0})}catch(e){console.log("LINE 88 error:",e.message)}n&&n.split("/").reduce((e,r)=>{let s=e?.match(/./)?`${e}/${r}`:S;return p.existsSync(s)||p.mkdirSync(s,{recursive:!0}),s},"");let m=d?.match(/[^\/]+$/)?.[0];if(!m)throw Error("No File Name Detected!");let E=m.split(".")[0],f=m.split(".")[1],v=e?`${u}${n?n+"/":"/"}${m}`:`@/media${n?n+"/":"/"}${m}`,$=e?`${l}${n?n+"/":"/"}${m}`:`@/media${n?n+"/":"/"}${m}`,h=S+n+"/"+m;p.copyFileSync(d,h),p.unlinkSync(d);let D=E+"_thumbnail."+f,P=d.replace(m,D),g=e?`${u}${n?n+"/":"/"}${D}`:`@/media${n?n+"/":"/"}${D}`,A=e?`${l}${n?n+"/":"/"}${D}`:`@/media${n?n+"/":"/"}${D}`;try{p.copyFileSync(P,S+n+"/"+D),p.unlinkSync(P)}catch(e){}await c()("UPDATE user_media SET private = ?, media_url= ?, media_thumbnail_url= ?, media_path = ?, media_thumbnail_path = ? WHERE id = ?",[e?0:1,v,g,$,A,t.id]),r.json({success:!0,msg:"Success!"})}catch(e){console.log(e.message),r.json({success:!1,msg:"Error!",error:e})}}let m=(0,a.M)(t,"default"),E=(0,a.M)(t,"config"),f=new i.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/media/addPrivateMedia",pathname:"/api/media/addPrivateMedia",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),i=s(72835),n=s(29021),a=s(31341);async function o(e,r,s,o){let{keyCookieName:c,csrfCookieName:u}=a();if(!e.cookies?.[c]?.match(/./))return null;let l=i({encryptedString:e.cookies[c]});if(!l)return null;let d=JSON.parse(l);if(!d.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!n.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),n&&(a+=`${n}_`),a+=s;let o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),n&&(c+=`${n}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:c+=i}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:i}=s(55511),{Buffer:n}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=s||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=i("aes-192-cbc",t(a,o,c),n.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),i=s(21580),n=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:i()}});async function a(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=r(r.s=10304);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2678,e.ids=[2678],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},38887:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>m,routeModule:()=>f});var i={};t.r(i),t.d(i,{default:()=>_});var s=t(89947),n=t(2706),a=t(96762),o=t(48786),c=t(69842),u=t(33873),l=t.n(u);let d=t(29021);async function _(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Failed!"});let t=await (0,c.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let i=e.body;if(i.media_url?.match(/\.\./)||i.folder?.match(/\.\./)||i.id?.toString()?.match(/\.\./))return r.json({success:!1,msg:"Error!",error:"Invalid url"});try{let e=i?.private==1,s=e?i?.media_path?.replace(/\@\/media/i,"")||i?.media_url.replace(/\@\/media/i,""):i?.media_path?.match(/\/user-images\/user-.*/)||i?.media_url?.match(/\/user-images\/user-.*/),n=i.folder?`/${i.folder}`:"",a=process.env.DSQL_STATIC_SERVER_DIR;if(!a)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let c=l().join(a,"images"),u=`${process.env.DSQL_STATIC_HOST}/images/user-images/user-${t.id}`,_=`/images/user-images/user-${t.id}`,m=(e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/media`:c)+s,p=e?`${c}/user-images/user-${t.id}`:`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/media`;if(!d.existsSync(p))try{d.mkdirSync(p,{recursive:!0})}catch(e){console.log("LINE 88 error:",e.message)}n&&n.split("/").reduce((e,r)=>{let t=e?.match(/./)?`${e}/${r}`:p;return d.existsSync(t)||d.mkdirSync(t,{recursive:!0}),t},"");let f=m?.match(/[^\/]+$/)?.[0];if(!f)throw Error("No File Name Detected!");let S=f.split(".")[0],E=f.split(".")[1],A=e?`${u}${n?n+"/":"/"}${f}`:`@/media${n?n+"/":"/"}${f}`,v=e?`${_}${n?n+"/":"/"}${f}`:`@/media${n?n+"/":"/"}${f}`,$=p+n+"/"+f;d.copyFileSync(m,$),d.unlinkSync(m);let h=S+"_thumbnail."+E,g=m.replace(f,h),P=e?`${u}${n?n+"/":"/"}${h}`:`@/media${n?n+"/":"/"}${h}`,y=e?`${_}${n?n+"/":"/"}${h}`:`@/media${n?n+"/":"/"}${h}`;try{d.copyFileSync(g,p+n+"/"+h),d.unlinkSync(g)}catch(e){}await (0,o.A)("UPDATE user_media SET private = ?, media_url= ?, media_thumbnail_url= ?, media_path = ?, media_thumbnail_path = ? WHERE id = ?",[e?0:1,A,P,v,y,i.id]),r.json({success:!0,msg:"Success!"})}catch(e){console.log(e.message),r.json({success:!1,msg:"Error!",error:e})}}let m=(0,a.M)(i,"default"),p=(0,a.M)(i,"config"),f=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/media/addPrivateMedia",pathname:"/api/media/addPrivateMedia",bundlePath:"",filename:""},userland:i})},69842:(e,r,t)=>{t.d(r,{A:()=>c});var i=t(48786),s=t(95969),n=t(29021),a=t.n(n),o=t(89159);async function c(e,r,t){let{keyCookieName:n,csrfCookieName:c}=(0,o.A)();if(!e.cookies?.[n]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[n]});if(!u)return null;let l=JSON.parse(u);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,i.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>i});function i(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",i=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),n&&(a+=`${n}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=i;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),n&&(c+=`${n}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:c+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>n});var i=t(55511),s=t(79428);function n({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,i.scryptSync)(n,a,o),u=s.Buffer.alloc(16,0),l=(0,i.createDecipheriv)("aes-192-cbc",c,u);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>i});async function i(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=38887);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js.nft.json b/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js.nft.json index 2fb36eb..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/media/addPrivateMedia.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js b/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js index d0c15ee..42ac432 100644 --- a/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js +++ b/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2127,e.ids=[2127],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},97243:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>_,routeModule:()=>d});var s={};t.r(s),t.d(s,{default:()=>l});var n=t(89947),o=t(2706),i=t(96762),a=t(6420),c=t.n(a);let u=t(29021);async function l(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Failed!"});let t=await c()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});try{let s=JSON.parse(e.body).path.replace(/ /g,"").replace(/\.\./g,"");if(s?.match(/\.\./))return r.json({success:!1,msg:"Error!",error:"Invalid url"});let n=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id.toString().replace(/\//g,"")}`,o=s.replace(/\@/,n);u.createReadStream(o).pipe(r)}catch(e){console.log("ERROR in getPrivateMedia api route:",e.message),r.json({success:!1,msg:"Error!",error:e})}}let _=(0,i.M)(s,"default"),p=(0,i.M)(s,"config"),d=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/media/getPrivateMedia",pathname:"/api/media/getPrivateMedia",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),i=t(31341);async function a(e,r,t,a){let{keyCookieName:c,csrfCookieName:u}=i();if(!e.cookies?.[c]?.match(/./))return null;let l=n({encryptedString:e.cookies[c]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:c+=n}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",s(i,a,c),o.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=97243);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2127,e.ids=[2127],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},63311:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>l});var s=t(89947),i=t(2706),o=t(96762),a=t(29021),u=t.n(a),c=t(69842);async function l(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Failed!"});let t=await (0,c.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});try{let n=JSON.parse(e.body).path.replace(/ /g,"").replace(/\.\./g,"");if(n?.match(/\.\./))return r.json({success:!1,msg:"Error!",error:"Invalid url"});let s=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id.toString().replace(/\//g,"")}`,i=n.replace(/\@/,s);u().createReadStream(i).pipe(r)}catch(e){console.log("ERROR in getPrivateMedia api route:",e.message),r.json({success:!1,msg:"Error!",error:e})}}let d=(0,o.M)(n,"default"),_=(0,o.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/media/getPrivateMedia",pathname:"/api/media/getPrivateMedia",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),a=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,a.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(i,o,a),c=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=63311);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js.nft.json b/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js.nft.json index 2fb36eb..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/media/getPrivateMedia.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/purgeDb.js b/dsql-app/.local_dist/server/pages/api/purgeDb.js index 9f23c7f..7f7d626 100644 --- a/dsql-app/.local_dist/server/pages/api/purgeDb.js +++ b/dsql-app/.local_dist/server/pages/api/purgeDb.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3338,e.ids=[3338],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},97447:(e,r,s)=>{s.r(r),s.d(r,{config:()=>v,default:()=>E,routeModule:()=>D});var t={};s.r(t),s.d(t,{default:()=>f});var n=s(89947),o=s(2706),i=s(96762),c=s(29021),a=s.n(c),l=s(51348),u=s.n(l),_=s(6420),d=s.n(_),p=s(33873),S=s.n(p);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await d()(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{paradigm:s,payload:t}=e.body;try{console.log("Deleting media =>",t.id);let e=t.media_url,s=process.env.DSQL_STATIC_SERVER_DIR,n=process.env.DSQL_STATIC_HOST;if(!s){console.log("No Static Root Path"),r.json({success:!1,msg:"No Static Root Path"});return}let o=e.replace(n,""),i=S().join(s,o),c=a().existsSync(i);if(console.log("relativePath",o),console.log("STATIC_ROOT",s),console.log("STATIC_HOST",n),console.log("filePath",i),console.log("fileExist",c),c){r.json({success:!1});return}}catch(e){console.log("File verification Error =>",e.message),console.log("File Truly doesn't exist, cotinuing ...")}"user_media"===s&&await u()(`DELETE FROM user_media WHERE id='${t.id}'`),r.json({success:!0})}let E=(0,i.M)(t,"default"),v=(0,i.M)(t,"config"),D=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/purgeDb",pathname:"/api/purgeDb",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),n=s(72835),o=s(29021),i=s(31341);async function c(e,r,s,c){let{keyCookieName:a,csrfCookieName:l}=i();if(!e.cookies?.[a]?.match(/./))return null;let u=n({encryptedString:e.cookies[a]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!o.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=t;let a=r;return e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),{keyCookieName:i,csrfCookieName:c,oneTimeCodeName:a+=n}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=s||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",t(i,c,a),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),o=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=97447);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3338,e.ids=[3338],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},670:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>E,routeModule:()=>S});var n={};t.r(n),t.d(n,{default:()=>f});var s=t(89947),o=t(2706),i=t(96762),a=t(29021),c=t.n(a),l=t(48786),u=t(69842),_=t(33873),d=t.n(_);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await (0,u.A)(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{paradigm:t,payload:n}=e.body;try{console.log("Deleting media =>",n.id);let e=n.media_url,t=process.env.DSQL_STATIC_SERVER_DIR,s=process.env.DSQL_STATIC_HOST;if(!t){console.log("No Static Root Path"),r.json({success:!1,msg:"No Static Root Path"});return}let o=e.replace(s,""),i=d().join(t,o),a=c().existsSync(i);if(console.log("relativePath",o),console.log("STATIC_ROOT",t),console.log("STATIC_HOST",s),console.log("filePath",i),console.log("fileExist",a),a){r.json({success:!1});return}}catch(e){console.log("File verification Error =>",e.message),console.log("File Truly doesn't exist, cotinuing ...")}"user_media"===t&&await (0,l.A)(`DELETE FROM user_media WHERE id='${n.id}'`),r.json({success:!0})}let E=(0,i.M)(n,"default"),p=(0,i.M)(n,"config"),S=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/purgeDb",pathname:"/api/purgeDb",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(48786),s=t(95969),o=t(29021),i=t.n(o),a=t(89159);async function c(e,r,t){let{keyCookieName:o,csrfCookieName:c}=(0,a.A)();if(!e.cookies?.[o]?.match(/./))return null;let l=(0,s.A)({encryptedString:e.cookies[o]});if(!l)return null;let u=JSON.parse(l);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${_}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=n;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:i,csrfCookieName:a,oneTimeCodeName:c+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511),s=t(79428);function o({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,n.scryptSync)(o,i,a),l=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",c,l);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=670);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/purgeDb.js.nft.json b/dsql-app/.local_dist/server/pages/api/purgeDb.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/purgeDb.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/purgeDb.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js index 0a8cb01..25f247d 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=2562,e.ids=[2562],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},82453:(e,r,t)=>{t.r(r),t.d(r,{config:()=>$,default:()=>R,routeModule:()=>x});var i={};t.r(i),t.d(i,{config:()=>E,default:()=>v});var s=t(89947),a=t(2706),n=t(96762),l=t(33873),o=t.n(l),u=t(47670),d=t.n(u),c=t(64122),m=t.n(c),p=t(48227),g=t.n(p),f=t(48225),_=t.n(f),S=t(77619),y=t.n(S);let h=t(29021),E={api:{bodyParser:{sizeLimit:"50mb"}}};async function v(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let i=y()({key:t,user_id:String(e.query.user_id)});if(!i?.user_id)throw Error("Api Credentials invalid!");let{user_id:s,full_access:a}=i;if(!a)return r.json({success:!1,msg:"Unauthorized"});let{fileData:n,fileName:l,mimeType:u,folder:c,isPrivate:p}=e.body,f=process.env.DSQL_STATIC_SERVER_DIR;if(!f)throw console.log("Static File ENV not Found!"),Error("No Static Path!");if(c){let e=o().join(f,`images/user-images/user-${s}/${c?.toString().replace(/\.\./g,"")}`);h.existsSync(e)||h.mkdirSync(e,{recursive:!0})}let _=g()({folder:c,isPrivate:p,userId:i.user_id});if(!_)throw Error("Couldn't Grab Image URLs");let{fileRootPath:S,urlRootPath:E}=_,v=u?.match(/csv/i)?".csv":u?.match(/pdf/i)?".pdf":u?.match(/xlsx/)?".xlsx":u?.match(/json/i)?".json":".txt",R=E+l+v;h.writeFileSync(S+l+v,n,"base64"),await m()({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"media_url",identifierValue:R}),await d()({dbFullName:"datasquirel",tableName:"user_media",data:{user_id:s,media_name:l,media_url:R,media_thumbnail_url:R,folder:c||"",media_type:"file",private:p?"1":null}}),r.json({success:!0,payload:{urlPath:R}})}catch(t){console.log("File write error:",t),_()({component:"/api/query/add-file/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Add File Error!",error:t.message})}}let R=(0,n.M)(i,"default"),$=(0,n.M)(i,"config"),x=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/query/[user_id]/add-file",pathname:"/api/query/[user_id]/add-file",bundlePath:"",filename:""},userland:i})},48227:(e,r,t)=>{let i=t(29021),s=t(33873);e.exports=function({isPrivate:e,userId:r,folder:t,video:a,pathOnly:n}){"production".match(/production/);let l=process.env.DSQL_STATIC_SERVER_DIR;if(!l)return console.log("Static File ENV not Found!"),null;let o=e?`@/${a?"videos":"media"}/${t?t+"/":""}`:a?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:s.join(l,o);return i.existsSync(u)||n||i.mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${o}`,relativePath:o}}},77619:(e,r,t)=>{let i=t(29021),s=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:n})=>{if(!e||!a)return null;try{let l=process.env.DSQL_API_KEYS_PATH;if(!l)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let o=s({encryptedString:e}),u=JSON.parse(o||""),d=i.existsSync(`${l}/${u.sign}`);if(String(u.user_id)!==String(a)||!d)return null;if(!u.target_database||n)return u;if(!r&&u.target_database)return null;let c=u.target_database?.split(",").includes(String(r));if(c&&!u.target_table)return u;if(c&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},64122:(e,r,t)=>{let i=t(51348),s=t(21339),a=t(44900);async function n({dbContext:e,paradigm:r,dbFullName:t,tableName:n,identifierColumnName:l,identifierValue:o,useLocal:u}){try{let d=!!u||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),c=u?a:d?i:s,m=`DELETE FROM ${n} WHERE \`${l}\`=?`;return d?await c(m,[o]):await c({paradigm:r,queryString:m,database:t,queryValues:[o]})}catch(e){return null}}e.exports=n},48225:(e,r,t)=>{let i=t(29021),{IncomingMessage:s}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:s,req:a}){let n=new Date,l=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],r=a.headers["x-real-ip"],t=a.headers["cf-connecting-ip"],i=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||i||r||a.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2562,e.ids=[2562],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},79134:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>S,routeModule:()=>E});var i={};t.r(i),t.d(i,{config:()=>g,default:()=>_});var a=t(89947),s=t(2706),n=t(96762),l=t(33873),o=t.n(l),u=t(98e3),d=t(61932),c=t(45185),m=t(67619),p=t(56081);let f=t(29021),g={api:{bodyParser:{sizeLimit:"50mb"}}};async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let i=(0,p.A)({key:t,user_id:String(e.query.user_id)});if(!i?.user_id)throw Error("Api Credentials invalid!");let{user_id:a,full_access:s}=i;if(!s)return r.json({success:!1,msg:"Unauthorized"});let{fileData:n,fileName:l,mimeType:m,folder:g,isPrivate:_}=e.body,S=process.env.DSQL_STATIC_SERVER_DIR;if(!S)throw console.log("Static File ENV not Found!"),Error("No Static Path!");if(g){let e=o().join(S,`images/user-images/user-${a}/${g?.toString().replace(/\.\./g,"")}`);f.existsSync(e)||f.mkdirSync(e,{recursive:!0})}let y=(0,c.A)({folder:g,isPrivate:_,userId:i.user_id});if(!y)throw Error("Couldn't Grab Image URLs");let{fileRootPath:E,urlRootPath:h}=y,v=m?.match(/csv/i)?".csv":m?.match(/pdf/i)?".pdf":m?.match(/xlsx/)?".xlsx":m?.match(/json/i)?".json":".txt",$=h+l+v;f.writeFileSync(E+l+v,n,"base64"),await (0,d.A)({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"media_url",identifierValue:$}),await (0,u.A)({dbFullName:"datasquirel",tableName:"user_media",data:{user_id:a,media_name:l,media_url:$,media_thumbnail_url:$,folder:g||"",media_type:"file",private:_?"1":null}}),r.json({success:!0,payload:{urlPath:$}})}catch(t){console.log("File write error:",t),(0,m.default)({component:"/api/query/add-file/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Add File Error!",error:t.message})}}let S=(0,n.M)(i,"default"),y=(0,n.M)(i,"config"),E=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/query/[user_id]/add-file",pathname:"/api/query/[user_id]/add-file",bundlePath:"",filename:""},userland:i})},45185:(e,r,t)=>{t.d(r,{A:()=>l});var i=t(29021),a=t.n(i),s=t(33873),n=t.n(s);function l({isPrivate:e,userId:r,folder:t,video:i,pathOnly:s}){"production".match(/production/);let l=process.env.DSQL_STATIC_SERVER_DIR;if(!l)return console.log("Static File ENV not Found!"),null;let o=e?`@/${i?"videos":"media"}/${t?t+"/":""}`:i?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:n().join(l,o);return a().existsSync(u)||s||a().mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${o}`,relativePath:o}}},56081:(e,r,t)=>{t.d(r,{A:()=>n});var i=t(29021),a=t.n(i),s=t(95969);let n=({key:e,database:r,table:t,user_id:i,media:n})=>{if(!e||!i)return null;try{let l=process.env.DSQL_API_KEYS_PATH;if(!l)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let o=(0,s.A)({encryptedString:e}),u=JSON.parse(o||""),d=a().existsSync(`${l}/${u.sign}`);if(String(u.user_id)!==String(i)||!d)return null;if(!u.target_database||n)return u;if(!r&&u.target_database)return null;let c=u.target_database?.split(",").includes(String(r));if(c&&!u.target_table)return u;if(c&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},61932:(e,r,t)=>{t.d(r,{A:()=>n});var i=t(48786),a=t(37275),s=t(7971);async function n({dbContext:e,paradigm:r,dbFullName:t,tableName:n,identifierColumnName:l,identifierValue:o,useLocal:u}){try{let d=!!u||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),c=u?s.A:d?i.A:a.default,m=`DELETE FROM \`${t}\`.\`${n}\` WHERE \`${l}\`=?`;return d?await c(m,[o]):await c({paradigm:r,queryString:m,queryValues:[o]})}catch(e){return null}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var i=t(29021),a=t.n(i);async function s({user:e,message:r,component:t,noMail:i,req:s}){let n=new Date,l=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],i=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||i||r||s.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(s+=` -URL: ${a.url}`),a?.body&&(s+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(s+=` -IP: ${l}`),s+=` +User Email: ${e?.email}`),s?.url&&(i+=` +URL: ${s.url}`),s?.body&&(i+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),l&&(i+=` +IP: ${l}`),i+=` Date: ${n.toDateString()} -========================================`,i.existsSync("./.tmp/error.log")||i.writeFileSync("./.tmp/error.log","","utf-8");let o=i.readFileSync("./.tmp/error.log","utf-8");i.writeFileSync("./.tmp/error.log",s),i.appendFileSync("./.tmp/error.log",` +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let o=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",i),a().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:i,createDecipheriv:s}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=s("aes-192-cbc",i(n,l,o),a.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),i=r.X(0,[4050],()=>t(82453));module.exports=i})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var i=t(55511),a=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,i.scryptSync)(s,n,l),u=a.Buffer.alloc(16,0),d=(0,i.createDecipheriv)("aes-192-cbc",o,u);try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),i=r.X(0,[1251],()=>t(79134));module.exports=i})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js.nft.json index 211caea..2b74389 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-file.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js index f4f2035..132556e 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=5319,e.ids=[5319],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},9288:e=>{e.exports=require("sharp")},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")},19582:(e,r,t)=>{t.r(r),t.d(r,{config:()=>R,default:()=>$,routeModule:()=>b});var a={};t.r(a),t.d(a,{config:()=>E,default:()=>v});var i=t(89947),s=t(2706),n=t(96762),o=t(33873),l=t.n(o),u=t(47670),d=t.n(u),c=t(64122),m=t.n(c),p=t(10701),g=t.n(p),f=t(48225),h=t.n(f),S=t(77619),_=t.n(S);let y=t(29021),E={api:{bodyParser:{sizeLimit:"50mb"}}};async function v(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)throw Error("No Authorization Found!");let a=_()({key:t,user_id:String(e.query.user_id),media:!0});if(!a?.user_id)throw Error(a?.error||"Api Credentials invalid!");let{user_id:i,full_access:s}=a;if(!s)return r.json({success:!1,msg:"Unauthorized"});let{imageData:n,imageName:o,mimeType:u,thumbnailSize:c,folder:p,isPrivate:f}=e.body,h=process.env.DSQL_STATIC_SERVER_DIR;if(!h)throw console.log("Static File ENV not Found!"),Error("No Static Path!");if(p){let e=l().join(h,`images/user-images/user-${i}/${p}`);y.existsSync(e)||y.mkdirSync(e,{recursive:!0})}let S=u?.match(/jpeg/i)?"jpeg":u?.match(/png/i)?"png":u?.match(/webp/i)?"webp":u?.match(/svg/i)?"svg":"jpg",E=await g()({imageName:o.replace(/ /g,"-").replace(/\.{1,}|\//g,""),imageSourceBase64:n,userId:i,mimeType:S,thumbnailSize:c,folder:p,isPrivate:f});if(!E)throw Error("Write Image Failed in add-media API route");let{urlPath:v,urlThumbnailPath:$}=E;await m()({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"media_url",identifierValue:v}),await d()({dbFullName:"datasquirel",tableName:"user_media",data:{user_id:i,media_name:o,media_url:v,media_thumbnail_url:$,folder:p||""}}),r.json({success:!0,payload:{urlPath:v,urlThumbnailPath:$}})}catch(t){h()({component:"/api/query/add-image/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Add Image Error!",error:t.message})}}let $=(0,n.M)(a,"default"),R=(0,n.M)(a,"config"),b=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/query/[user_id]/add-image",pathname:"/api/query/[user_id]/add-image",bundlePath:"",filename:""},userland:a})},10701:(e,r,t)=>{let a=t(9288),i=t(48225),s=t(48227);e.exports=async function({imageSourceBase64:e,imageName:r,userId:t,mimeType:n,thumbnailSize:o,folder:l,isPrivate:u}){try{let i=Buffer.from(e,"base64"),d=o?parseInt(o.toString()):400,c=a(i),m=a(i),p=s({isPrivate:u,userId:t,folder:l});if(!p)return null;let{fileRootPath:g,urlRootPath:f,relativePath:h}=p,{width:S,height:_,format:y}=await c.metadata(),E=n||y;S&&_&&S>1800&&c.resize(1800,Math.round(1800/S*_),{fit:"cover"}),c.toFormat(E,{quality:80}),await c.metadata();let v=`${r}.${E}`;if(await c.toFile(g+v),S&&_&&S>d){let e=d/S;m.resize(d,Math.round(_*e),{fit:"cover"})}else S&&_&&m.resize(150,Math.round(150/S*_),{fit:"cover"});m.toFormat(E,{quality:80});let $=`${r}_thumbnail.${E}`;return await m.toFile(g+$),{urlPath:f+v,urlThumbnailPath:f+$,urlRelativePath:h+v,urlThumbnailRelativePath:h+$}}catch(e){return console.log("Write Image to Disk error =>",e.message),i({component:"functions/backend/fsWriteImageToDiskFromBase64",message:e.message}),null}}},48227:(e,r,t)=>{let a=t(29021),i=t(33873);e.exports=function({isPrivate:e,userId:r,folder:t,video:s,pathOnly:n}){"production".match(/production/);let o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)return console.log("Static File ENV not Found!"),null;let l=e?`@/${s?"videos":"media"}/${t?t+"/":""}`:s?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:i.join(o,l);return a.existsSync(u)||n||a.mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${l}`,relativePath:l}}},77619:(e,r,t)=>{let a=t(29021),i=t(72835);e.exports=({key:e,database:r,table:t,user_id:s,media:n})=>{if(!e||!s)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=i({encryptedString:e}),u=JSON.parse(l||""),d=a.existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(s)||!d)return null;if(!u.target_database||n)return u;if(!r&&u.target_database)return null;let c=u.target_database?.split(",").includes(String(r));if(c&&!u.target_table)return u;if(c&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},64122:(e,r,t)=>{let a=t(51348),i=t(21339),s=t(44900);async function n({dbContext:e,paradigm:r,dbFullName:t,tableName:n,identifierColumnName:o,identifierValue:l,useLocal:u}){try{let d=!!u||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),c=u?s:d?a:i,m=`DELETE FROM ${n} WHERE \`${o}\`=?`;return d?await c(m,[l]):await c({paradigm:r,queryString:m,database:t,queryValues:[l]})}catch(e){return null}}e.exports=n},48225:(e,r,t)=>{let a=t(29021),{IncomingMessage:i}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:i,req:s}){let n=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||a||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let i=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=5319,e.ids=[5319],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},9288:e=>{e.exports=require("sharp")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},72944:(e,r,t)=>{t.r(r),t.d(r,{config:()=>h,default:()=>_,routeModule:()=>y});var a={};t.r(a),t.d(a,{config:()=>f,default:()=>S});var i=t(89947),s=t(2706),n=t(96762),o=t(33873),l=t.n(o),u=t(98e3),d=t(61932),c=t(96551),m=t(67619),g=t(56081);let p=t(29021),f={api:{bodyParser:{sizeLimit:"50mb"}}};async function S(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)throw Error("No Authorization Found!");let a=(0,g.A)({key:t,user_id:String(e.query.user_id),media:!0});if(!a?.user_id)throw Error(a?.error||"Api Credentials invalid!");let{user_id:i,full_access:s}=a;if(!s)return r.json({success:!1,msg:"Unauthorized"});let{imageData:n,imageName:o,mimeType:m,thumbnailSize:f,folder:S,isPrivate:_}=e.body,h=process.env.DSQL_STATIC_SERVER_DIR;if(!h)throw console.log("Static File ENV not Found!"),Error("No Static Path!");if(S){let e=l().join(h,`images/user-images/user-${i}/${S}`);p.existsSync(e)||p.mkdirSync(e,{recursive:!0})}let y=m?.match(/jpeg/i)?"jpeg":m?.match(/png/i)?"png":m?.match(/webp/i)?"webp":m?.match(/svg/i)?"svg":"jpg",v=await (0,c.A)({imageName:o.replace(/ /g,"-").replace(/\.{1,}|\//g,""),imageSourceBase64:n,userId:i,mimeType:y,thumbnailSize:f,folder:S,isPrivate:_});if(!v)throw Error("Write Image Failed in add-media API route");let{urlPath:E,urlThumbnailPath:$}=v;await (0,d.A)({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"media_url",identifierValue:E}),await (0,u.A)({dbFullName:"datasquirel",tableName:"user_media",data:{user_id:i,media_name:o,media_url:E,media_thumbnail_url:$,folder:S||""}}),r.json({success:!0,payload:{urlPath:E,urlThumbnailPath:$}})}catch(t){(0,m.default)({component:"/api/query/add-image/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Add Image Error!",error:t.message})}}let _=(0,n.M)(a,"default"),h=(0,n.M)(a,"config"),y=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/query/[user_id]/add-image",pathname:"/api/query/[user_id]/add-image",bundlePath:"",filename:""},userland:a})},96551:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(9288),i=t.n(a),s=t(67619),n=t(45185);async function o({imageSourceBase64:e,imageName:r,userId:t,mimeType:a,thumbnailSize:o,folder:l,isPrivate:u}){try{let s=Buffer.from(e,"base64"),d=o?parseInt(o.toString()):400,c=i()(s),m=i()(s),g=(0,n.A)({isPrivate:u,userId:t,folder:l});if(!g)return null;let{fileRootPath:p,urlRootPath:f,relativePath:S}=g,{width:_,height:h,format:y}=await c.metadata(),v=a||y;_&&h&&_>1800&&c.resize(1800,Math.round(1800/_*h),{fit:"cover"}),c.toFormat(v,{quality:80}),await c.metadata();let E=`${r}.${v}`;if(await c.toFile(p+E),_&&h&&_>d){let e=d/_;m.resize(d,Math.round(h*e),{fit:"cover"})}else _&&h&&m.resize(150,Math.round(150/_*h),{fit:"cover"});m.toFormat(v,{quality:80});let $=`${r}_thumbnail.${v}`;return await m.toFile(p+$),{urlPath:f+E,urlThumbnailPath:f+$,urlRelativePath:S+E,urlThumbnailRelativePath:S+$}}catch(e){return console.log("Write Image to Disk error =>",e.message),(0,s.default)({component:"functions/backend/fsWriteImageToDiskFromBase64",message:e.message}),null}}},45185:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(29021),i=t.n(a),s=t(33873),n=t.n(s);function o({isPrivate:e,userId:r,folder:t,video:a,pathOnly:s}){"production".match(/production/);let o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)return console.log("Static File ENV not Found!"),null;let l=e?`@/${a?"videos":"media"}/${t?t+"/":""}`:a?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:n().join(o,l);return i().existsSync(u)||s||i().mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${l}`,relativePath:l}}},56081:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(29021),i=t.n(a),s=t(95969);let n=({key:e,database:r,table:t,user_id:a,media:n})=>{if(!e||!a)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,s.A)({encryptedString:e}),u=JSON.parse(l||""),d=i().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(a)||!d)return null;if(!u.target_database||n)return u;if(!r&&u.target_database)return null;let c=u.target_database?.split(",").includes(String(r));if(c&&!u.target_table)return u;if(c&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},61932:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(48786),i=t(37275),s=t(7971);async function n({dbContext:e,paradigm:r,dbFullName:t,tableName:n,identifierColumnName:o,identifierValue:l,useLocal:u}){try{let d=!!u||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),c=u?s.A:d?a.A:i.default,m=`DELETE FROM \`${t}\`.\`${n}\` WHERE \`${o}\`=?`;return d?await c(m,[l]):await c({paradigm:r,queryString:m,queryValues:[l]})}catch(e){return null}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var a=t(29021),i=t.n(a);async function s({user:e,message:r,component:t,noMail:a,req:s}){let n=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||a||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(i+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),s?.url&&(i+=` -URL: ${s.url}`),s?.body&&(i+=` -Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(i+=` -IP: ${o}`),i+=` +User Email: ${e?.email}`),s?.url&&(a+=` +URL: ${s.url}`),s?.body&&(a+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(a+=` +IP: ${o}`),a+=` Date: ${n.toDateString()} -========================================`,a.existsSync("./.tmp/error.log")||a.writeFileSync("./.tmp/error.log","","utf-8");let l=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",i),a.appendFileSync("./.tmp/error.log",` +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let l=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",a),i().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:a,createDecipheriv:i}=t(55511),{Buffer:s}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=i("aes-192-cbc",a(n,o,l),s.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[4050],()=>t(19582));module.exports=a})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(55511),i=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,a.scryptSync)(s,n,o),u=i.Buffer.alloc(16,0),d=(0,a.createDecipheriv)("aes-192-cbc",l,u);try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[1251],()=>t(72944));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js.nft.json index 021eb9e..9b20fe5 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/add-image.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../../../../../../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../../../../../../node_modules/@img/sharp-libvips-linux-x64/package.json","../../../../../../node_modules/@img/sharp-libvips-linux-x64/versions.json","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../../../../../../node_modules/@img/sharp-linux-x64/LICENSE","../../../../../../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../../../../../../node_modules/@img/sharp-linux-x64/package.json","../../../../../../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../../../../../../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../../../../../../node_modules/@img/sharp-linuxmusl-x64/package.json","../../../../../../node_modules/color-convert/conversions.js","../../../../../../node_modules/color-convert/index.js","../../../../../../node_modules/color-convert/package.json","../../../../../../node_modules/color-convert/route.js","../../../../../../node_modules/color-name/index.js","../../../../../../node_modules/color-name/package.json","../../../../../../node_modules/color-string/index.js","../../../../../../node_modules/color-string/package.json","../../../../../../node_modules/color/index.js","../../../../../../node_modules/color/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/detect-libc/lib/detect-libc.js","../../../../../../node_modules/detect-libc/lib/filesystem.js","../../../../../../node_modules/detect-libc/lib/process.js","../../../../../../node_modules/detect-libc/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sharp/lib/channel.js","../../../../../../node_modules/sharp/lib/colour.js","../../../../../../node_modules/sharp/lib/composite.js","../../../../../../node_modules/sharp/lib/constructor.js","../../../../../../node_modules/sharp/lib/index.js","../../../../../../node_modules/sharp/lib/input.js","../../../../../../node_modules/sharp/lib/is.js","../../../../../../node_modules/sharp/lib/libvips.js","../../../../../../node_modules/sharp/lib/operation.js","../../../../../../node_modules/sharp/lib/output.js","../../../../../../node_modules/sharp/lib/resize.js","../../../../../../node_modules/sharp/lib/sharp.js","../../../../../../node_modules/sharp/lib/utility.js","../../../../../../node_modules/sharp/node_modules/semver/classes/comparator.js","../../../../../../node_modules/sharp/node_modules/semver/classes/range.js","../../../../../../node_modules/sharp/node_modules/semver/classes/semver.js","../../../../../../node_modules/sharp/node_modules/semver/functions/cmp.js","../../../../../../node_modules/sharp/node_modules/semver/functions/coerce.js","../../../../../../node_modules/sharp/node_modules/semver/functions/compare.js","../../../../../../node_modules/sharp/node_modules/semver/functions/eq.js","../../../../../../node_modules/sharp/node_modules/semver/functions/gt.js","../../../../../../node_modules/sharp/node_modules/semver/functions/gte.js","../../../../../../node_modules/sharp/node_modules/semver/functions/lt.js","../../../../../../node_modules/sharp/node_modules/semver/functions/lte.js","../../../../../../node_modules/sharp/node_modules/semver/functions/neq.js","../../../../../../node_modules/sharp/node_modules/semver/functions/parse.js","../../../../../../node_modules/sharp/node_modules/semver/functions/satisfies.js","../../../../../../node_modules/sharp/node_modules/semver/internal/constants.js","../../../../../../node_modules/sharp/node_modules/semver/internal/debug.js","../../../../../../node_modules/sharp/node_modules/semver/internal/identifiers.js","../../../../../../node_modules/sharp/node_modules/semver/internal/lrucache.js","../../../../../../node_modules/sharp/node_modules/semver/internal/parse-options.js","../../../../../../node_modules/sharp/node_modules/semver/internal/re.js","../../../../../../node_modules/sharp/node_modules/semver/package.json","../../../../../../node_modules/sharp/package.json","../../../../../../node_modules/simple-swizzle/index.js","../../../../../../node_modules/simple-swizzle/node_modules/is-arrayish/index.js","../../../../../../node_modules/simple-swizzle/node_modules/is-arrayish/package.json","../../../../../../node_modules/simple-swizzle/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../../../../../../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../../../../../../node_modules/@img/sharp-libvips-linux-x64/package.json","../../../../../../node_modules/@img/sharp-libvips-linux-x64/versions.json","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../../../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../../../../../../node_modules/@img/sharp-linux-x64/LICENSE","../../../../../../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../../../../../../node_modules/@img/sharp-linux-x64/package.json","../../../../../../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../../../../../../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../../../../../../node_modules/@img/sharp-linuxmusl-x64/package.json","../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/color-convert/conversions.js","../../../../../../node_modules/color-convert/index.js","../../../../../../node_modules/color-convert/package.json","../../../../../../node_modules/color-convert/route.js","../../../../../../node_modules/color-name/index.js","../../../../../../node_modules/color-name/package.json","../../../../../../node_modules/color-string/index.js","../../../../../../node_modules/color-string/package.json","../../../../../../node_modules/color/index.js","../../../../../../node_modules/color/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-arrayish/index.js","../../../../../../node_modules/is-arrayish/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/semver/classes/comparator.js","../../../../../../node_modules/semver/classes/range.js","../../../../../../node_modules/semver/classes/semver.js","../../../../../../node_modules/semver/functions/cmp.js","../../../../../../node_modules/semver/functions/coerce.js","../../../../../../node_modules/semver/functions/compare.js","../../../../../../node_modules/semver/functions/eq.js","../../../../../../node_modules/semver/functions/gt.js","../../../../../../node_modules/semver/functions/gte.js","../../../../../../node_modules/semver/functions/lt.js","../../../../../../node_modules/semver/functions/lte.js","../../../../../../node_modules/semver/functions/neq.js","../../../../../../node_modules/semver/functions/parse.js","../../../../../../node_modules/semver/functions/satisfies.js","../../../../../../node_modules/semver/internal/constants.js","../../../../../../node_modules/semver/internal/debug.js","../../../../../../node_modules/semver/internal/identifiers.js","../../../../../../node_modules/semver/internal/lrucache.js","../../../../../../node_modules/semver/internal/parse-options.js","../../../../../../node_modules/semver/internal/re.js","../../../../../../node_modules/semver/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sharp/lib/channel.js","../../../../../../node_modules/sharp/lib/colour.js","../../../../../../node_modules/sharp/lib/composite.js","../../../../../../node_modules/sharp/lib/constructor.js","../../../../../../node_modules/sharp/lib/index.js","../../../../../../node_modules/sharp/lib/input.js","../../../../../../node_modules/sharp/lib/is.js","../../../../../../node_modules/sharp/lib/libvips.js","../../../../../../node_modules/sharp/lib/operation.js","../../../../../../node_modules/sharp/lib/output.js","../../../../../../node_modules/sharp/lib/resize.js","../../../../../../node_modules/sharp/lib/sharp.js","../../../../../../node_modules/sharp/lib/utility.js","../../../../../../node_modules/sharp/package.json","../../../../../../node_modules/simple-swizzle/index.js","../../../../../../node_modules/simple-swizzle/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js index a4e2bf2..9e4c7df 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=7918,e.ids=[7918],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},50145:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>D,routeModule:()=>y});var s={};t.r(s),t.d(s,{config:()=>f,default:()=>m});var n=t(89947),o=t(2706),a=t(96762),i=t(51348),c=t.n(i),l=t(64122),u=t.n(l),p=t(48225),d=t.n(p),S=t(77619),_=t.n(S);let g=t(29021),f={api:{bodyParser:{sizeLimit:"50mb"}}};async function m(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=_()({key:t,user_id:String(e.query.user_id)});if(!s?.user_id)throw Error("Api Credentials invalid!");let{user_id:n,full_access:o}=s;if(!o)return r.json({success:!1,msg:"Unauthorized"});let{url:a}=e.body,i=await c()("SELECT * FROM user_media WHERE media_url = ?",[a]);if(!i?.length)return r.json({success:!1,msg:"Media not found!"});let{id:l,folder:p,media_url:d,media_thumbnail_url:S,media_type:f}=i[0],m=process.env.DSQL_STATIC_SERVER_DIR;if(!m)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let D=e=>!e||e?.match(/\.\./)?"":e?.match(/^\@/)?e.replace(/@\/media\//,`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${n}/media/`):e.replace(process.env.DSQL_STATIC_HOST||"",m),E=D(d),y=D(S);if(!E?.match(/./))return r.json({success:!1,msg:"Invalid path!"});try{g.unlinkSync(E),g.unlinkSync(y),await u()({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"id",identifierValue:l}),r.json({success:!0,payload:{url:a}})}catch(e){console.log("File delete error:",e.message),r.json({success:!1,payload:{url:a},error:e.message})}}catch(t){console.log("File write error:",t),d()({component:"/api/query/delete-file/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Delete File Error!",error:t.message})}}let D=(0,a.M)(s,"default"),E=(0,a.M)(s,"config"),y=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/query/[user_id]/delete-file",pathname:"/api/query/[user_id]/delete-file",bundlePath:"",filename:""},userland:s})},77619:(e,r,t)=>{let s=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:o,media:a})=>{if(!e||!o)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let c=n({encryptedString:e}),l=JSON.parse(c||""),u=s.existsSync(`${i}/${l.sign}`);if(String(l.user_id)!==String(o)||!u)return null;if(!l.target_database||a)return l;if(!r&&l.target_database)return null;let p=l.target_database?.split(",").includes(String(r));if(p&&!l.target_table)return l;if(p&&!t&&l.target_table)return null;if(l.target_table?.split(",").includes(String(t)))return l;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},64122:(e,r,t)=>{let s=t(51348),n=t(21339),o=t(44900);async function a({dbContext:e,paradigm:r,dbFullName:t,tableName:a,identifierColumnName:i,identifierValue:c,useLocal:l}){try{let u=!!l||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),p=l?o:u?s:n,d=`DELETE FROM ${a} WHERE \`${i}\`=?`;return u?await p(d,[c]):await p({paradigm:r,queryString:d,database:t,queryValues:[c]})}catch(e){return null}}e.exports=a},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:o}){let a=new Date,i=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=7918,e.ids=[7918],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},83701:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>p,routeModule:()=>_});var n={};t.r(n),t.d(n,{config:()=>f,default:()=>g});var s=t(89947),a=t(2706),o=t(96762),i=t(48786),l=t(61932),c=t(67619),u=t(56081);let d=t(29021),f={api:{bodyParser:{sizeLimit:"50mb"}}};async function g(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=(0,u.A)({key:t,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");let{user_id:s,full_access:a}=n;if(!a)return r.json({success:!1,msg:"Unauthorized"});let{url:o}=e.body,c=await (0,i.A)("SELECT * FROM user_media WHERE media_url = ?",[o]);if(!c?.length)return r.json({success:!1,msg:"Media not found!"});let{id:f,folder:g,media_url:p,media_thumbnail_url:S,media_type:_}=c[0],m=process.env.DSQL_STATIC_SERVER_DIR;if(!m)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let y=e=>!e||e?.match(/\.\./)?"":e?.match(/^\@/)?e.replace(/@\/media\//,`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s}/media/`):e.replace(process.env.DSQL_STATIC_HOST||"",m),E=y(p),A=y(S);if(!E?.match(/./))return r.json({success:!1,msg:"Invalid path!"});try{d.unlinkSync(E),d.unlinkSync(A),await (0,l.A)({dbFullName:"datasquirel",tableName:"user_media",identifierColumnName:"id",identifierValue:f}),r.json({success:!0,payload:{url:o}})}catch(e){console.log("File delete error:",e.message),r.json({success:!1,payload:{url:o},error:e.message})}}catch(t){console.log("File write error:",t),(0,c.default)({component:"/api/query/delete-file/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Delete File Error!",error:t.message})}}let p=(0,o.M)(n,"default"),S=(0,o.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/query/[user_id]/delete-file",pathname:"/api/query/[user_id]/delete-file",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(29021),s=t.n(n),a=t(95969);let o=({key:e,database:r,table:t,user_id:n,media:o})=>{if(!e||!n)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,a.A)({encryptedString:e}),c=JSON.parse(l||""),u=s().existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(n)||!u)return null;if(!c.target_database||o)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},61932:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(48786),s=t(37275),a=t(7971);async function o({dbContext:e,paradigm:r,dbFullName:t,tableName:o,identifierColumnName:i,identifierValue:l,useLocal:c}){try{let u=!!c||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=c?a.A:u?n.A:s.default,f=`DELETE FROM \`${t}\`.\`${o}\` WHERE \`${i}\`=?`;return u?await d(f,[l]):await d({paradigm:r,queryString:f,queryValues:[l]})}catch(e){return null}}},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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(n+=` -URL: ${o.url}`),o?.body&&(n+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),i&&(n+=` +User Email: ${e?.email}`),a?.url&&(n+=` +URL: ${a.url}`),a?.body&&(n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` IP: ${i}`),n+=` -Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Date: ${o.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(a,i,c),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),o=t(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((c,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function p(e){a.end(),c(JSON.parse(JSON.stringify(e)))}function d(e){a.end(),c({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),i&&Array.isArray(i)&&i[0]?a.query(t,i).then(p).catch(d):a.query(t).then(p).catch(d)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function o(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=50145);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(a,o,i),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function i(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=83701);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js.nft.json index 1da0f9a..6402c47 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/delete-file.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js index 70052f5..af7f9c3 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=5287,e.ids=[5287],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},48069:(e,r,t)=>{t.r(r),t.d(r,{config:()=>P,default:()=>E,routeModule:()=>y});var i={};t.r(i),t.d(i,{config:()=>S,default:()=>_});var n=t(89947),s=t(2706),o=t(96762),a=t(33873),l=t.n(a),u=t(48227),c=t.n(u),d=t(48225),p=t.n(d),f=t(77619),g=t.n(f);let m=t(29021),S={api:{bodyParser:{sizeLimit:"100mb"}}};async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let i=g()({key:t,user_id:String(e.query.user_id)});if(!i?.user_id)throw Error("Api Credentials invalid!");let{user_id:n,full_access:s}=i;if(!s)return r.json({success:!1,msg:"Unauthorized"});let{folder:o,fileName:a,downloadType:u}=e.body,d=c()({folder:o,isPrivate:!0,userId:i.user_id});if(!d)throw Error("Couldn't Grab Image URLs");let{fileRootPath:p}=d,f=l().join(p,a);if(u?.match(/raw/i)){let e=m.readFileSync(f,"utf-8");return r.json({success:!0,data:e})}if(u?.match(/base64/i)){let e=m.readFileSync(f,"base64");return r.json({success:!0,data:e})}m.createReadStream(f).pipe(r)}catch(t){console.log("Get Private File Error:",t),p()({component:"/api/query/get-private-file/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Get Private File Error!",error:t.message})}}let E=(0,o.M)(i,"default"),P=(0,o.M)(i,"config"),y=new n.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/query/[user_id]/get-private-file",pathname:"/api/query/[user_id]/get-private-file",bundlePath:"",filename:""},userland:i})},48227:(e,r,t)=>{let i=t(29021),n=t(33873);e.exports=function({isPrivate:e,userId:r,folder:t,video:s,pathOnly:o}){"production".match(/production/);let a=process.env.DSQL_STATIC_SERVER_DIR;if(!a)return console.log("Static File ENV not Found!"),null;let l=e?`@/${s?"videos":"media"}/${t?t+"/":""}`:s?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:n.join(a,l);return i.existsSync(u)||o||i.mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${l}`,relativePath:l}}},77619:(e,r,t)=>{let i=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:s,media:o})=>{if(!e||!s)return null;try{let a=process.env.DSQL_API_KEYS_PATH;if(!a)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=n({encryptedString:e}),u=JSON.parse(l||""),c=i.existsSync(`${a}/${u.sign}`);if(String(u.user_id)!==String(s)||!c)return null;if(!u.target_database||o)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},48225:(e,r,t)=>{let i=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:s}){let o=new Date,a=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],i=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||i||r||s.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=5287,e.ids=[5287],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},45096:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>m,routeModule:()=>_});var n={};t.r(n),t.d(n,{config:()=>p,default:()=>g});var i=t(89947),s=t(2706),a=t(96762),o=t(33873),l=t.n(o),u=t(45185),c=t(67619),d=t(56081);let f=t(29021),p={api:{bodyParser:{sizeLimit:"100mb"}}};async function g(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=(0,d.A)({key:t,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");let{user_id:i,full_access:s}=n;if(!s)return r.json({success:!1,msg:"Unauthorized"});let{folder:a,fileName:o,downloadType:c}=e.body,p=(0,u.A)({folder:a,isPrivate:!0,userId:n.user_id});if(!p)throw Error("Couldn't Grab Image URLs");let{fileRootPath:g}=p,m=l().join(g,o);if(c?.match(/raw/i)){let e=f.readFileSync(m,"utf-8");return r.json({success:!0,data:e})}if(c?.match(/base64/i)){let e=f.readFileSync(m,"base64");return r.json({success:!0,data:e})}f.createReadStream(m).pipe(r)}catch(t){console.log("Get Private File Error:",t),(0,c.default)({component:"/api/query/get-private-file/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Get Private File Error!",error:t.message})}}let m=(0,a.M)(n,"default"),S=(0,a.M)(n,"config"),_=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/query/[user_id]/get-private-file",pathname:"/api/query/[user_id]/get-private-file",bundlePath:"",filename:""},userland:n})},45185:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(29021),i=t.n(n),s=t(33873),a=t.n(s);function o({isPrivate:e,userId:r,folder:t,video:n,pathOnly:s}){"production".match(/production/);let o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)return console.log("Static File ENV not Found!"),null;let l=e?`@/${n?"videos":"media"}/${t?t+"/":""}`:n?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:a().join(o,l);return i().existsSync(u)||s||i().mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${l}`,relativePath:l}}},56081:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(29021),i=t.n(n),s=t(95969);let a=({key:e,database:r,table:t,user_id:n,media:a})=>{if(!e||!n)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,s.A)({encryptedString:e}),u=JSON.parse(l||""),c=i().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(n)||!c)return null;if(!u.target_database||a)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),i=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let a=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||n||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),s?.url&&(n+=` URL: ${s.url}`),s?.body&&(n+=` -Request Body: ${JSON.stringify(s.body,null,4)}`),a&&(n+=` -IP: ${a}`),n+=` -Date: ${o.toDateString()} -========================================`,i.existsSync("./.tmp/error.log")||i.writeFileSync("./.tmp/error.log","","utf-8");let l=i.readFileSync("./.tmp/error.log","utf-8");i.writeFileSync("./.tmp/error.log",n),i.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${a.toDateString()} +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let l=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",n),i().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:i,createDecipheriv:n}=t(55511),{Buffer:s}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",i(o,a,l),s.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=48069);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),i=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(s,a,o),u=i.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=45096);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js.nft.json index 1235c1f..4acab9d 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-private-file.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js index c8bdb64..e60aa51 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=6562,e.ids=[6562],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},3267:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>f,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>g});var s=t(89947),a=t(2706),i=t(96762),o=t(48225),l=t.n(o),u=t(77619),c=t.n(u);let d=t(29021),p=t(33873);async function g(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});console.log("Getting DB schema");try{let{database:t,table:n,field:s}=e.query,a=e.headers.authorization;if(!a)return r.json({success:!1,msg:"Unauthorized"});let i=c()({key:a,database:t,table:n,user_id:String(e.query.user_id)});if(!i?.user_id)throw Error("Api Credentials invalid!");let{user_id:o,full_access:u}=i;if(!u)return r.json({success:!1,msg:"Unauthorized"});try{let e=t&&"string"==typeof t?`datasquirel_user_${o}_${t?.toLowerCase().replace(/[^a-z0-9\_]/g,"")}`:null,a=p.join(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${o.toString().replace(/\//g,"")}`,"main.json"),i=JSON.parse(d.readFileSync(a,"utf8")),l=e?i.find(r=>r.dbFullName==e):null;if(n&&t&&l?.tables?.[0]){let e=l.tables.find(e=>e.tableName==n);if(s&&e?.fields?.[0]){let t=e.fields.find(e=>e.fieldName===s);return r.json({success:!!t,payload:t})}if(s&&!e?.fields?.[0])throw Error("Target Table Not Found!");return r.json({success:!!e,payload:e})}if(n&&!l?.tables?.[0])throw Error("Target Database Not Found!");t?r.json({success:!!l,payload:l}):r.json({success:!0,payload:i})}catch(e){l()({component:"/api/query/get-schema/lines-132-142",message:e.message}),r.json({success:!1,payload:null,error:e.message})}}catch(t){l()({component:"/api/query/get-schema/main-catch-error",message:t.message,req:e}),r.json({success:!1,payload:null,msg:"Wrong Credentials"})}}let f=(0,i.M)(n,"default"),m=(0,i.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/query/[user_id]/get-schema",pathname:"/api/query/[user_id]/get-schema",bundlePath:"",filename:""},userland:n})},77619:(e,r,t)=>{let n=t(29021),s=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:i})=>{if(!e||!a)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=s({encryptedString:e}),u=JSON.parse(l||""),c=n.existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(a)||!c)return null;if(!u.target_database||i)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},48225:(e,r,t)=>{let n=t(29021),{IncomingMessage:s}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:s,req:a}){let i=new Date,o=(()=>{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 s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=6562,e.ids=[6562],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},35597:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>f,routeModule:()=>g});var n={};t.r(n),t.d(n,{default:()=>d});var s=t(89947),a=t(2706),i=t(96762),o=t(67619),l=t(56081);let u=t(29021),c=t(33873);async function d(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});console.log("Getting DB schema");try{let{database:t,table:n,field:s}=e.query,a=e.headers.authorization;if(!a)return r.json({success:!1,msg:"Unauthorized"});let i=(0,l.A)({key:a,database:t,table:n,user_id:String(e.query.user_id)});if(!i?.user_id)throw Error("Api Credentials invalid!");let{user_id:d,full_access:f}=i;if(!f)return r.json({success:!1,msg:"Unauthorized"});try{let e=t&&"string"==typeof t?`datasquirel_user_${d}_${t?.toLowerCase().replace(/[^a-z0-9\_]/g,"")}`:null,a=c.join(String(process.env.DSQL_USER_DB_SCHEMA_PATH),`user-${d.toString().replace(/\//g,"")}`,"main.json"),i=JSON.parse(u.readFileSync(a,"utf8")),o=e?i.find(r=>r.dbFullName==e):null;if(n&&t&&o?.tables?.[0]){let e=o.tables.find(e=>e.tableName==n);if(s&&e?.fields?.[0]){let t=e.fields.find(e=>e.fieldName===s);return r.json({success:!!t,payload:t})}if(s&&!e?.fields?.[0])throw Error("Target Table Not Found!");return r.json({success:!!e,payload:e})}if(n&&!o?.tables?.[0])throw Error("Target Database Not Found!");t?r.json({success:!!o,payload:o}):r.json({success:!0,payload:i})}catch(e){(0,o.default)({component:"/api/query/get-schema/lines-132-142",message:e.message}),r.json({success:!1,payload:null,error:e.message})}}catch(t){(0,o.default)({component:"/api/query/get-schema/main-catch-error",message:t.message,req:e}),r.json({success:!1,payload:null,msg:"Wrong Credentials"})}}let f=(0,i.M)(n,"default"),p=(0,i.M)(n,"config"),g=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/query/[user_id]/get-schema",pathname:"/api/query/[user_id]/get-schema",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(29021),s=t.n(n),a=t(95969);let i=({key:e,database:r,table:t,user_id:n,media:i})=>{if(!e||!n)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,a.A)({encryptedString:e}),u=JSON.parse(l||""),c=s().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(n)||!c)return null;if(!u.target_database||i)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},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 i=new Date,o=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(s+=` -URL: ${a.url}`),a?.body&&(s+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(s+=` -IP: ${o}`),s+=` +User Email: ${e?.email}`),a?.url&&(n+=` +URL: ${a.url}`),a?.body&&(n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` Date: ${i.toDateString()} -========================================`,n.existsSync("./.tmp/error.log")||n.writeFileSync("./.tmp/error.log","","utf-8");let l=n.readFileSync("./.tmp/error.log","utf-8");n.writeFileSync("./.tmp/error.log",s),n.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:n,createDecipheriv:s}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=s("aes-192-cbc",n(i,o,l),a.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=3267);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(a,i,o),u=s.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=35597);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js.nft.json index 1235c1f..4acab9d 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get-schema.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js index b980595..559b9c3 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js @@ -1 +1,16 @@ -"use strict";(()=>{var e={};e.id=8446,e.ids=[8446],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},7671:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>y,routeModule:()=>h});var a={};t.r(a),t.d(a,{default:()=>f});var s=t(89947),i=t(2706),l=t(96762);t(27825);var u=t(79681),n=t.n(u),o=t(48225),d=t.n(o),c=t(77619),p=t.n(c);let m=t(29021);async function f(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});try{let t,a;let s=e.query,{query:i,db:l}=s,u=s?.tableName?String(s.tableName):void 0,o=e.headers.authorization;if(!o)return r.json({success:!1,msg:"Unauthorized"});let d=p()({key:o,database:l,table:u,user_id:String(e.query.user_id)});if(!d?.user_id)throw Error("Api Credentials invalid!");let{user_id:c}=d;if(s?.queryValues&&"string"==typeof s?.queryValues)try{t=JSON.parse(s.queryValues)}catch(e){}let f=`datasquirel_user_${c}_${l}`,y=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${c.toString().replace(/\//g,"")}/main.json`;if(m.existsSync(y))try{a=JSON.parse(m.readFileSync(y,"utf8")).filter(e=>e.dbFullName===f)[0]}catch(e){}let g=await n()({dbFullName:f,query:i,tableName:u,queryValues:t,dbSchema:a});r.json(g)}catch(t){d()({component:"/api/query/get/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let y=(0,l.M)(a,"default"),g=(0,l.M)(a,"config"),h=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/query/[user_id]/get",pathname:"/api/query/[user_id]/get",bundlePath:"",filename:""},userland:a})},79681:(e,r,t)=>{let a=t(27825),s=t(48225),i=t(8238);e.exports=async function({query:e,dbFullName:r,queryValues:t,tableName:l,dbSchema:u,useLocal:n}){if("string"==typeof e&&e.match(/^alter|^delete|information_schema|databases|^create/i))return{success:!1,msg:"Wrong Input."};try{let s,{result:o,error:d}=await i({dbFullName:r,query:e,queryValuesArray:t,readOnly:!0,dbSchema:u,tableName:l,local:n});if(u){let e=u.tables.find(e=>e.tableName===l);if(e){let r=a.cloneDeep(e);delete r.childTable,delete r.childTableDbFullName,delete r.childTableName,delete r.childrenTables,delete r.updateData,delete r.tableNameOld,delete r.indexes,s=r}}if(d)throw d;if(o.error)throw Error(o.error);return{success:!0,payload:o,schema:l&&s?s:void 0}}catch(e){return s({component:"/api/query/get/lines-85-94",message:e.message}),{success:!1,payload:null,error:e.message}}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[4050,8540],()=>t(7671));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8446,e.ids=[8446],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},93777:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>y,routeModule:()=>b});var a={};t.r(a),t.d(a,{default:()=>f});var l=t(89947),s=t(2706),n=t(96762),i=t(29021),u=t.n(i),c=t(27825),o=t.n(c),d=t(67619),m=t(36249);async function p({query:e,dbFullName:r,queryValues:t,tableName:a,dbSchema:l,useLocal:s}){if("string"==typeof e&&e.match(/^alter|^delete|information_schema|databases|^create/i))return{success:!1,msg:"Wrong Input."};try{let n,{result:i,error:u}=await (0,m.A)({dbFullName:r,query:e,queryValuesArray:t,readOnly:!0,dbSchema:l,tableName:a,local:s});if(l){let e=l.tables.find(e=>e.tableName===a);if(e){let r=o().cloneDeep(e);delete r.childTable,delete r.childTableDbFullName,delete r.childTableName,delete r.childrenTables,delete r.updateData,delete r.tableNameOld,delete r.indexes,n=r}}if(u)throw u;if(i.error)throw Error(i.error);return{success:!0,payload:i,schema:a&&n?n:void 0}}catch(e){return(0,d.default)({component:"/api/query/get/lines-85-94",message:e.message}),{success:!1,payload:null,error:e.message}}}var g=t(56081);async function f(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});try{let t,a;let l=e.query,{query:s,db:n}=l,i=l?.tableName?String(l.tableName):void 0,c=e.headers.authorization;if(!c)return r.json({success:!1,msg:"Unauthorized"});let o=(0,g.A)({key:c,database:n,table:i,user_id:String(e.query.user_id)});if(!o?.user_id)throw Error("Api Credentials invalid!");let{user_id:d}=o;if(l?.queryValues&&"string"==typeof l?.queryValues)try{t=JSON.parse(l.queryValues)}catch(e){}let m=`datasquirel_user_${d}_${n}`,f=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${d.toString().replace(/\//g,"")}/main.json`;if(u().existsSync(f))try{a=JSON.parse(u().readFileSync(f,"utf8")).filter(e=>e.dbFullName===m)[0]}catch(e){}let y=`datasquirel_user_${d}_`,_=await p({dbFullName:m,query:s.replace(/datasquirel_user_\d+_/gi,y).replace(/__db/gi,m),tableName:i,queryValues:t,dbSchema:a});r.json(_)}catch(t){(0,d.default)({component:"/api/query/get/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let y=(0,n.M)(a,"default"),_=(0,n.M)(a,"config"),b=new l.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/query/[user_id]/get",pathname:"/api/query/[user_id]/get",bundlePath:"",filename:""},userland:a})},56081:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(29021),l=t.n(a),s=t(95969);let n=({key:e,database:r,table:t,user_id:a,media:n})=>{if(!e||!a)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let u=(0,s.A)({encryptedString:e}),c=JSON.parse(u||""),o=l().existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(a)||!o)return null;if(!c.target_database||n)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},61932:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(48786),l=t(37275),s=t(7971);async function n({dbContext:e,paradigm:r,dbFullName:t,tableName:n,identifierColumnName:i,identifierValue:u,useLocal:c}){try{let o=!!c||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=c?s.A:o?a.A:l.default,m=`DELETE FROM \`${t}\`.\`${n}\` WHERE \`${i}\`=?`;return o?await d(m,[u]):await d({paradigm:r,queryString:m,queryValues:[u]})}catch(e){return null}}},36249:(e,r,t)=>{t.d(r,{A:()=>m});var a=t(37275),l=t(7971),s=t(43775),n=t(67619);async function i({queryString:e,tableSchema:r,queryValuesArray:t,local:i}){let u;try{u=i?await (0,l.A)(e,t):await (0,a.default)({paradigm:"Full Access",queryString:e,queryValues:t})}catch(e){return(0,n.default)({component:"fullAccessDbHandler",message:e.message}),e.message}if(u&&r){let e=u;return await (0,s.A)({unparsedResults:e,tableSchema:r})}return u||null}async function u({queryString:e,queryValuesArray:r,tableSchema:t,useLocal:i}){let u;try{u=i?await (0,l.A)(e,r):await (0,a.default)({paradigm:"Read Only",queryString:e,queryValues:r})}catch(e){return(0,n.default)({component:"varReadOnlyDatabaseDbHandler",message:e.message,noMail:!0}),e.message}if(!u)return null;{let e=u;return await (0,s.A)({unparsedResults:e,tableSchema:t})}}var c=t(98e3),o=t(30802),d=t(61932);async function m({dbFullName:e,query:r,readOnly:t,dbSchema:a,queryValuesArray:l,tableName:s,local:m}){let p,g,f;if(a)try{let e=s||("string"==typeof r?null:r?r?.table:null);if(!e)throw Error("No table name provided");f=a.tables.filter(r=>r?.tableName===e)[0]}catch(e){}try{if("string"==typeof r){let e=r.replace(/\n|\r|\n\r|\r\n/gm," ").replace(/ {2,}/g," ").trim();if(t&&e.match(/^alter|^delete|information_schema|^create/i))throw Error("Wrong Input!");p=t?await u({queryString:e,queryValuesArray:l?.map(e=>String(e)),tableSchema:f,useLocal:m}):await i({queryString:e,queryValuesArray:l?.map(e=>String(e)),tableSchema:f,local:m})}else if("object"==typeof r){let{data:t,action:a,table:l,identifierColumnName:s,identifierValue:n,update:i,duplicateColumnName:u,duplicateColumnValue:y}=r;switch(a.toLowerCase()){case"insert":p=await (0,c.A)({dbContext:m?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:l,data:t,update:i,duplicateColumnName:u,duplicateColumnValue:y,tableSchema:f,useLocal:m}),p?.insertId||(g=Error("Couldn't insert data"));break;case"update":p=await (0,o.A)({dbContext:m?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:l,data:t,identifierColumnName:s,identifierValue:n,tableSchema:f,useLocal:m});break;case"delete":p=await (0,d.A)({dbContext:m?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:l,identifierColumnName:s,identifierValue:n,tableSchema:f,useLocal:m});break;default:p=null}}}catch(e){(0,n.default)({component:"functions/backend/runQuery",message:e.message}),p=null,e=e.message}return{result:p,error:g}}},43775:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);let l=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var a=t(29021),l=t.n(a);async function s({user:e,message:r,component:t,noMail:a,req:s}){let n=new Date,i=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],l=t||a||r||s.socket.remoteAddress;if(!l)return null;return String(l)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +Error Message: ${r} +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),s?.url&&(a+=` +URL: ${s.url}`),s?.body&&(a+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),i&&(a+=` +IP: ${i}`),a+=` +Date: ${n.toDateString()} +========================================`,l().existsSync("./.tmp/error.log")||l().writeFileSync("./.tmp/error.log","","utf-8");let u=l().readFileSync("./.tmp/error.log","utf-8");l().writeFileSync("./.tmp/error.log",a),l().appendFileSync("./.tmp/error.log",` + + + + +${u}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(55511),l=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,a.scryptSync)(s,n,i),c=l.Buffer.alloc(16,0),o=(0,a.createDecipheriv)("aes-192-cbc",u,c);try{let r=o.update(e,"hex","utf8");return r+=o.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[1251],()=>t(93777));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js.nft.json index 211caea..f182f28 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/get.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js index f6ea775..c03e538 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js @@ -1 +1,16 @@ -"use strict";(()=>{var e={};e.id=4112,e.ids=[4112],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},63831:(e,r,t)=>{t.r(r),t.d(r,{config:()=>q,default:()=>g,routeModule:()=>b});var s={};t.r(s),t.d(s,{config:()=>h,default:()=>y});var a=t(89947),i=t(2706),l=t(96762),o=t(29021),n=t.n(o);t(27825);var u=t(14211),d=t.n(u),c=t(48225),p=t.n(c),m=t(77619),f=t.n(m);let h={api:{bodyParser:{sizeLimit:"50mb"}}};async function y(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t,{query:s,database:a,tableName:i,queryValues:l}=e.body,o=e.headers.authorization,u=f()({key:o,database:a,table:i,user_id:String(e.query.user_id)});if(!u?.user_id)throw Error("Api Credentials invalid!");let{user_id:c,full_access:p}=u;if(!p)return r.json({success:!1,msg:"Unauthorized"});let m=`datasquirel_user_${c}_${a}`,h=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${c.toString().replace(/\//g,"")}/main.json`;if(n().existsSync(h))try{t=JSON.parse(n().readFileSync(h,"utf8")).filter(e=>e.dbFullName===m)[0]}catch(e){}let y=await d()({query:s,dbFullName:m,dbSchema:t,queryValues:l,tableName:i});r.json(y)}catch(t){p()({component:"/api/query/post/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let g=(0,l.M)(s,"default"),q=(0,l.M)(s,"config"),b=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/query/[user_id]/post",pathname:"/api/query/[user_id]/post",bundlePath:"",filename:""},userland:s})},14211:(e,r,t)=>{let s=t(27825),a=t(48225),i=t(8238);e.exports=async function({query:e,dbFullName:r,queryValues:t,tableName:l,dbSchema:o,useLocal:n}){let u;if("string"==typeof e&&e?.match(/^create |^alter |^drop /i)||"object"==typeof e&&e?.action?.match(/^create |^alter |^drop /i))return{success:!1,msg:"Wrong Input"};try{let a,{result:d,error:c}=await i({dbFullName:r,query:e,dbSchema:o,queryValuesArray:t,tableName:l,local:n});if(u=d,c)throw c;if(o){let e=o.tables.find(e=>e.tableName===l);if(e){let r=s.cloneDeep(e);delete r.childTable,delete r.childTableDbFullName,delete r.childTableName,delete r.childrenTables,delete r.updateData,delete r.tableNameOld,delete r.indexes,a=r}}return{success:!0,payload:u,error:c,schema:l&&a?a:void 0}}catch(e){return a({component:"/api/query/post/lines-132-142",message:e.message}),{success:!1,payload:u,error:e.message}}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050,8540],()=>t(63831));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4112,e.ids=[4112],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},88749:(e,r,t)=>{t.r(r),t.d(r,{config:()=>b,default:()=>_,routeModule:()=>h});var a={};t.r(a),t.d(a,{config:()=>g,default:()=>y});var s=t(89947),l=t(2706),n=t(96762),i=t(29021),u=t.n(i),o=t(27825),c=t.n(o),d=t(67619),p=t(36249);async function m({query:e,dbFullName:r,queryValues:t,tableName:a,dbSchema:s,useLocal:l}){let n;if("string"==typeof e&&e?.match(/^create |^alter |^drop /i)||"object"==typeof e&&e?.action?.match(/^create |^alter |^drop /i))return{success:!1,msg:"Wrong Input"};try{let i,{result:u,error:o}=await (0,p.A)({dbFullName:r,query:e,dbSchema:s,queryValuesArray:t,tableName:a,local:l});if(n=u,o)throw o;if(s){let e=s.tables.find(e=>e.tableName===a);if(e){let r=c().cloneDeep(e);delete r.childTable,delete r.childTableDbFullName,delete r.childTableName,delete r.childrenTables,delete r.updateData,delete r.tableNameOld,delete r.indexes,i=r}}return{success:!0,payload:n,error:o,schema:a&&i?i:void 0}}catch(e){return(0,d.default)({component:"/api/query/post/lines-132-142",message:e.message}),{success:!1,payload:n,error:e.message}}}var f=t(56081);let g={api:{bodyParser:{sizeLimit:"50mb"}}};async function y(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t,{query:a,database:s,tableName:l,queryValues:n}=e.body,i=e.headers.authorization,o=(0,f.A)({key:i,database:s,table:l,user_id:String(e.query.user_id)});if(!o?.user_id)throw Error("Api Credentials invalid!");let{user_id:c,full_access:d}=o;if(!d)return r.json({success:!1,msg:"Unauthorized"});let p=`datasquirel_user_${c}_${s}`,g=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${c.toString().replace(/\//g,"")}/main.json`;if(u().existsSync(g))try{t=JSON.parse(u().readFileSync(g,"utf8")).filter(e=>e.dbFullName===p)[0]}catch(e){}let y=`datasquirel_user_${c}_`,_=await m({query:"string"==typeof a?a.replace(/datasquirel_user_\d+_/gi,y).replace(/__db/gi,p):a,dbFullName:p,dbSchema:t,queryValues:n,tableName:l});r.json(_)}catch(t){(0,d.default)({component:"/api/query/post/main-catch-error",message:t.message,req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let _=(0,n.M)(a,"default"),b=(0,n.M)(a,"config"),h=new s.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/query/[user_id]/post",pathname:"/api/query/[user_id]/post",bundlePath:"",filename:""},userland:a})},56081:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(29021),s=t.n(a),l=t(95969);let n=({key:e,database:r,table:t,user_id:a,media:n})=>{if(!e||!a)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let u=(0,l.A)({encryptedString:e}),o=JSON.parse(u||""),c=s().existsSync(`${i}/${o.sign}`);if(String(o.user_id)!==String(a)||!c)return null;if(!o.target_database||n)return o;if(!r&&o.target_database)return null;let d=o.target_database?.split(",").includes(String(r));if(d&&!o.target_table)return o;if(d&&!t&&o.target_table)return null;if(o.target_table?.split(",").includes(String(t)))return o;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},61932:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(48786),s=t(37275),l=t(7971);async function n({dbContext:e,paradigm:r,dbFullName:t,tableName:n,identifierColumnName:i,identifierValue:u,useLocal:o}){try{let c=!!o||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=o?l.A:c?a.A:s.default,p=`DELETE FROM \`${t}\`.\`${n}\` WHERE \`${i}\`=?`;return c?await d(p,[u]):await d({paradigm:r,queryString:p,queryValues:[u]})}catch(e){return null}}},36249:(e,r,t)=>{t.d(r,{A:()=>p});var a=t(37275),s=t(7971),l=t(43775),n=t(67619);async function i({queryString:e,tableSchema:r,queryValuesArray:t,local:i}){let u;try{u=i?await (0,s.A)(e,t):await (0,a.default)({paradigm:"Full Access",queryString:e,queryValues:t})}catch(e){return(0,n.default)({component:"fullAccessDbHandler",message:e.message}),e.message}if(u&&r){let e=u;return await (0,l.A)({unparsedResults:e,tableSchema:r})}return u||null}async function u({queryString:e,queryValuesArray:r,tableSchema:t,useLocal:i}){let u;try{u=i?await (0,s.A)(e,r):await (0,a.default)({paradigm:"Read Only",queryString:e,queryValues:r})}catch(e){return(0,n.default)({component:"varReadOnlyDatabaseDbHandler",message:e.message,noMail:!0}),e.message}if(!u)return null;{let e=u;return await (0,l.A)({unparsedResults:e,tableSchema:t})}}var o=t(98e3),c=t(30802),d=t(61932);async function p({dbFullName:e,query:r,readOnly:t,dbSchema:a,queryValuesArray:s,tableName:l,local:p}){let m,f,g;if(a)try{let e=l||("string"==typeof r?null:r?r?.table:null);if(!e)throw Error("No table name provided");g=a.tables.filter(r=>r?.tableName===e)[0]}catch(e){}try{if("string"==typeof r){let e=r.replace(/\n|\r|\n\r|\r\n/gm," ").replace(/ {2,}/g," ").trim();if(t&&e.match(/^alter|^delete|information_schema|^create/i))throw Error("Wrong Input!");m=t?await u({queryString:e,queryValuesArray:s?.map(e=>String(e)),tableSchema:g,useLocal:p}):await i({queryString:e,queryValuesArray:s?.map(e=>String(e)),tableSchema:g,local:p})}else if("object"==typeof r){let{data:t,action:a,table:s,identifierColumnName:l,identifierValue:n,update:i,duplicateColumnName:u,duplicateColumnValue:y}=r;switch(a.toLowerCase()){case"insert":m=await (0,o.A)({dbContext:p?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:s,data:t,update:i,duplicateColumnName:u,duplicateColumnValue:y,tableSchema:g,useLocal:p}),m?.insertId||(f=Error("Couldn't insert data"));break;case"update":m=await (0,c.A)({dbContext:p?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:s,data:t,identifierColumnName:l,identifierValue:n,tableSchema:g,useLocal:p});break;case"delete":m=await (0,d.A)({dbContext:p?"Master":"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:s,identifierColumnName:l,identifierValue:n,tableSchema:g,useLocal:p});break;default:m=null}}}catch(e){(0,n.default)({component:"functions/backend/runQuery",message:e.message}),m=null,e=e.message}return{result:m,error:f}}},43775:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function l({unparsedResults:e,tableSchema:r}){let t=[];try{for(let l=0;l",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>l});var a=t(29021),s=t.n(a);async function l({user:e,message:r,component:t,noMail:a,req:l}){let n=new Date,i=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],r=l.headers["x-real-ip"],t=l.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||a||r||l.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +Error Message: ${r} +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` +User Id: ${e?.id} +User Name: ${e?.first_name} ${e?.last_name} +User Email: ${e?.email}`),l?.url&&(a+=` +URL: ${l.url}`),l?.body&&(a+=` +Request Body: ${JSON.stringify(l.body,null,4)}`),i&&(a+=` +IP: ${i}`),a+=` +Date: ${n.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let u=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` + + + + +${u}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(55511),s=t(79428);function l({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,a.scryptSync)(l,n,i),o=s.Buffer.alloc(16,0),c=(0,a.createDecipheriv)("aes-192-cbc",u,o);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[1251],()=>t(88749));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js.nft.json index 211caea..f182f28 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/post.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js b/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js index a3b3f54..7febacc 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4133,e.ids=[4133],e.modules={60818:e=>{e.exports=require("dotenv")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},87854:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>m,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>g});var s=t(89947),a=t(2706),i=t(96762),u=t(48225),l=t.n(u),o=t(77619),d=t.n(o),c=t(19261),p=t.n(c);let f=t(29021);async function g(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=d()({key:t,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");let{user_id:s,full_access:a}=n;if(!a)return r.json({success:!1,msg:"Unauthorized"});let i=e.query.schema,u=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s.toString().replace(/\//g,"")}/main.json`,l=JSON.parse(f.readFileSync(u,"utf8")),o=l.findIndex(e=>e.dbFullName==i?.dbFullName);if(i?.dbFullName&&l.find(e=>e.dbFullName==i.dbFullName),o<0)return r.json({success:!1,payload:null});l[o]=i,f.writeFileSync(u,JSON.stringify(l,null,4),"utf8"),await p()({userId:s.toString().replace(/\/| /g,""),targetDatabase:l[o].dbFullName}),r.json({success:!0,payload:"Success!"})}catch(t){l()({component:"/api/query/update-schema-from-single-database/main-catch-error",message:t.message,req:e}),r.json({success:!1,payload:null,msg:"Something went wrong"})}}let m=(0,i.M)(n,"default"),S=(0,i.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/query/[user_id]/update-schema-from-single-database",pathname:"/api/query/[user_id]/update-schema-from-single-database",bundlePath:"",filename:""},userland:n})},77619:(e,r,t)=>{let n=t(29021),s=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:i})=>{if(!e||!a)return null;try{let u=process.env.DSQL_API_KEYS_PATH;if(!u)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=s({encryptedString:e}),o=JSON.parse(l||""),d=n.existsSync(`${u}/${o.sign}`);if(String(o.user_id)!==String(a)||!d)return null;if(!o.target_database||i)return o;if(!r&&o.target_database)return null;let c=o.target_database?.split(",").includes(String(r));if(c&&!o.target_table)return o;if(c&&!t&&o.target_table)return null;if(o.target_table?.split(",").includes(String(t)))return o;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},21580:(e,r,t)=>{let n=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!n.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:n.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),n=r.X(0,[2451],()=>t(87854));module.exports=n})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4133,e.ids=[4133],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},92003:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>f,routeModule:()=>g});var n={};t.r(n),t.d(n,{default:()=>c});var a=t(89947),s=t(2706),i=t(96762),u=t(67619),l=t(56081),o=t(76856);let d=t(29021);async function c(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization;if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=(0,l.A)({key:t,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");let{user_id:a,full_access:s}=n;if(!s)return r.json({success:!1,msg:"Unauthorized"});let i=e.query.schema,u=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${a.toString().replace(/\//g,"")}/main.json`,c=JSON.parse(d.readFileSync(u,"utf8")),f=c.findIndex(e=>e.dbFullName==i?.dbFullName);if(i?.dbFullName&&c.find(e=>e.dbFullName==i.dbFullName),f<0)return r.json({success:!1,payload:null});c[f]=i,d.writeFileSync(u,JSON.stringify(c,null,4),"utf8"),await (0,o.A)({userId:a.toString().replace(/\/| /g,""),targetDatabase:c[f].dbFullName}),r.json({success:!0,payload:"Success!"})}catch(t){(0,u.default)({component:"/api/query/update-schema-from-single-database/main-catch-error",message:t.message,req:e}),r.json({success:!1,payload:null,msg:"Something went wrong"})}}let f=(0,i.M)(n,"default"),p=(0,i.M)(n,"config"),g=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/query/[user_id]/update-schema-from-single-database",pathname:"/api/query/[user_id]/update-schema-from-single-database",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(29021),a=t.n(n),s=t(95969);let i=({key:e,database:r,table:t,user_id:n,media:i})=>{if(!e||!n)return null;try{let u=process.env.DSQL_API_KEYS_PATH;if(!u)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,s.A)({encryptedString:e}),o=JSON.parse(l||""),d=a().existsSync(`${u}/${o.sign}`);if(String(o.user_id)!==String(n)||!d)return null;if(!o.target_database||i)return o;if(!r&&o.target_database)return null;let c=o.target_database?.split(",").includes(String(r));if(c&&!o.target_table)return o;if(c&&!t&&o.target_table)return null;if(o.target_table?.split(",").includes(String(t)))return o;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),n=r.X(0,[2282],()=>t(92003));module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js.nft.json b/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js.nft.json index 2999344..6ce01b3 100644 --- a/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/query/[user_id]/update-schema-from-single-database.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../.env","../../../../../../jsonData/dbSchemas/main.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/dotenv/lib/main.js","../../../../../../node_modules/dotenv/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package-shared/data/defaultFields.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../jsonData/dbSchemas/main.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package-shared/data/defaultFields.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js b/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js index 795c44a..7c0a139 100644 --- a/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js +++ b/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=2101,e.ids=[2101],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},57164:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>S,routeModule:()=>m});var s={};t.r(s),t.d(s,{default:()=>d});var n=t(89947),a=t(2706),o=t(96762),c=t(48225),i=t.n(c),l=t(6420),u=t.n(l),_=t(57638),p=t.n(_);async function d(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await u()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.query.table,n=e.query.db,a=e.query.field,o=String(e.query.term),c=e.query.operator;try{let e=`SELECT * FROM \`${s}\` WHERE LOWER(\`${a}\`) ${c?.toString()?.match(/equal/i)?"=":" LIKE "}? ORDER BY id DESC LIMIT 20`,t=[c?.toString()?.match(/equal/i)?o.toLowerCase():"%"+o.toLowerCase()+"%"],i=await p()({database:n?.toString()?.replace(/[^a-z0-9_]/g,""),queryString:e,queryValuesArray:t}),l=await p()({database:n?.toString()?.replace(/[^a-z0-9_]/g,""),queryString:e.replace(/\*/,"COUNT(id) AS count").replace(/ ORDER BY .*/,""),queryValuesArray:t});r.json({success:!0,result:i,count:l?.[0]?.count})}catch(e){i()({component:"/api/queryEntriesSearchTerm/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Failed!"})}}let S=(0,o.M)(s,"default"),f=(0,o.M)(s,"config"),m=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/queryEntriesSearchTerm",pathname:"/api/queryEntriesSearchTerm",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function c(e,r,t,c){let{keyCookieName:i,csrfCookieName:l}=o();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),c+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:c,oneTimeCodeName:i+=n}}},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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,c=(()=>{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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2101,e.ids=[2101],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},85607:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>u});var a=t(89947),s=t(2706),o=t(96762),l=t(67619),i=t(69842),c=t(30944);async function u(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let t=await (0,i.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=e.query.table,a=e.query.db,s=e.query.field,o=String(e.query.term),u=e.query.operator;try{let e=a?.toString()?.replace(/[^a-z0-9_]/g,""),t=`SELECT * FROM \`${e}\`.\`${n}\` WHERE LOWER(\`${s}\`) ${u?.toString()?.match(/equal/i)?"=":" LIKE "}? ORDER BY id DESC LIMIT 20`,l=[u?.toString()?.match(/equal/i)?o.toLowerCase():"%"+o.toLowerCase()+"%"],i=await (0,c.A)({database:e,queryString:t,queryValuesArray:l}),d=await (0,c.A)({database:e,queryString:t.replace(/\*/,"COUNT(id) AS count").replace(/ ORDER BY .*/,""),queryValuesArray:l});r.json({success:!0,result:i,count:d?.[0]?.count})}catch(e){(0,l.default)({component:"/api/queryEntriesSearchTerm/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Failed!"})}}let d=(0,o.M)(n,"default"),_=(0,o.M)(n,"config"),f=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/queryEntriesSearchTerm",pathname:"/api/queryEntriesSearchTerm",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(48786),a=t(95969),s=t(29021),o=t.n(s),l=t(89159);async function i(e,r,t){let{keyCookieName:s,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[s]?.match(/./))return null;let c=(0,a.A)({encryptedString:e.cookies[s]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),s&&(o+=`${s}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),s&&(l+=`${s}_`),l+=n;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),s&&(i+=`${s}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=a}}},43775:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(95969);let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),a=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let o=new Date,l=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||n||r||s.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),c&&(n+=` -IP: ${c}`),n+=` +User Email: ${e?.email}`),s?.url&&(n+=` +URL: ${s.url}`),s?.body&&(n+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let i=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",n),a().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),c=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:l}){let u;let _=!!l||!!t?.match(/^datasquirel$/),p=l?c:_?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?_?await p(e,r):await p({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):_?await p(e):await p({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await s({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,c,i),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function p(e){o.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:c,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),c&&Array.isArray(c)&&c[0]?o.query(t,c).then(_).catch(p):o.query(t).then(_).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=57164);module.exports=t})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(43775),a=t(67619),s=t(48786),o=t(37275),l=t(7971);async function i({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?l.A:d?s.A:o.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,a.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await (0,n.A)({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,a.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),a=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,n.scryptSync)(s,o,l),c=a.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",i,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(a(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;ns})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),a=t.n(n),s=t(29021),o=t.n(s);async function l(...e){let r=a()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=85607);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js.nft.json b/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/queryEntriesSearchTerm.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js b/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js index e6b946b..6a9bb46 100644 --- a/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js +++ b/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=2998,e.ids=[2998],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},96499:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),i=t(2706),o=t(96762),a=t(6420),l=t.n(a),c=t(56129),u=t.n(c);async function _(e,r){"POST"!==e.method&&r.json({msg:"Failed!"});let t=await l()(e,r,!0);if(!t){console.log("No user Found"),r.redirect(307,"/logout");return}let s=await u()({userId:t.id,res:r,csrf:t.csrf_k}),n={status:!!s,csrf:s?.csrf_k,user:s};r.json(n)}let d=(0,o.M)(s,"default"),p=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/reAuthenticateUser",pathname:"/api/reAuthenticateUser",bundlePath:"",filename:""},userland:s})},56129:(e,r,t)=>{let s=t(29021),n=t(48225),{ServerResponse:i}=t(81630),o=t(51348),a=t(20503),l=t(31341);e.exports=async function({userId:e,res:r,csrf:t}){try{let n=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!n)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;let i=await o("SELECT * FROM users WHERE id=?",[e]);s.unlinkSync(`${n}/${t}`);let c=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),u={id:i[0].id,stripe_id:i[0].stripe_id||"",first_name:i[0].first_name,last_name:i[0].last_name,email:i[0].email,social_id:i[0].social_id,image:i[0].image,image_thumbnail:i[0].image_thumbnail,verification_status:i[0].verification_status,social_login:i[0].social_login,social_platform:i[0].social_platform,csrf_k:c,logged_in_status:!0,date:Date.now()},_=a({data:JSON.stringify(u)});s.writeFileSync(`${n}/${c}`,JSON.stringify(u));let{keyCookieName:d,csrfCookieName:p}=l();return r.setHeader("Set-Cookie",[`${d}=${_};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${p}=${c};samesite=strict;path=/;HttpOnly=true;Secure=true`,"user_refresh=1"]),u}catch(r){return n({component:"reAuthUser",message:r.message,user:{id:e}}),null}}},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),i=t(29021),o=t(31341);async function a(e,r,t,a){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:l+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:i}){let o=new Date,a=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||i.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2998,e.ids=[2998],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},55896:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>S,routeModule:()=>g});var n={};t.r(n),t.d(n,{default:()=>E});var s=t(89947),i=t(2706),a=t(96762),o=t(69842),l=t(29021),u=t.n(l),c=t(67619),_=t(48786),d=t(68829),f=t(89159);async function p({userId:e,res:r,csrf:t}){try{let n=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!n)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;let s=await (0,_.A)("SELECT * FROM users WHERE id=?",[e]);u().unlinkSync(`${n}/${t}`);let i=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),a={id:s[0].id,stripe_id:s[0].stripe_id||"",first_name:s[0].first_name,last_name:s[0].last_name,email:s[0].email,social_id:s[0].social_id,image:s[0].image,image_thumbnail:s[0].image_thumbnail,verification_status:s[0].verification_status,social_login:s[0].social_login,social_platform:s[0].social_platform,csrf_k:i,logged_in_status:!0,date:Date.now()},o=(0,d.default)({data:JSON.stringify(a)});u().writeFileSync(`${n}/${i}`,JSON.stringify(a));let{keyCookieName:l,csrfCookieName:c}=(0,f.A)();return r.setHeader("Set-Cookie",[`${l}=${o};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${c}=${i};samesite=strict;path=/;HttpOnly=true;Secure=true`,"user_refresh=1"]),a}catch(r){return(0,c.default)({component:"reAuthUser",message:r.message,user:{id:e}}),null}}async function E(e,r){"POST"!==e.method&&r.json({msg:"Failed!"});let t=await (0,o.A)(e,r,!0);if(!t){console.log("No user Found"),r.redirect(307,"/logout");return}let n=await p({userId:t.id,res:r,csrf:t.csrf_k}),s={status:!!n,csrf:n?.csrf_k,user:n};r.json(s)}let S=(0,a.M)(n,"default"),m=(0,a.M)(n,"config"),g=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/reAuthenticateUser",pathname:"/api/reAuthenticateUser",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),i=t(29021),a=t.n(i),o=t(89159);async function l(e,r,t){let{keyCookieName:i,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[i]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${_}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:l+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var n=t(29021),s=t.n(n);async function i({user:e,message:r,component:t,noMail:n,req:i}){let a=new Date,o=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),i?.url&&(n+=` URL: ${i.url}`),i?.body&&(n+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),a&&(n+=` -IP: ${a}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(i.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${a.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,a,l),i.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=n("aes-192-cbc",s(o,a,l),i.alloc(16,0));try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=96499);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(i,a,o),u=s.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var n=t(55511),s=t(79428);function i({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,n.scryptSync)(i,a,o),u=s.Buffer.alloc(16,0),c=(0,n.createCipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=55896);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/reAuthenticateUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/refreshEntry.js b/dsql-app/.local_dist/server/pages/api/refreshEntry.js index a0dca2e..58fdb13 100644 --- a/dsql-app/.local_dist/server/pages/api/refreshEntry.js +++ b/dsql-app/.local_dist/server/pages/api/refreshEntry.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},57237:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>m,routeModule:()=>D});var s={};t.r(s),t.d(s,{default:()=>f});var n=t(89947),a=t(2706),o=t(96762),c=t(57638),i=t.n(c),l=t(48225),u=t.n(l),d=t(6420),_=t.n(d),p=t(72835),S=t.n(p);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await _()(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{table:s,db:n,id:a}=e.body,o=e.body.schema;try{let e=`SELECT * FROM \`${s}\` WHERE id=?`,t=[a?.toString()||""],c=await i()({database:n?.toString()||"",queryString:e,queryValuesArray:t});if(!c||!c[0])return r.json({success:!1,msg:"Entry not found"});let l=JSON.parse(o||"{}");try{for(let e=0;e",e.message)}r.json({success:!0,entry:c[0]})}catch(e){u()({component:"/api/refreshEntry/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Deletion Failed!"})}}let m=(0,o.M)(s,"default"),E=(0,o.M)(s,"config"),D=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/refreshEntry",pathname:"/api/refreshEntry",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function c(e,r,t,c){let{keyCookieName:i,csrfCookieName:l}=o();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),c+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:c,oneTimeCodeName:i+=n}}},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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,c=(()=>{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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},2875:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>f,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>d});var s=t(89947),a=t(2706),o=t(96762),l=t(30944),i=t(67619),c=t(69842),u=t(95969);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,c.A)(e,r);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{table:n,db:s,id:a}=e.body,o=e.body.schema;try{let e=`SELECT * FROM \`${s?.toString()||""}\`.\`${n}\` WHERE id=?`,t=[a?.toString()||""],i=await (0,l.A)({database:s?.toString()||"",queryString:e,queryValuesArray:t});if(!i||!i[0])return r.json({success:!1,msg:"Entry not found"});let c=JSON.parse(o||"{}");try{for(let e=0;e",e.message)}r.json({success:!0,entry:i[0]})}catch(e){(0,i.default)({component:"/api/refreshEntry/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Deletion Failed!"})}}let f=(0,o.M)(n,"default"),_=(0,o.M)(n,"config"),p=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/refreshEntry",pathname:"/api/refreshEntry",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(48786),s=t(95969),a=t(29021),o=t.n(a),l=t(89159);async function i(e,r,t){let{keyCookieName:a,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[a]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[a]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=n;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function a({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},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,l=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),c&&(n+=` -IP: ${c}`),n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let i=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),c=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:l}){let u;let d=!!l||!!t?.match(/^datasquirel$/),_=l?c:d?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await s({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,c,i),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:c,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),c&&Array.isArray(c)&&c[0]?o.query(t,c).then(d).catch(_):o.query(t).then(d).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=57237);module.exports=t})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(43775),s=t(67619),a=t(48786),o=t(37275),l=t(7971);async function i({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),f=c?l.A:d?a.A:o.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await f(e,r):await f({paradigm:"Full Access",queryString:e,queryValues:r}):d?await f(e):await f({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await (0,n.A)({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,n.scryptSync)(a,o,l),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",i,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function l(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=2875);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/refreshEntry.js.nft.json b/dsql-app/.local_dist/server/pages/api/refreshEntry.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/refreshEntry.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/refreshEntry.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/registerUser.js b/dsql-app/.local_dist/server/pages/api/registerUser.js index 5bb5271..114dd24 100644 --- a/dsql-app/.local_dist/server/pages/api/registerUser.js +++ b/dsql-app/.local_dist/server/pages/api/registerUser.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=3953,e.ids=[3953],e.modules={47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},3641:(e,r,s)=>{s.r(r),s.d(r,{config:()=>x,default:()=>w,routeModule:()=>N});var t={};s.r(t),s.d(t,{default:()=>R});var a=s(89947),i=s(2706),n=s(96762),l=s(20503),o=s.n(l),d=s(59474),u=s.n(d),c=s(48225),m=s.n(c),p=s(33873),_=s.n(p),g=s(79646),S=s(5194),f=s.n(S),E=s(51348),h=s.n(E),v=s(47670),y=s.n(v),b=s(33364),I=s.n(b),D=s(14533),A=s.n(D);let L=s(29021);async function R(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=e.body,{inviteObject:t}=s,a=s.first_name,i=s.last_name,n=s.email,l=s.password,d=s.username;if(!n.match(/.*@.*\..*/))return r.json({user:null,msg:"Invalid Email"});if(!a.match(/^[a-zA-Z]+$/)||!i.match(/^[a-zA-Z]+$/))return r.json({user:null,msg:"Invalid Name"});if(l?.match(/ /))return r.json({user:null,msg:"Invalid Password"});if(d?.match(/ /))return r.json({user:null,msg:"Invalid Username"});try{let e=A()({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:l}),s=await h()(`SELECT * FROM users WHERE email='${n}'`);if(s&&s[0])return r.json({user:null,msg:"User Already Exists"});let c=await y()({dbFullName:"datasquirel",tableName:"users",data:{first_name:a,last_name:i,email:n,password:e,username:d}});if(!c?.insertId)return r.json({user:null,msg:"Adding User to Database failed"});await f()({userId:c.insertId});let m=o()({data:JSON.stringify({id:c.insertId,email:n,dateCode:Date.now()})});u()({to:n,subject:"Verify Email Address",text:"Please click the link to verify your email address",html:L.readFileSync("./email/send-email-verification-link.html","utf8").replace(/{{host}}/,process.env.DSQL_HOST||"").replace(/{{token}}/,m||"")}).then(e=>{}),"production".match(/production/),c.insertId,c.insertId;let p=process.env.DSQL_STATIC_SERVER_DIR;if(!p)throw console.log("Static File ENV not Found!"),Error("No Static Path");let S=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${c.insertId}`,E=_().join(p,`images/user-images/user-${c.insertId}`);L.mkdirSync(S,{recursive:!0}),L.mkdirSync(E,{recursive:!0}),L.writeFileSync(`${S}/main.json`,JSON.stringify([]),"utf8");let v=_().join(p,`images/user-images/user-${c.insertId}/user-${c.insertId}-profile.jpg`),b=_().join(p,`images/user-images/user-${c.insertId}/user-${c.insertId}-profile-thumbnail.jpg`),D=v.replace(p,process.env.DSQL_STATIC_HOST||""),R=b.replace(p,process.env.DSQL_STATIC_HOST||"");if(L.copyFileSync("./public/images/user-preset.png",v),L.copyFileSync("./public/images/user-preset-thumbnail.png",b),(0,g.execSync)(`chmod 644 ${v} ${b}`),await I()({dbFullName:"datasquirel",tableName:"users",identifierColumnName:"id",identifierValue:c.insertId,data:{image:D,image_thumbnail:R}}),t){let e=await y()({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:t.invite,invited_user_id:c.insertId,database_access:t.database_access,user_priviledge:t.priviledge,user_type:"admin",first_name:a,last_name:i,email:n,username:d,image:D,image_thumbnail:R}});await h()("UPDATE invitations SET invitation_status='Accepted' WHERE inviting_user_id=? AND invited_user_email=?",[t.invite,n]);let r=await h()("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[t.invite,n]);if(await h()("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[t.invite,e.insertId]),r&&r[0]){let s=r[0].db_tables_data.split("|");for(let r=0;r ${e.message}`),m()({component:"/api/registerUser/main-catch-error",message:e.message,user:{first_name:a,last_name:i,email:n}}),r.json({user:null})}}let w=(0,n.M)(t,"default"),x=(0,n.M)(t,"config"),N=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/registerUser",pathname:"/api/registerUser",bundlePath:"",filename:""},userland:t})},5194:(e,r,s)=>{let t=s(47795),a=s(51348),i=s(45356),n=s(47670),l=s(20503),o=s(44900);e.exports=async function({userId:e,useLocal:r}){try{let s=process.env.DSQL_DB_HOST||"127.0.0.1",d=`dsql_user_${e}`,u=t.generate({length:16,numbers:!0,symbols:!0,uppercase:!0,exclude:"*#.'`\""}),c=l({data:u}),m=`CREATE USER IF NOT EXISTS '${d}'@'127.0.0.1' IDENTIFIED BY '${u}'`;r?await o(m):await i(m);let p="UPDATE users SET mariadb_user = ?, mariadb_host = '127.0.0.1', mariadb_pass = ? WHERE id = ?",_=[d,c,e];r?await o(p,_):await a(p,_),await n({tableName:"mariadb_users",data:{user_id:e,username:d,host:s,password:c,primary:"1",grants:'[{"database":"*","table":"*","privileges":["ALL"]}]'},dbContext:"Master",useLocal:r}),console.log(`User ${e} SQL credentials successfully added.`)}catch(e){console.log("Error in adding SQL user in 'addMariadbUser' function =>",e.message)}}},59474:(e,r,s)=>{let t=s(29021),a=s(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:s,html:i,alias:n}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let o=(n?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!t.existsSync("./email/index.html"))return;let d=t.readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,i||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let t={};t.from=`"Datasquirel" <${o}>`,t.sender=o,n&&(t["replyTo "]=o),t.to=e,t.subject=r,t.text=s,t.html=d,l=await a.sendMail(t)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return l}},48225:(e,r,s)=>{let t=s(29021),{IncomingMessage:a}=s(81630);e.exports=async function({user:e,message:r,component:s,noMail:a,req:i}){let n=new Date,l=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],s=i.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],a=s||t||r||i.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=3953,e.ids=[3953],e.modules={47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},68140:(e,r,s)=>{s.r(r),s.d(r,{config:()=>y,default:()=>E,routeModule:()=>h});var t={};s.r(t),s.d(t,{default:()=>v});var a=s(89947),i=s(2706),n=s(96762),l=s(68829),d=s(96052),o=s(67619),u=s(33873),c=s.n(u),m=s(79646),p=s(67580),_=s(48786),g=s(98e3),S=s(30802),f=s(83919);let A=s(29021);async function v(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=e.body,{inviteObject:t}=s,a=s.first_name,i=s.last_name,n=s.email,u=s.password,v=s.username;if(!n.match(/.*@.*\..*/))return r.json({user:null,msg:"Invalid Email"});if(!a.match(/^[a-zA-Z]+$/)||!i.match(/^[a-zA-Z]+$/))return r.json({user:null,msg:"Invalid Name"});if(u?.match(/ /))return r.json({user:null,msg:"Invalid Password"});if(v?.match(/ /))return r.json({user:null,msg:"Invalid Username"});try{let e=(0,f.A)({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:u}),s=await (0,_.A)(`SELECT * FROM users WHERE email='${n}'`);if(s&&s[0])return r.json({user:null,msg:"User Already Exists"});let o=await (0,g.A)({dbFullName:"datasquirel",tableName:"users",data:{first_name:a,last_name:i,email:n,password:e,username:v}});if(!o?.insertId)return r.json({user:null,msg:"Adding User to Database failed"});await (0,p.A)({userId:o.insertId});let E=(0,l.default)({data:JSON.stringify({id:o.insertId,email:n,dateCode:Date.now()})});(0,d.default)({to:n,subject:"Verify Email Address",text:"Please click the link to verify your email address",html:A.readFileSync("./email/send-email-verification-link.html","utf8").replace(/{{host}}/,process.env.DSQL_HOST||"").replace(/{{token}}/,E||"")}).then(e=>{}),"production".match(/production/),o.insertId,o.insertId;let y=process.env.DSQL_STATIC_SERVER_DIR;if(!y)throw console.log("Static File ENV not Found!"),Error("No Static Path");let h=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${o.insertId}`,b=c().join(y,`images/user-images/user-${o.insertId}`);A.mkdirSync(h,{recursive:!0}),A.mkdirSync(b,{recursive:!0}),A.writeFileSync(`${h}/main.json`,JSON.stringify([]),"utf8");let I=c().join(y,`images/user-images/user-${o.insertId}/user-${o.insertId}-profile.jpg`),D=c().join(y,`images/user-images/user-${o.insertId}/user-${o.insertId}-profile-thumbnail.jpg`),L=I.replace(y,process.env.DSQL_STATIC_HOST||""),R=D.replace(y,process.env.DSQL_STATIC_HOST||"");if(A.copyFileSync("./public/images/user-preset.png",I),A.copyFileSync("./public/images/user-preset-thumbnail.png",D),(0,m.execSync)(`chmod 644 ${I} ${D}`),await (0,S.A)({dbFullName:"datasquirel",tableName:"users",identifierColumnName:"id",identifierValue:o.insertId,data:{image:L,image_thumbnail:R}}),t){let e=await (0,g.A)({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:t.invite,invited_user_id:o.insertId,database_access:t.database_access,user_priviledge:t.priviledge,user_type:"admin",first_name:a,last_name:i,email:n,username:v,image:L,image_thumbnail:R}});await (0,_.A)("UPDATE invitations SET invitation_status='Accepted' WHERE inviting_user_id=? AND invited_user_email=?",[t.invite,n]);let r=await (0,_.A)("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[t.invite,n]);if(await (0,_.A)("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[t.invite,e.insertId]),r&&r[0]){let s=r[0].db_tables_data.split("|");for(let r=0;r ${e.message}`),(0,o.default)({component:"/api/registerUser/main-catch-error",message:e.message,user:{first_name:a,last_name:i,email:n}}),r.json({user:null})}}let E=(0,n.M)(t,"default"),y=(0,n.M)(t,"config"),h=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/registerUser",pathname:"/api/registerUser",bundlePath:"",filename:""},userland:t})},67580:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(47795),a=s.n(t),i=s(48786),n=s(47546),l=s(98e3),d=s(68829),o=s(7971);async function u({userId:e,useLocal:r}){try{let s=process.env.DSQL_DB_HOST||"127.0.0.1",t=`dsql_user_${e}`,u=a().generate({length:16,numbers:!0,symbols:!0,uppercase:!0,exclude:"*#.'`\""}),c=(0,d.default)({data:u}),m=`CREATE USER IF NOT EXISTS '${t}'@'127.0.0.1' IDENTIFIED BY '${u}'`;r?await (0,o.A)(m):await (0,n.A)(m);let p="UPDATE users SET mariadb_user = ?, mariadb_host = '127.0.0.1', mariadb_pass = ? WHERE id = ?",_=[t,c,e];r?await (0,o.A)(p,_):await (0,i.A)(p,_),await (0,l.A)({tableName:"mariadb_users",data:{user_id:e,username:t,host:s,password:c,primary:"1",grants:'[{"database":"*","table":"*","privileges":["ALL"]}]'},dbContext:"Master",useLocal:r}),console.log(`User ${e} SQL credentials successfully added.`)}catch(e){console.log("Error in adding SQL user in 'addMariadbUser' function =>",e.message)}}},96052:(e,r,s)=>{s.r(r),s.d(r,{default:()=>l});var t=s(29021),a=s.n(t),i=s(21572);let n=s.n(i)().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 l({to:e,subject:r,text:s,html:t,alias:i,senderName:l}){let d;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let o=(i?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!a().existsSync("./email/index.html"))return;let u=a().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,t||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let t={};t.from=`"${l||"Datasquirel"}" <${o}>`,t.sender=o,i&&(t.replyTo=o),t.to=e,t.subject=r,t.text=s,t.html=u,d=await n.sendMail(t)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return d}},67619:(e,r,s)=>{s.r(r),s.d(r,{default:()=>i});var t=s(29021),a=s.n(t);async function i({user:e,message:r,component:s,noMail:t,req:i}){let n=new Date,l=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],s=i.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],a=s||t||r||i.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let t=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` +Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(t+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(a+=` -URL: ${i.url}`),i?.body&&(a+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),l&&(a+=` -IP: ${l}`),a+=` +User Email: ${e?.email}`),i?.url&&(t+=` +URL: ${i.url}`),i?.body&&(t+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),l&&(t+=` +IP: ${l}`),t+=` Date: ${n.toDateString()} -========================================`,t.existsSync("./.tmp/error.log")||t.writeFileSync("./.tmp/error.log","","utf-8");let o=t.readFileSync("./.tmp/error.log","utf-8");t.writeFileSync("./.tmp/error.log",a),t.appendFileSync("./.tmp/error.log",` +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let d=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",t),a().appendFileSync("./.tmp/error.log",` -${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},14533:(e,r,s)=>{let{createHmac:t}=s(55511);e.exports=function({password:e,encryptionKey:r}){let s=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!s?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=t("sha512",s);return a.update(e),a.digest("base64")}},45356:(e,r,s)=>{let t=s(9973),a=s(21580),i=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function(...e){try{return new Promise((r,s)=>{i.query(...e).then(e=>{i.end(),r(JSON.parse(JSON.stringify(e)))}).catch(e=>{i.end(),r({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[4050],()=>s(3641));module.exports=t})(); \ No newline at end of file +${d}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},83919:(e,r,s)=>{s.d(r,{A:()=>a});var t=s(55511);function a({password:e,encryptionKey:r}){let s=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!s?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=(0,t.createHmac)("sha512",s);return a.update(e),a.digest("base64")}},47546:(e,r,s)=>{s.d(r,{A:()=>t});function t(...e){let r=global.DSQL_DB_CONN;try{return new Promise((s,t)=>{r.query(...e).then(e=>{r.end(),s(JSON.parse(JSON.stringify(e)))}).catch(e=>{r.end(),s({error:e.message,sql:e.sql})})})}catch(e){return{success:!1,error:e.message}}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[1251],()=>s(68140));module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/registerUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/registerUser.js.nft.json index d0b5852..8710289 100644 --- a/dsql-app/.local_dist/server/pages/api/registerUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/registerUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/generate-password/main.js","../../../../node_modules/generate-password/package.json","../../../../node_modules/generate-password/src/generate.js","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/generate-password/main.js","../../../../node_modules/generate-password/package.json","../../../../node_modules/generate-password/src/generate.js","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/renameMedia.js b/dsql-app/.local_dist/server/pages/api/renameMedia.js index e70da49..7749c12 100644 --- a/dsql-app/.local_dist/server/pages/api/renameMedia.js +++ b/dsql-app/.local_dist/server/pages/api/renameMedia.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=8103,e.ids=[8103],e.modules={27825:e=>{e.exports=require("lodash")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},17499:(e,r,t)=>{t.r(r),t.d(r,{config:()=>$,default:()=>g,routeModule:()=>v});var s={};t.r(s),t.d(s,{default:()=>h});var n=t(89947),a=t(2706),i=t(96762),o=t(6420),l=t.n(o),c=t(48225),u=t.n(c),d=t(51348),_=t.n(d);t(33873);var p=t(48227),m=t.n(p),S=t(27825),f=t.n(S);let E=t(29021);async function h(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body.mediaObject,n=e.body.newName,a=e.body.newThumbnailName,i=e.body.replace;try{"production".match(/production/);let e=s.media_url.match(/\..{3,4}$/)[0],o=s?.private==1;if(!process.env.DSQL_STATIC_SERVER_DIR)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let l=m()({isPrivate:o,userId:t.id,folder:s.folder?s.folder+"/":"",video:!!s.media_type?.match(/video/i)});if(!l)throw Error("Couldn't grab paths!");let{fileRootPath:c,urlRootPath:u,relativePath:d}=l,p=`${c}${s.media_name}${e}`,S=`${c}${n}${e}`,h=`${c}${s.media_name}_thumbnail${e}`,g=`${c}${n}_thumbnail${e}`,$=new RegExp(f().escapeRegExp(`${s.media_name}`)),v=s.media_url.replace($,n),y=s.media_url.replace($,n+"_thumbnail"),D=s.media_path?s.media_path.replace($,n):`${d}${n}`,P=s.media_thumbnail_path?s.media_thumbnail_path.replace($,n):`${d}${a}`;if(E.existsSync(S)&&!i)return r.json({success:!1,msg:"File already exists"});E.renameSync(p,S);try{E.renameSync(h,g)}catch(e){}await _()("UPDATE user_media SET media_name = ?, media_url = ?, media_thumbnail_url = ?, media_path = ?, media_thumbnail_path = ? WHERE id = ?",[n,v,y,D,P,s.id]),r.json({success:!0})}catch(e){console.log("Error in renaming media =>",e.message),u()({component:"/api/renameMedia/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Renaming failed. Please try again."})}}let g=(0,i.M)(s,"default"),$=(0,i.M)(s,"config"),v=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/renameMedia",pathname:"/api/renameMedia",bundlePath:"",filename:""},userland:s})},48227:(e,r,t)=>{let s=t(29021),n=t(33873);e.exports=function({isPrivate:e,userId:r,folder:t,video:a,pathOnly:i}){"production".match(/production/);let o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)return console.log("Static File ENV not Found!"),null;let l=e?`@/${a?"videos":"media"}/${t?t+"/":""}`:a?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,c=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:n.join(o,l);return s.existsSync(c)||i||s.mkdirSync(c,{recursive:!0}),{fileRootPath:c,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${l}`,relativePath:l}}},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),i=t(31341);async function o(e,r,t,o){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=n}}},48225:(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 i=new Date,o=(()=>{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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8103,e.ids=[8103],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},8639:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>f,routeModule:()=>S});var n={};t.r(n),t.d(n,{default:()=>p});var i=t(89947),a=t(2706),s=t(96762),o=t(69842),l=t(67619),u=t(48786),c=t(45185),d=t(27825),_=t.n(d);let m=t(29021);async function p(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,o.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let n=e.body.mediaObject,i=e.body.newName,a=e.body.newThumbnailName,s=e.body.replace;try{"production".match(/production/);let e=n.media_url.match(/\..{3,4}$/)[0],o=n?.private==1;if(!process.env.DSQL_STATIC_SERVER_DIR)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let l=(0,c.A)({isPrivate:o,userId:t.id,folder:n.folder?n.folder+"/":"",video:!!n.media_type?.match(/video/i)});if(!l)throw Error("Couldn't grab paths!");let{fileRootPath:d,urlRootPath:p,relativePath:f}=l,E=`${d}${n.media_name}${e}`,S=`${d}${i}${e}`,h=`${d}${n.media_name}_thumbnail${e}`,g=`${d}${i}_thumbnail${e}`,y=new RegExp(_().escapeRegExp(`${n.media_name}`)),$=n.media_url.replace(y,i),A=n.media_url.replace(y,i+"_thumbnail"),v=n.media_path?n.media_path.replace(y,i):`${f}${i}`,P=n.media_thumbnail_path?n.media_thumbnail_path.replace(y,i):`${f}${a}`;if(m.existsSync(S)&&!s)return r.json({success:!1,msg:"File already exists"});m.renameSync(E,S);try{m.renameSync(h,g)}catch(e){}await (0,u.A)("UPDATE user_media SET media_name = ?, media_url = ?, media_thumbnail_url = ?, media_path = ?, media_thumbnail_path = ? WHERE id = ?",[i,$,A,v,P,n.id]),r.json({success:!0})}catch(e){console.log("Error in renaming media =>",e.message),(0,l.default)({component:"/api/renameMedia/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Renaming failed. Please try again."})}}let f=(0,s.M)(n,"default"),E=(0,s.M)(n,"config"),S=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/renameMedia",pathname:"/api/renameMedia",bundlePath:"",filename:""},userland:n})},45185:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(29021),i=t.n(n),a=t(33873),s=t.n(a);function o({isPrivate:e,userId:r,folder:t,video:n,pathOnly:a}){"production".match(/production/);let o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)return console.log("Static File ENV not Found!"),null;let l=e?`@/${n?"videos":"media"}/${t?t+"/":""}`:n?`/videos/user-videos/user-${r}/${t?t+"/":""}`:`/images/user-images/user-${r}/${t?t+"/":""}`,u=e?`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r}/media/${t?t+"/":""}`:s().join(o,l);return i().existsSync(u)||a||i().mkdirSync(u,{recursive:!0}),{fileRootPath:u,urlRootPath:e?`@/media/${t?t+"/":""}`:`${process.env.DSQL_STATIC_HOST}${l}`,relativePath:l}}},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),i=t(95969),a=t(29021),s=t.n(a),o=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,i.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!s().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),s=r;e?.userId&&(s+=`user_${e.userId}_`),a&&(s+=`${a}_`),s+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:s,csrfCookieName:o,oneTimeCodeName:l+=i}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var n=t(29021),i=t.n(n);async function a({user:e,message:r,component:t,noMail:n,req:a}){let s=new Date,o=(()=>{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],i=t||n||r||a.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} @@ -7,10 +7,10 @@ User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(n+=` IP: ${o}`),n+=` -Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Date: ${s.toDateString()} +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let l=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",n),i().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(i,o,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=17499);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),i=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,s=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!s?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(a,s,o),u=i.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=8639);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/renameMedia.js.nft.json b/dsql-app/.local_dist/server/pages/api/renameMedia.js.nft.json index cc084fc..8ea429a 100644 --- a/dsql-app/.local_dist/server/pages/api/renameMedia.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/renameMedia.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js b/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js index 70d420d..f6c125e 100644 --- a/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js +++ b/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9659,e.ids=[9659],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},55961:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>l,routeModule:()=>d});var t={};s.r(t),s.d(t,{default:()=>c});var n=s(89947),o=s(2706),a=s(96762),i=s(6420),u=s.n(i);async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await u()(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{userId:s,dbSlug:t}=e.body,n=`${process.env.DSQL_USER_DB_PREFIX}${s}_${t}`,o=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${n}`;r.setHeader("Set-Cookie",[`${o}=null;path=/;max-age=0`]),r.json({success:!0,msg:"Processed Successfully"})}let l=(0,a.M)(t,"default"),_=(0,a.M)(t,"config"),d=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/resetDelegatedDatabaseToken",pathname:"/api/resetDelegatedDatabaseToken",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),n=s(72835),o=s(29021),a=s(31341);async function i(e,r,s,i){let{keyCookieName:u,csrfCookieName:c}=a();if(!e.cookies?.[u]?.match(/./))return null;let l=n({encryptedString:e.cookies[u]});if(!l)return null;let _=JSON.parse(l);if(!_.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!o.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=t;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:u+=n}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",t(a,i,u),o.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),o=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=55961);module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9659,e.ids=[9659],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},52262:(e,r,t)=>{t.r(r),t.d(r,{config:()=>l,default:()=>c,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>u});var s=t(89947),i=t(2706),o=t(96762),a=t(69842);async function u(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await (0,a.A)(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{userId:t,dbSlug:n}=e.body,s=`${process.env.DSQL_USER_DB_PREFIX}${t}_${n}`,i=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${s}`;r.setHeader("Set-Cookie",[`${i}=null;path=/;max-age=0`]),r.json({success:!0,msg:"Processed Successfully"})}let c=(0,o.M)(n,"default"),l=(0,o.M)(n,"config"),_=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/resetDelegatedDatabaseToken",pathname:"/api/resetDelegatedDatabaseToken",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),a=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,a.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let l=JSON.parse(c);if(!l.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(l.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${_}/${l.csrf_k}`))return null;if(0==l.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${l.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return l?.date&&Date.now()-l.date>6048e5?null:l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:u+=s}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(i,o,a),c=s.Buffer.alloc(16,0),l=(0,n.createDecipheriv)("aes-192-cbc",u,c);try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=52262);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js.nft.json b/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/resetDelegatedDatabaseToken.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/resetPassword.js b/dsql-app/.local_dist/server/pages/api/resetPassword.js index 2c88431..4a170c5 100644 --- a/dsql-app/.local_dist/server/pages/api/resetPassword.js +++ b/dsql-app/.local_dist/server/pages/api/resetPassword.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9971,e.ids=[9971],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},24127:(e,r,t)=>{t.r(r),t.d(r,{config:()=>P,default:()=>l,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>d});var n=t(89947),o=t(2706),i=t(96762),a=t(14533),u=t.n(a),c=t(51348),p=t.n(c);async function d(e,r){if("GET"!==e.method)return r.json({msg:"UNauthorized"});{let{email:t,password:s}=e.query,n=u()({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:String(s)}),o=await p()(`UPDATE users SET password='${n}' WHERE email='${t}'`);r.json({success:!!o?.affectedRows})}}let l=(0,i.M)(s,"default"),P=(0,i.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/resetPassword",pathname:"/api/resetPassword",bundlePath:"",filename:""},userland:s})},14533:(e,r,t)=>{let{createHmac:s}=t(55511);e.exports=function({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let n=s("sha512",t);return n.update(e),n.digest("base64")}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=24127);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9971,e.ids=[9971],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},55511:e=>{e.exports=require("crypto")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},23297:(e,r,t)=>{t.r(r),t.d(r,{config:()=>P,default:()=>c,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>d});var o=t(89947),i=t(2706),a=t(96762),s=t(83919),u=t(48786);async function d(e,r){if("GET"!==e.method)return r.json({msg:"UNauthorized"});{let{email:t,password:n}=e.query,o=(0,s.A)({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:String(n)}),i=await (0,u.A)(`UPDATE users SET password='${o}' WHERE email='${t}'`);r.json({success:!!i?.affectedRows})}}let c=(0,a.M)(n,"default"),P=(0,a.M)(n,"config"),f=new o.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/resetPassword",pathname:"/api/resetPassword",bundlePath:"",filename:""},userland:n})},83919:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(55511);function o({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let o=(0,n.createHmac)("sha512",t);return o.update(e),o.digest("base64")}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=23297);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/resetPassword.js.nft.json b/dsql-app/.local_dist/server/pages/api/resetPassword.js.nft.json index b336c6f..caebdcf 100644 --- a/dsql-app/.local_dist/server/pages/api/resetPassword.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/resetPassword.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js b/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js index 8ee67f3..50c8d75 100644 --- a/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js +++ b/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8563,e.ids=[8563],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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},83469:(e,r,s)=>{s.r(r),s.d(r,{config:()=>f,default:()=>S,routeModule:()=>D});var t={};s.r(t),s.d(t,{default:()=>p});var n=s(89947),a=s(2706),o=s(96762),c=s(6420),i=s.n(c),l=s(48225),u=s.n(l),_=s(57638),d=s.n(_);async function p(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=await i()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{database:t,query:n,tables:a}=e.body;try{let e=await d()({database:`datasquirel_user_${s.id}_${t}`,queryString:n});if(!e)return r.json({success:!1,msg:"Query Failed!"});r.json({success:!0,result:e})}catch(e){u()({component:"/api/runUserDbQuery/main-catch-error",message:e.message,user:s}),r.json({success:!1})}}s(29021);let S=(0,o.M)(t,"default"),f=(0,o.M)(t,"config"),D=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/runUserDbQuery",pathname:"/api/runUserDbQuery",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),n=s(72835),a=s(29021),o=s(31341);async function c(e,r,s,c){let{keyCookieName:i,csrfCookieName:l}=o();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a.existsSync(`${d}/${_.csrf_k}`))return null;if(0==_.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let c=r;e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),c+=t;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:c,oneTimeCodeName:i+=n}}},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,s)=>{let t=s(72835),n=s(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let s=[];try{for(let a=0;a",r.message),e}}},48225:(e,r,s)=>{let t=s(29021),{IncomingMessage:n}=s(81630);e.exports=async function({user:e,message:r,component:s,noMail:n,req:a}){let o=new Date,c=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],r=a.headers["x-real-ip"],s=a.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||t||r||a.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8563,e.ids=[8563],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},51397:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>u});var s=t(89947),a=t(2706),o=t(96762),l=t(69842),i=t(67619),c=t(30944);async function u(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,l.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{database:n,query:s,tables:a}=e.body;try{let e=await (0,c.A)({database:`datasquirel_user_${t.id}_${n}`,queryString:s});if(!e)return r.json({success:!1,msg:"Query Failed!"});r.json({success:!0,result:e})}catch(e){(0,i.default)({component:"/api/runUserDbQuery/main-catch-error",message:e.message,user:t}),r.json({success:!1})}}t(29021);let d=(0,o.M)(n,"default"),_=(0,o.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/runUserDbQuery",pathname:"/api/runUserDbQuery",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(48786),s=t(95969),a=t(29021),o=t.n(a),l=t(89159);async function i(e,r,t){let{keyCookieName:a,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[a]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[a]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=n;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function a({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},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,l=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${s}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),c&&(n+=` -IP: ${c}`),n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` Date: ${o.toDateString()} -========================================`,t.existsSync("./.tmp/error.log")||t.writeFileSync("./.tmp/error.log","","utf-8");let i=t.readFileSync("./.tmp/error.log","utf-8");t.writeFileSync("./.tmp/error.log",n),t.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let i=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,s)=>{s(29021);let t=s(6061),n=s(48225),a=s(51348),o=s(21339),c=s(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:s,tableSchema:i,useLocal:l}){let u;let _=!!l||!!s?.match(/^datasquirel$/),d=l?c:_?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?_?await d(e,r):await d({paradigm:"Full Access",database:s,queryString:e,queryValues:r}):_?await d(e):await d({paradigm:"Full Access",database:s,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await t({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",s,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:n}=s(55511),{Buffer:a}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=s||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",t(o,c,i),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,s)=>{let t=s(9973),n=s(21580),a=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,s)=>{let t=s(29021);s(33873);let n=s(9973),a=s(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:s,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function d(e){o.end(),i({error:e.message,queryStringGenerated:s,queryValuesGenerated:c,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),c&&Array.isArray(c)&&c[0]?o.query(s,c).then(_).catch(d):o.query(s).then(_).catch(d)}catch(e){t.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,s)=>{let t=s(9973),n=s(21580);async function a(...e){let r=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let s=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=83469);module.exports=s})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(43775),s=t(67619),a=t(48786),o=t(37275),l=t(7971);async function i({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?l.A:d?a.A:o.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await (0,n.A)({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,n.scryptSync)(a,o,l),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",i,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function l(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=51397);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js.nft.json b/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js.nft.json index b336c6f..f600743 100644 --- a/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/runUserDbQuery.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js b/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js index 6acee78..db257ee 100644 --- a/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js +++ b/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7714,e.ids=[7714],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},11074:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>d,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),i=t(2706),o=t(96762),a=t(6420),c=t.n(a);let l=t(29021),u=t(59474),_=t(20503);async function p(e,r){if("GET"===e.method){let t=await c()(e,r);if(!t)return r.redirect(307,"/logout");let s=_({data:JSON.stringify({id:t.id,email:t.email,dateCode:Date.now()})}),n=process.env.DSQL_HOST;if(!await u({to:t.email,subject:"Verify Email Address",text:"Please click the link to verify your email address",html:l.readFileSync("./email/send-email-verification-link.html","utf8").replace(/{{host}}/,n||"").replace(/{{token}}/,s||"")}))return r.json({success:!1});r.json({success:!0})}}let d=(0,o.M)(s,"default"),S=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/sendEmailVerificationLink",pathname:"/api/sendEmailVerificationLink",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),i=t(29021),o=t(31341);async function a(e,r,t,a){let{keyCookieName:c,csrfCookieName:l}=o();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),i&&(c+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:c+=n}}},59474:(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:i,alias:o}){let a;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let c=(o?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!s.existsSync("./email/index.html"))return;let l=s.readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,i||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"Datasquirel" <${c}>`,s.sender=c,o&&(s["replyTo "]=c),s.to=e,s.subject=r,s.text=t,s.html=l,a=await n.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return a}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,a,c),i.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=n("aes-192-cbc",s(o,a,c),i.alloc(16,0));try{let r=l.update(e,"utf8","hex");return r+=l.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=11074);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7714,e.ids=[7714],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},10942:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>d,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>_});var s=t(89947),i=t(2706),o=t(96762),a=t(69842);let l=t(29021),c=t(96052),u=t(68829);async function _(e,r){if("GET"===e.method){let t=await (0,a.A)(e,r);if(!t)return r.redirect(307,"/logout");let n=u({data:JSON.stringify({id:t.id,email:t.email,dateCode:Date.now()})}),s=process.env.DSQL_HOST;if(!await c({to:t.email,subject:"Verify Email Address",text:"Please click the link to verify your email address",html:l.readFileSync("./email/send-email-verification-link.html","utf8").replace(/{{host}}/,s||"").replace(/{{token}}/,n||"")}))return r.json({success:!1});r.json({success:!0})}}let d=(0,o.M)(n,"default"),f=(0,o.M)(n,"config"),p=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/sendEmailVerificationLink",pathname:"/api/sendEmailVerificationLink",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),i=t(29021),o=t.n(i),a=t(89159);async function l(e,r,t){let{keyCookieName:i,csrfCookieName:l}=(0,a.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[i]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${_}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:l+=s}}},96052:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var n=t(29021),s=t.n(n),i=t(21572);let o=t.n(i)().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 a({to:e,subject:r,text:t,html:n,alias:i,senderName:a}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let c=(i?.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=`"${a||"Datasquirel"}" <${c}>`,n.sender=c,i&&(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}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(i,o,a),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var n=t(55511),s=t(79428);function i({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,a=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,n.scryptSync)(i,o,a),c=s.Buffer.alloc(16,0),u=(0,n.createCipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"utf8","hex");return r+=u.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=10942);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js.nft.json b/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js.nft.json index 78233fa..5000d59 100644 --- a/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/sendEmailVerificationLink.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js b/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js index e1bedbc..b49cd4f 100644 --- a/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js +++ b/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2655,e.ids=[2655],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},67136:(e,t,r)=>{r.r(t),r.d(t,{config:()=>f,default:()=>m,routeModule:()=>A});var s={};r.r(s),r.d(s,{default:()=>d});var n=r(89947),o=r(2706),i=r(96762),a=r(91766),l=r.n(a);let c=r(29021),u=r(59474),p=r(20503);async function d(e,t){if("GET"===e.method){let r=p({data:JSON.stringify({email:e.query.email,dateCode:Date.now()})}),s=process.env.DSQL_HOST,n=e.query.email;if(!String(n).match(/.*@.*\..*/))return t.json({user:null,msg:"Invalid Email"});let o=e.headers["x-real-ip"]||e.headers["x-forwarded-for"]||e.connection.remoteAddress,i=process.env.DSQL_HOST||"https://datasquirel.com",a=await u({to:e.query.email?.toString()||process.env.DSQL_CONTACT_EMAIL,subject:"Reset Your Password",text:"Please click the link to reset your password",html:c.readFileSync("./email/send-password-reset-link.html","utf8").replace(/{{host}}/,s||"").replace(/{{ip}}/,String(o)).replace(/{{token}}/,r||""),alias:"Support"});if(await l()(),u({to:process.env.DSQL_CONTACT_EMAIL,subject:`Password Reset Attempt for ${n}`,html:`

${n} tried to reset password

${n} attempted a password reset on ${i} from ${o} with a wrong password.

`}),!a)return t.json({success:!1});t.json({success:!0})}}let m=(0,i.M)(s,"default"),f=(0,i.M)(s,"config"),A=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/sendPasswordResetLink",pathname:"/api/sendPasswordResetLink",bundlePath:"",filename:""},userland:s})},91766:e=>{e.exports=async function(e){return await new Promise((t,r)=>{setTimeout(()=>{t(!0)},e||1e3)}),!0}},59474:(e,t,r)=>{let s=r(29021),n=r(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:t,text:r,html:o,alias:i}){let a;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let l=(i?.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}}/,o||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"Datasquirel" <${l}>`,s.sender=l,i&&(s["replyTo "]=l),s.to=e,s.subject=t,s.text=r,s.html=c,a=await n.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return a}},20503:(e,t,r)=>{let{scryptSync:s,createCipheriv:n}=r(55511),{Buffer:o}=r(79428);e.exports=({data:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let i=t||process.env.DSQL_ENCRYPTION_PASSWORD,a=r||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=n("aes-192-cbc",s(i,a,l),o.alloc(16,0));try{let t=c.update(e,"utf8","hex");return t+=c.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},2706:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=t(t.s=67136);module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2655,e.ids=[2655],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},47601:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>d,routeModule:()=>m});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),o=t(2706),a=t(96762),i=t(2416);let l=t(29021),c=t(96052),u=t(68829);async function p(e,r){if("GET"===e.method){let t=u({data:JSON.stringify({email:e.query.email,dateCode:Date.now()})}),s=process.env.DSQL_HOST,n=e.query.email;if(!String(n).match(/.*@.*\..*/))return r.json({user:null,msg:"Invalid Email"});let o=e.headers["x-real-ip"]||e.headers["x-forwarded-for"]||e.connection.remoteAddress,a=process.env.DSQL_HOST||"https://datasquirel.com",p=await c({to:e.query.email?.toString()||process.env.DSQL_CONTACT_EMAIL,subject:"Reset Your Password",text:"Please click the link to reset your password",html:l.readFileSync("./email/send-password-reset-link.html","utf8").replace(/{{host}}/,s||"").replace(/{{ip}}/,String(o)).replace(/{{token}}/,t||""),alias:"Support"});if(await (0,i.A)(),c({to:process.env.DSQL_CONTACT_EMAIL,subject:`Password Reset Attempt for ${n}`,html:`

${n} tried to reset password

${n} attempted a password reset on ${a} from ${o} with a wrong password.

`}),!p)return r.json({success:!1});r.json({success:!0})}}let d=(0,a.M)(s,"default"),f=(0,a.M)(s,"config"),m=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/sendPasswordResetLink",pathname:"/api/sendPasswordResetLink",bundlePath:"",filename:""},userland:s})},2416:(e,r,t)=>{t.d(r,{A:()=>s});async function s(e){return await new Promise((r,t)=>{setTimeout(()=>{r(!0)},e||1e3)}),!0}},96052:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var s=t(29021),n=t.n(s),o=t(21572);let a=t.n(o)().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:s,alias:o,senderName:i}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let c=(o?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!n().existsSync("./email/index.html"))return;let u=n().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,s||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"${i||"Datasquirel"}" <${c}>`,s.sender=c,o&&(s.replyTo=c),s.to=e,s.subject=r,s.text=t,s.html=u,l=await a.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return l}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var s=t(55511),n=t(79428);function o({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,s.scryptSync)(o,a,i),c=n.Buffer.alloc(16,0),u=(0,s.createCipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"utf8","hex");return r+=u.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=47601);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js.nft.json b/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js.nft.json index a849a3c..5000d59 100644 --- a/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/sendPasswordResetLink.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js b/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js index e62176d..b235363 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js +++ b/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=8464,e.ids=[8464],e.modules={47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},62914:(e,r,a)=>{a.r(r),a.d(r,{config:()=>g,default:()=>f,routeModule:()=>q});var t={};a.r(t),a.d(t,{default:()=>m});var i=a(89947),s=a(2706),o=a(96762),l=a(20503),u=a.n(l),n=a(14385),p=a.n(n),d=a(31341),c=a.n(d);async function m(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let{facebookUserId:a,facebookUserImage:t,facebookUserFullName:i,facebookUserFirstName:s,facebookUserLastName:o,facebookUserEmail:l,supEmail:n}=e.body,{invite:d}=e.query;try{let e=await p()({email:l,payload:{email:l,first_name:s,last_name:o,social_id:a,social_platform:"facebook",image:t,image_thumbnail:t,username:`facebook-user-${a}`},social_platform:"facebook",social_id:a,invitation:d,supEmail:n});if(e.payload?.csrf_k){let a=u()({data:JSON.stringify(e.payload)}),{keyCookieName:t,csrfCookieName:i}=c()();r.setHeader("Set-Cookie",[`${t}=${a};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${i}=${e.payload.csrf_k};samesite=strict;path=/;HttpOnly=true`])}r.json(e)}catch(e){console.log(e.message),r.json({success:!1,msg:"Failed!"})}}let f=(0,o.M)(t,"default"),g=(0,o.M)(t,"config"),q=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/social-login/facebook-auth",pathname:"/api/social-login/facebook-auth",bundlePath:"",filename:""},userland:t})}};var r=require("../../../webpack-api-runtime.js");r.C(e);var a=e=>r(r.s=e),t=r.X(0,[4050,4385],()=>a(62914));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8464,e.ids=[8464],e.modules={47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},21435:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>p,routeModule:()=>c});var a={};s.r(a),s.d(a,{default:()=>n});var t=s(89947),o=s(2706),i=s(96762),u=s(68829),l=s(83704),d=s(89159);async function n(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let{facebookUserId:s,facebookUserImage:a,facebookUserFullName:t,facebookUserFirstName:o,facebookUserLastName:i,facebookUserEmail:n,supEmail:p}=e.body,{invite:_}=e.query;try{let e=await (0,l.A)({email:n,payload:{email:n,first_name:o,last_name:i,social_id:s,social_platform:"facebook",image:a,image_thumbnail:a,username:`facebook-user-${s}`},social_platform:"facebook",social_id:s,invitation:_,supEmail:p});if(e.payload?.csrf_k){let s=(0,u.default)({data:JSON.stringify(e.payload)}),{keyCookieName:a,csrfCookieName:t}=(0,d.A)();r.setHeader("Set-Cookie",[`${a}=${s};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${t}=${e.payload.csrf_k};samesite=strict;path=/;HttpOnly=true`])}r.json(e)}catch(e){console.log(e.message),r.json({success:!1,msg:"Failed!"})}}let p=(0,i.M)(a,"default"),_=(0,i.M)(a,"config"),c=new t.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/facebook-auth",pathname:"/api/social-login/facebook-auth",bundlePath:"",filename:""},userland:a})},89159:(e,r,s)=>{s.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let u=r;e?.userId&&(u+=`user_${e.userId}_`),o&&(u+=`${o}_`),u+=a;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:i,csrfCookieName:u,oneTimeCodeName:l+=t}}}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),a=r.X(0,[1251,3704],()=>s(21435));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js.nft.json b/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js.nft.json index d002479..83e603c 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/social-login/facebook-auth.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js b/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js index a70ae03..0c2ca6c 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js +++ b/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7551,e.ids=[7551],e.modules={47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},79551:e=>{e.exports=require("url")},13337:(e,t,r)=>{r.r(t),r.d(t,{config:()=>b,default:()=>_,routeModule:()=>q});var s={};r.r(s),r.d(s,{default:()=>f});var i=r(89947),o=r(2706),a=r(96762),n=r(20503),l=r.n(n),u=r(14385),c=r.n(u),p=r(84930),h=r.n(p),m=r(31341),d=r.n(m);let g=r(67684);async function f(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});let{code:r,email:s,invite:i}=e.query;try{let e=await g({code:r?.toString()||"",clientId:process.env.DSQL_GITHUB_ID||"",clientSecret:process.env.DSQL_GITHUB_SECRET||""});if(!e)return t.json({success:!1,msg:"No github user returned"});if(!e?.email&&!s)return t.json({success:!1,msg:"Github User Email not present"});let o=await c()({email:e.email,payload:{email:e.email,first_name:h()(e.login)?.split(" ")[0],last_name:h()(e.login)?.split(" ")[1],social_id:e.id,social_platform:"github",image:e.avatar_url,image_thumbnail:e.avatar_url,username:"github-user-"+e.name},social_platform:"github",invitation:i,social_id:e.id,supEmail:s?s.toString():void 0});if(o.payload?.csrf_k){let e=l()({data:JSON.stringify(o.payload)}),{keyCookieName:r,csrfCookieName:s}=d()();t.setHeader("Set-Cookie",[`${r}=${e};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${s}=${o.payload.csrf_k};samesite=strict;path=/;HttpOnly=true`])}t.json(o)}catch(e){console.log("ERROR in 'github-auth' API route =>",e.message),t.json({success:!1,msg:"Failed!"})}}let _=(0,a.M)(s,"default"),b=(0,a.M)(s,"config"),q=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/github-auth",pathname:"/api/social-login/github-auth",bundlePath:"",filename:""},userland:s})},67684:(e,t,r)=>{let s=r(51348),i=r(83634);e.exports=async function({code:e,clientId:t,clientSecret:r}){let o;try{let a=await i({method:"POST",hostname:"github.com",path:`/login/oauth/access_token?client_id=${t}&client_secret=${r}&code=${e}`,headers:{Accept:"application/json","User-Agent":"*"},scheme:"https"}),n=JSON.parse(a);if(!n?.access_token)return o;let l=await i({method:"GET",hostname:"api.github.com",path:"/user",headers:{Authorization:`Bearer ${n.access_token}`,"User-Agent":"*"},scheme:"https"});if(o=JSON.parse(l),!o?.email&&o){let e=await s(`SELECT email FROM users WHERE social_login='1' AND social_platform='github' AND social_id='${o.id}'`);e&&e[0]&&(o.email=e[0].email)}}catch(e){console.log("ERROR in githubLogin.js backend function =>",e.message)}return o}},83634:(e,t,r)=>{let s=r(55591),i=r(81630),{URL:o}=r(79551);e.exports=function({url:e,method:t,hostname:r,path:a,headers:n,body:l,port:u,scheme:c}){let p=l?JSON.stringify(l):null,h=e?new o(e):null,m={method:t||"GET",hostname:h?h.hostname:r,port:c?.match(/https/i)?443:h?h.protocol?.match(/https/i)?443:h.port:u?Number(u):80,headers:{}};return a&&(m.path=a),n&&(m.headers=n),l&&(m.headers["Content-Type"]="application/json",m.headers["Content-Length"]=p?Buffer.from(p).length:void 0),new Promise((e,t)=>{let r=(c?.match(/https/i)?s:h?.protocol?.match(/https/i)?s:i).request(m,r=>{var s="";r.on("data",function(e){s+=e}),r.on("end",function(){e(s)}),r.on("error",e=>{console.log("HTTP response error =>",e.message),t(`HTTP response error =>, ${e.message}`)}),r.on("close",()=>{console.log("HTTP(S) Response Closed Successfully")})});l&&r.write(p),r.on("error",e=>{console.log("HTTPS request ERROR =>",e.message),t(`HTTP request error =>, ${e.message}`)}),r.end()})}},84930:e=>{e.exports=function(e){if(!e?.match(/./))return"";if(e?.match(/ /))return e;if(!e)return null;{let t=e.split(""),r=[];for(let e=0;et(t.s=e),s=t.X(0,[4050,4385],()=>r(13337));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7551,e.ids=[7551],e.modules={47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},79551:e=>{e.exports=require("url")},63086:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>m,routeModule:()=>_});var s={};r.r(s),r.d(s,{default:()=>d});var a=r(89947),i=r(2706),o=r(96762),n=r(68829),l=r(83704);function u(e){if(!e?.match(/./))return"";if(e?.match(/ /))return e;if(!e)return null;{let t=e.split(""),r=[];for(let e=0;e",e.message),t.json({success:!1,msg:"Failed!"})}}let m=(0,o.M)(s,"default"),h=(0,o.M)(s,"config"),_=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/social-login/github-auth",pathname:"/api/social-login/github-auth",bundlePath:"",filename:""},userland:s})},2402:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var s=r(48786),a=r(61556);async function i({code:e,clientId:t,clientSecret:r}){let i;try{let o=await (0,a.A)({method:"POST",hostname:"github.com",path:`/login/oauth/access_token?client_id=${t}&client_secret=${r}&code=${e}`,headers:{Accept:"application/json","User-Agent":"*"},scheme:"https"}),n=JSON.parse(o);if(!n?.access_token)return i;let l=await (0,a.A)({method:"GET",hostname:"api.github.com",path:"/user",headers:{Authorization:`Bearer ${n.access_token}`,"User-Agent":"*"},scheme:"https"});if(i=JSON.parse(l),!i?.email&&i){let e=await (0,s.A)(`SELECT email FROM users WHERE social_login='1' AND social_platform='github' AND social_id='${i.id}'`);e&&e[0]&&(i.email=e[0].email)}}catch(e){console.log("ERROR in githubLogin.ts backend function =>",e.message)}return i}},89159:(e,t,r)=>{r.d(t,{A:()=>s});function s(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=r;let n=t;e?.userId&&(n+=`user_${e.userId}_`),i&&(n+=`${i}_`),n+=s;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:o,csrfCookieName:n,oneTimeCodeName:l+=a}}},61556:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(55591),a=r.n(s),i=r(81630),o=r.n(i),n=r(79551);function l({url:e,method:t,hostname:r,path:s,headers:i,body:l,port:u,scheme:c}){let p=l?JSON.stringify(l):null,d=e?new n.URL(e):null,m={method:t||"GET",hostname:d?d.hostname:r,port:c?.match(/https/i)?443:d?d.protocol?.match(/https/i)?443:d.port:u?Number(u):80,headers:{}};return s&&(m.path=s),i&&(m.headers=i),l&&(m.headers["Content-Type"]="application/json",m.headers["Content-Length"]=p?Buffer.from(p).length:void 0),new Promise((e,t)=>{let r=(c?.match(/https/i)?a():d?.protocol?.match(/https/i)?a():o()).request(m,r=>{var s="";r.on("data",function(e){s+=e}),r.on("end",function(){e(s)}),r.on("error",e=>{console.log("HTTP response error =>",e.message),t(`HTTP response error =>, ${e.message}`)}),r.on("close",()=>{console.log("HTTP(S) Response Closed Successfully")})});l&&r.write(p),r.on("error",e=>{console.log("HTTPS request ERROR =>",e.message),t(`HTTP request error =>, ${e.message}`)}),r.end()})}}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[1251,3704],()=>r(63086));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js.nft.json b/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js.nft.json index d002479..83e603c 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/social-login/github-auth.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js b/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js index 6dd82fc..fdccd39 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js +++ b/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7867,e.ids=[7867],e.modules={47795:e=>{e.exports=require("generate-password")},76154:e=>{e.exports=require("google-auth-library")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},50293:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>f,routeModule:()=>h});var a={};t.r(a),t.d(a,{default:()=>c});var i=t(89947),o=t(2706),s=t(96762),l=t(20503),n=t.n(l),u=t(14385),d=t.n(u),p=t(31341),g=t.n(p);let{OAuth2Client:m}=t(76154);async function c(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=e.body,{invite:a}=e.query,{token:i}=t;try{let e=new m(""),t=(await e.verifyIdToken({idToken:i,audience:""})).getPayload();if(!t||!t.email_verified){r.json({user:null,msg:"Invalid Credentials"});return}let{given_name:o,family_name:s,email:l,sub:u,picture:p,email_verified:c}=t;if(!l)throw Error("No Email");let f=await d()({email:l,payload:{email:l,first_name:o,last_name:s,social_id:u,social_platform:"google",image:p,image_thumbnail:p,username:`google-user-${u}`},social_platform:"google",social_id:u,invitation:a});if(f.payload?.csrf_k){let e=n()({data:JSON.stringify(f.payload)}),{keyCookieName:t,csrfCookieName:a}=g()();r.setHeader("Set-Cookie",[`${t}=${e};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${a}=${f.payload.csrf_k};samesite=strict;path=/;HttpOnly=true`])}r.json(f)}catch(e){console.log(e.message),r.json({success:!1,msg:"Failed!"})}}t(48225);let f=(0,s.M)(a,"default"),y=(0,s.M)(a,"config"),h=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/google-auth",pathname:"/api/social-login/google-auth",bundlePath:"",filename:""},userland:a})}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[4050,4385],()=>t(50293));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7867,e.ids=[7867],e.modules={47795:e=>{e.exports=require("generate-password")},76154:e=>{e.exports=require("google-auth-library")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},59500:(e,r,s)=>{s.r(r),s.d(r,{config:()=>c,default:()=>p,routeModule:()=>m});var a={};s.r(a),s.d(a,{default:()=>_});var t=s(89947),i=s(2706),o=s(96762),l=s(68829),u=s(83704),d=s(89159);let{OAuth2Client:n}=s(76154);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let s=e.body,{invite:a}=e.query,{token:t}=s;try{let e=new n(""),s=(await e.verifyIdToken({idToken:t,audience:""})).getPayload();if(!s||!s.email_verified){r.json({user:null,msg:"Invalid Credentials"});return}let{given_name:i,family_name:o,email:_,sub:p,picture:c,email_verified:m}=s;if(!_)throw Error("No Email");let g=await (0,u.A)({email:_,payload:{email:_,first_name:i,last_name:o,social_id:p,social_platform:"google",image:c,image_thumbnail:c,username:`google-user-${p}`},social_platform:"google",social_id:p,invitation:a});if(g.payload?.csrf_k){let e=(0,l.default)({data:JSON.stringify(g.payload)}),{keyCookieName:s,csrfCookieName:a}=(0,d.A)();r.setHeader("Set-Cookie",[`${s}=${e};samesite=strict;path=/;HttpOnly=true;Secure=true`,`${a}=${g.payload.csrf_k};samesite=strict;path=/;HttpOnly=true`])}r.json(g)}catch(e){console.log(e.message),r.json({success:!1,msg:"Failed!"})}}s(67619);let p=(0,o.M)(a,"default"),c=(0,o.M)(a,"config"),m=new t.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/social-login/google-auth",pathname:"/api/social-login/google-auth",bundlePath:"",filename:""},userland:a})},89159:(e,r,s)=>{s.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=s;let l=r;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=a;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:u+=t}}}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),a=r.X(0,[1251,3704],()=>s(59500));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js.nft.json b/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js.nft.json index d43d2e3..b2debbe 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/social-login/google-auth.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/agent-base/dist/src/index.js","../../../../../node_modules/agent-base/dist/src/promisify.js","../../../../../node_modules/agent-base/package.json","../../../../../node_modules/arrify/index.js","../../../../../node_modules/arrify/package.json","../../../../../node_modules/base64-js/index.js","../../../../../node_modules/base64-js/package.json","../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/buffer-equal-constant-time/index.js","../../../../../node_modules/buffer-equal-constant-time/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/debug/package.json","../../../../../node_modules/debug/src/browser.js","../../../../../node_modules/debug/src/common.js","../../../../../node_modules/debug/src/index.js","../../../../../node_modules/debug/src/node.js","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/ecdsa-sig-formatter/package.json","../../../../../node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js","../../../../../node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/extend/index.js","../../../../../node_modules/extend/package.json","../../../../../node_modules/fast-text-encoding/package.json","../../../../../node_modules/fast-text-encoding/text.min.js","../../../../../node_modules/gaxios/build/src/common.js","../../../../../node_modules/gaxios/build/src/gaxios.js","../../../../../node_modules/gaxios/build/src/index.js","../../../../../node_modules/gaxios/build/src/retry.js","../../../../../node_modules/gaxios/package.json","../../../../../node_modules/gcp-metadata/build/src/gcp-residency.js","../../../../../node_modules/gcp-metadata/build/src/index.js","../../../../../node_modules/gcp-metadata/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/google-auth-library/build/src/auth/authclient.js","../../../../../node_modules/google-auth-library/build/src/auth/awsclient.js","../../../../../node_modules/google-auth-library/build/src/auth/awsrequestsigner.js","../../../../../node_modules/google-auth-library/build/src/auth/baseexternalclient.js","../../../../../node_modules/google-auth-library/build/src/auth/computeclient.js","../../../../../node_modules/google-auth-library/build/src/auth/downscopedclient.js","../../../../../node_modules/google-auth-library/build/src/auth/envDetect.js","../../../../../node_modules/google-auth-library/build/src/auth/executable-response.js","../../../../../node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js","../../../../../node_modules/google-auth-library/build/src/auth/externalclient.js","../../../../../node_modules/google-auth-library/build/src/auth/googleauth.js","../../../../../node_modules/google-auth-library/build/src/auth/iam.js","../../../../../node_modules/google-auth-library/build/src/auth/identitypoolclient.js","../../../../../node_modules/google-auth-library/build/src/auth/idtokenclient.js","../../../../../node_modules/google-auth-library/build/src/auth/impersonated.js","../../../../../node_modules/google-auth-library/build/src/auth/jwtaccess.js","../../../../../node_modules/google-auth-library/build/src/auth/jwtclient.js","../../../../../node_modules/google-auth-library/build/src/auth/loginticket.js","../../../../../node_modules/google-auth-library/build/src/auth/oauth2client.js","../../../../../node_modules/google-auth-library/build/src/auth/oauth2common.js","../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js","../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js","../../../../../node_modules/google-auth-library/build/src/auth/refreshclient.js","../../../../../node_modules/google-auth-library/build/src/auth/stscredentials.js","../../../../../node_modules/google-auth-library/build/src/crypto/browser/crypto.js","../../../../../node_modules/google-auth-library/build/src/crypto/crypto.js","../../../../../node_modules/google-auth-library/build/src/crypto/node/crypto.js","../../../../../node_modules/google-auth-library/build/src/index.js","../../../../../node_modules/google-auth-library/build/src/options.js","../../../../../node_modules/google-auth-library/build/src/transporters.js","../../../../../node_modules/google-auth-library/package.json","../../../../../node_modules/google-p12-pem/build/src/index.js","../../../../../node_modules/google-p12-pem/package.json","../../../../../node_modules/gtoken/build/src/index.js","../../../../../node_modules/gtoken/package.json","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/https-proxy-agent/dist/agent.js","../../../../../node_modules/https-proxy-agent/dist/index.js","../../../../../node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../../../node_modules/https-proxy-agent/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/is-stream/index.js","../../../../../node_modules/is-stream/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/json-bigint/index.js","../../../../../node_modules/json-bigint/lib/parse.js","../../../../../node_modules/json-bigint/lib/stringify.js","../../../../../node_modules/json-bigint/package.json","../../../../../node_modules/jwa/index.js","../../../../../node_modules/jwa/package.json","../../../../../node_modules/jws/index.js","../../../../../node_modules/jws/lib/data-stream.js","../../../../../node_modules/jws/lib/sign-stream.js","../../../../../node_modules/jws/lib/tostring.js","../../../../../node_modules/jws/lib/verify-stream.js","../../../../../node_modules/jws/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/lru-cache/index.js","../../../../../node_modules/lru-cache/package.json","../../../../../node_modules/ms/index.js","../../../../../node_modules/ms/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/node-fetch/lib/index.js","../../../../../node_modules/node-fetch/package.json","../../../../../node_modules/node-forge/lib/aes.js","../../../../../node_modules/node-forge/lib/aesCipherSuites.js","../../../../../node_modules/node-forge/lib/asn1-validator.js","../../../../../node_modules/node-forge/lib/asn1.js","../../../../../node_modules/node-forge/lib/baseN.js","../../../../../node_modules/node-forge/lib/cipher.js","../../../../../node_modules/node-forge/lib/cipherModes.js","../../../../../node_modules/node-forge/lib/des.js","../../../../../node_modules/node-forge/lib/ed25519.js","../../../../../node_modules/node-forge/lib/forge.js","../../../../../node_modules/node-forge/lib/hmac.js","../../../../../node_modules/node-forge/lib/index.js","../../../../../node_modules/node-forge/lib/jsbn.js","../../../../../node_modules/node-forge/lib/kem.js","../../../../../node_modules/node-forge/lib/log.js","../../../../../node_modules/node-forge/lib/md.all.js","../../../../../node_modules/node-forge/lib/md.js","../../../../../node_modules/node-forge/lib/md5.js","../../../../../node_modules/node-forge/lib/mgf.js","../../../../../node_modules/node-forge/lib/mgf1.js","../../../../../node_modules/node-forge/lib/oids.js","../../../../../node_modules/node-forge/lib/pbe.js","../../../../../node_modules/node-forge/lib/pbkdf2.js","../../../../../node_modules/node-forge/lib/pem.js","../../../../../node_modules/node-forge/lib/pkcs1.js","../../../../../node_modules/node-forge/lib/pkcs12.js","../../../../../node_modules/node-forge/lib/pkcs7.js","../../../../../node_modules/node-forge/lib/pkcs7asn1.js","../../../../../node_modules/node-forge/lib/pki.js","../../../../../node_modules/node-forge/lib/prime.js","../../../../../node_modules/node-forge/lib/prng.js","../../../../../node_modules/node-forge/lib/pss.js","../../../../../node_modules/node-forge/lib/random.js","../../../../../node_modules/node-forge/lib/rc2.js","../../../../../node_modules/node-forge/lib/rsa.js","../../../../../node_modules/node-forge/lib/sha1.js","../../../../../node_modules/node-forge/lib/sha256.js","../../../../../node_modules/node-forge/lib/sha512.js","../../../../../node_modules/node-forge/lib/ssh.js","../../../../../node_modules/node-forge/lib/tls.js","../../../../../node_modules/node-forge/lib/util.js","../../../../../node_modules/node-forge/lib/x509.js","../../../../../node_modules/node-forge/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/tr46/index.js","../../../../../node_modules/tr46/lib/mappingTable.json","../../../../../node_modules/tr46/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../node_modules/webidl-conversions/lib/index.js","../../../../../node_modules/webidl-conversions/package.json","../../../../../node_modules/whatwg-url/lib/URL-impl.js","../../../../../node_modules/whatwg-url/lib/URL.js","../../../../../node_modules/whatwg-url/lib/public-api.js","../../../../../node_modules/whatwg-url/lib/url-state-machine.js","../../../../../node_modules/whatwg-url/lib/utils.js","../../../../../node_modules/whatwg-url/package.json","../../../../../node_modules/yallist/iterator.js","../../../../../node_modules/yallist/package.json","../../../../../node_modules/yallist/yallist.js","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/agent-base/dist/src/index.js","../../../../../node_modules/agent-base/dist/src/promisify.js","../../../../../node_modules/agent-base/package.json","../../../../../node_modules/arrify/index.js","../../../../../node_modules/arrify/package.json","../../../../../node_modules/base64-js/index.js","../../../../../node_modules/base64-js/package.json","../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/buffer-equal-constant-time/index.js","../../../../../node_modules/buffer-equal-constant-time/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/debug/package.json","../../../../../node_modules/debug/src/browser.js","../../../../../node_modules/debug/src/common.js","../../../../../node_modules/debug/src/index.js","../../../../../node_modules/debug/src/node.js","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/ecdsa-sig-formatter/package.json","../../../../../node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js","../../../../../node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/extend/index.js","../../../../../node_modules/extend/package.json","../../../../../node_modules/fast-text-encoding/package.json","../../../../../node_modules/fast-text-encoding/text.min.js","../../../../../node_modules/gaxios/build/src/common.js","../../../../../node_modules/gaxios/build/src/gaxios.js","../../../../../node_modules/gaxios/build/src/index.js","../../../../../node_modules/gaxios/build/src/retry.js","../../../../../node_modules/gaxios/package.json","../../../../../node_modules/gcp-metadata/build/src/gcp-residency.js","../../../../../node_modules/gcp-metadata/build/src/index.js","../../../../../node_modules/gcp-metadata/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/google-auth-library/build/src/auth/authclient.js","../../../../../node_modules/google-auth-library/build/src/auth/awsclient.js","../../../../../node_modules/google-auth-library/build/src/auth/awsrequestsigner.js","../../../../../node_modules/google-auth-library/build/src/auth/baseexternalclient.js","../../../../../node_modules/google-auth-library/build/src/auth/computeclient.js","../../../../../node_modules/google-auth-library/build/src/auth/downscopedclient.js","../../../../../node_modules/google-auth-library/build/src/auth/envDetect.js","../../../../../node_modules/google-auth-library/build/src/auth/executable-response.js","../../../../../node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js","../../../../../node_modules/google-auth-library/build/src/auth/externalclient.js","../../../../../node_modules/google-auth-library/build/src/auth/googleauth.js","../../../../../node_modules/google-auth-library/build/src/auth/iam.js","../../../../../node_modules/google-auth-library/build/src/auth/identitypoolclient.js","../../../../../node_modules/google-auth-library/build/src/auth/idtokenclient.js","../../../../../node_modules/google-auth-library/build/src/auth/impersonated.js","../../../../../node_modules/google-auth-library/build/src/auth/jwtaccess.js","../../../../../node_modules/google-auth-library/build/src/auth/jwtclient.js","../../../../../node_modules/google-auth-library/build/src/auth/loginticket.js","../../../../../node_modules/google-auth-library/build/src/auth/oauth2client.js","../../../../../node_modules/google-auth-library/build/src/auth/oauth2common.js","../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js","../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js","../../../../../node_modules/google-auth-library/build/src/auth/refreshclient.js","../../../../../node_modules/google-auth-library/build/src/auth/stscredentials.js","../../../../../node_modules/google-auth-library/build/src/crypto/browser/crypto.js","../../../../../node_modules/google-auth-library/build/src/crypto/crypto.js","../../../../../node_modules/google-auth-library/build/src/crypto/node/crypto.js","../../../../../node_modules/google-auth-library/build/src/index.js","../../../../../node_modules/google-auth-library/build/src/options.js","../../../../../node_modules/google-auth-library/build/src/transporters.js","../../../../../node_modules/google-auth-library/package.json","../../../../../node_modules/google-p12-pem/build/src/index.js","../../../../../node_modules/google-p12-pem/package.json","../../../../../node_modules/gtoken/build/src/index.js","../../../../../node_modules/gtoken/package.json","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/https-proxy-agent/dist/agent.js","../../../../../node_modules/https-proxy-agent/dist/index.js","../../../../../node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../../../node_modules/https-proxy-agent/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/is-stream/index.js","../../../../../node_modules/is-stream/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/json-bigint/index.js","../../../../../node_modules/json-bigint/lib/parse.js","../../../../../node_modules/json-bigint/lib/stringify.js","../../../../../node_modules/json-bigint/package.json","../../../../../node_modules/jwa/index.js","../../../../../node_modules/jwa/package.json","../../../../../node_modules/jws/index.js","../../../../../node_modules/jws/lib/data-stream.js","../../../../../node_modules/jws/lib/sign-stream.js","../../../../../node_modules/jws/lib/tostring.js","../../../../../node_modules/jws/lib/verify-stream.js","../../../../../node_modules/jws/package.json","../../../../../node_modules/lru-cache/index.js","../../../../../node_modules/lru-cache/package.json","../../../../../node_modules/ms/index.js","../../../../../node_modules/ms/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/node-fetch/lib/index.js","../../../../../node_modules/node-fetch/package.json","../../../../../node_modules/node-forge/lib/aes.js","../../../../../node_modules/node-forge/lib/aesCipherSuites.js","../../../../../node_modules/node-forge/lib/asn1-validator.js","../../../../../node_modules/node-forge/lib/asn1.js","../../../../../node_modules/node-forge/lib/baseN.js","../../../../../node_modules/node-forge/lib/cipher.js","../../../../../node_modules/node-forge/lib/cipherModes.js","../../../../../node_modules/node-forge/lib/des.js","../../../../../node_modules/node-forge/lib/ed25519.js","../../../../../node_modules/node-forge/lib/forge.js","../../../../../node_modules/node-forge/lib/hmac.js","../../../../../node_modules/node-forge/lib/index.js","../../../../../node_modules/node-forge/lib/jsbn.js","../../../../../node_modules/node-forge/lib/kem.js","../../../../../node_modules/node-forge/lib/log.js","../../../../../node_modules/node-forge/lib/md.all.js","../../../../../node_modules/node-forge/lib/md.js","../../../../../node_modules/node-forge/lib/md5.js","../../../../../node_modules/node-forge/lib/mgf.js","../../../../../node_modules/node-forge/lib/mgf1.js","../../../../../node_modules/node-forge/lib/oids.js","../../../../../node_modules/node-forge/lib/pbe.js","../../../../../node_modules/node-forge/lib/pbkdf2.js","../../../../../node_modules/node-forge/lib/pem.js","../../../../../node_modules/node-forge/lib/pkcs1.js","../../../../../node_modules/node-forge/lib/pkcs12.js","../../../../../node_modules/node-forge/lib/pkcs7.js","../../../../../node_modules/node-forge/lib/pkcs7asn1.js","../../../../../node_modules/node-forge/lib/pki.js","../../../../../node_modules/node-forge/lib/prime.js","../../../../../node_modules/node-forge/lib/prng.js","../../../../../node_modules/node-forge/lib/pss.js","../../../../../node_modules/node-forge/lib/random.js","../../../../../node_modules/node-forge/lib/rc2.js","../../../../../node_modules/node-forge/lib/rsa.js","../../../../../node_modules/node-forge/lib/sha1.js","../../../../../node_modules/node-forge/lib/sha256.js","../../../../../node_modules/node-forge/lib/sha512.js","../../../../../node_modules/node-forge/lib/ssh.js","../../../../../node_modules/node-forge/lib/tls.js","../../../../../node_modules/node-forge/lib/util.js","../../../../../node_modules/node-forge/lib/x509.js","../../../../../node_modules/node-forge/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/tr46/index.js","../../../../../node_modules/tr46/lib/mappingTable.json","../../../../../node_modules/tr46/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../node_modules/webidl-conversions/lib/index.js","../../../../../node_modules/webidl-conversions/package.json","../../../../../node_modules/whatwg-url/lib/URL-impl.js","../../../../../node_modules/whatwg-url/lib/URL.js","../../../../../node_modules/whatwg-url/lib/public-api.js","../../../../../node_modules/whatwg-url/lib/url-state-machine.js","../../../../../node_modules/whatwg-url/lib/utils.js","../../../../../node_modules/whatwg-url/package.json","../../../../../node_modules/yallist/iterator.js","../../../../../node_modules/yallist/package.json","../../../../../node_modules/yallist/yallist.js","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js index 6fbd660..ffedcfa 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js +++ b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=151,e.ids=[151],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},73147:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>c,routeModule:()=>d});var n={};t.r(n),t.d(n,{default:()=>l});var s=t(89947),i=t(2706),o=t(96762),a=t(51348),u=t.n(a);async function l(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});e.query?.email?.toString()?.match(/^\S+$/)||r.json({email:null});let t=await u()("SELECT email FROM users WHERE email=?",[e.query.email]);t&&t[0]?r.json({email:t}):r.json({email:null})}let c=(0,o.M)(n,"default"),p=(0,o.M)(n,"config"),d=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/social-login/utils/checkEmail",pathname:"/api/social-login/utils/checkEmail",bundlePath:"",filename:""},userland:n})},51348:(e,r,t)=>{let n=t(9973),s=t(21580),i=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:s()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let n=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!n.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:n.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=73147);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=151,e.ids=[151],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,n)=>{Object.defineProperty(n,"M",{enumerable:!0,get:function(){return function e(n,t){return t in n?n[t]:"then"in n&&"function"==typeof n.then?n.then(n=>e(n,t)):"function"==typeof n&&"default"===t?n:void 0}}})},13196:(e,n,t)=>{t.r(n),t.d(n,{config:()=>c,default:()=>s,routeModule:()=>d});var r={};t.r(r),t.d(r,{default:()=>u});var i=t(89947),a=t(2706),o=t(96762),l=t(48786);async function u(e,n){if("GET"!==e.method)return n.json({msg:"Failed!"});e.query?.email?.toString()?.match(/^\S+$/)||n.json({email:null});let t=await (0,l.A)("SELECT email FROM users WHERE email=?",[e.query.email]);t&&t[0]?n.json({email:t}):n.json({email:null})}let s=(0,o.M)(r,"default"),c=(0,o.M)(r,"config"),d=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/social-login/utils/checkEmail",pathname:"/api/social-login/utils/checkEmail",bundlePath:"",filename:""},userland:r})},48786:(e,n,t)=>{t.d(n,{A:()=>r});async function r(...e){let n=global.DSQL_DB_CONN;try{if(!n)throw Error("No Connection provided to DB_HANDLER function!");let t=await n.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await n?.end()}}},2706:(e,n)=>{Object.defineProperty(n,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,n,t)=>{e.exports=t(75600)}};var n=require("../../../../webpack-api-runtime.js");n.C(e);var t=n(n.s=13196);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js.nft.json b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js.nft.json index 1da0f9a..4acab9d 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkEmail.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js index 3ab3859..cbe0cd4 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js +++ b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7007,e.ids=[7007],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},30317:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>l,routeModule:()=>p});var s={};t.r(s),t.d(s,{default:()=>u});var n=t(89947),o=t(2706),i=t(96762),a=t(51348),c=t.n(a);async function u(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let{social_id:t,social_platform:s}=e.query,n=await c()("SELECT social_id FROM users WHERE social_id=? AND social_platform=?",[t,s]);t&&t[0]?r.json({social_id:n}):r.json({social_id:null})}let l=(0,i.M)(s,"default"),d=(0,i.M)(s,"config"),p=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/utils/checkSocialId",pathname:"/api/social-login/utils/checkSocialId",bundlePath:"",filename:""},userland:s})},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=30317);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7007,e.ids=[7007],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,n)=>{Object.defineProperty(n,"M",{enumerable:!0,get:function(){return function e(n,t){return t in n?n[t]:"then"in n&&"function"==typeof n.then?n.then(n=>e(n,t)):"function"==typeof n&&"default"===t?n:void 0}}})},22070:(e,n,t)=>{t.r(n),t.d(n,{config:()=>c,default:()=>s,routeModule:()=>d});var i={};t.r(i),t.d(i,{default:()=>l});var r=t(89947),o=t(2706),a=t(96762),u=t(48786);async function l(e,n){if("GET"!==e.method)return n.json({msg:"Failed!"});let{social_id:t,social_platform:i}=e.query,r=await (0,u.A)("SELECT social_id FROM users WHERE social_id=? AND social_platform=?",[t,i]);t&&t[0]?n.json({social_id:r}):n.json({social_id:null})}let s=(0,a.M)(i,"default"),c=(0,a.M)(i,"config"),d=new r.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/utils/checkSocialId",pathname:"/api/social-login/utils/checkSocialId",bundlePath:"",filename:""},userland:i})},48786:(e,n,t)=>{t.d(n,{A:()=>i});async function i(...e){let n=global.DSQL_DB_CONN;try{if(!n)throw Error("No Connection provided to DB_HANDLER function!");let t=await n.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await n?.end()}}},2706:(e,n)=>{Object.defineProperty(n,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,n,t)=>{e.exports=t(75600)}};var n=require("../../../../webpack-api-runtime.js");n.C(e);var t=n(n.s=22070);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js.nft.json b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js.nft.json index 1da0f9a..4acab9d 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/social-login/utils/checkSocialId.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js b/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js index 9884457..3e78632 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js +++ b/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3589,e.ids=[3589],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},80960:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>c,routeModule:()=>d});var n={};t.r(n),t.d(n,{default:()=>u});var s=t(89947),o=t(2706),i=t(96762),a=t(51348),l=t.n(a);async function u(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let{social_id:t,social_platform:n}=e.query,s=await l()("SELECT email FROM users WHERE social_id=? AND social_platform=?",[t,n]);s&&s[0]?r.json({email:s[0].email}):r.json({email:null})}let c=(0,i.M)(n,"default"),p=(0,i.M)(n,"config"),d=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/utils/getEmailFromSocialId",pathname:"/api/social-login/utils/getEmailFromSocialId",bundlePath:"",filename:""},userland:n})},51348:(e,r,t)=>{let n=t(9973),s=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:s()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let n=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!n.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:n.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=80960);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3589,e.ids=[3589],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,n){return n in t?t[n]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,n)):"function"==typeof t&&"default"===n?t:void 0}}})},74059:(e,t,n)=>{n.r(t),n.d(t,{config:()=>d,default:()=>s,routeModule:()=>c});var r={};n.r(r),n.d(r,{default:()=>u});var i=n(89947),o=n(2706),a=n(96762),l=n(48786);async function u(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});let{social_id:n,social_platform:r}=e.query,i=await (0,l.A)("SELECT email FROM users WHERE social_id=? AND social_platform=?",[n,r]);i&&i[0]?t.json({email:i[0].email}):t.json({email:null})}let s=(0,a.M)(r,"default"),d=(0,a.M)(r,"config"),c=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/utils/getEmailFromSocialId",pathname:"/api/social-login/utils/getEmailFromSocialId",bundlePath:"",filename:""},userland:r})},48786:(e,t,n)=>{n.d(t,{A:()=>r});async function r(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let n=await t.query(...e);return JSON.parse(JSON.stringify(n))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,n)=>{e.exports=n(75600)}};var t=require("../../../../webpack-api-runtime.js");t.C(e);var n=t(t.s=74059);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js.nft.json b/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js.nft.json index 1da0f9a..4acab9d 100644 --- a/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/social-login/utils/getEmailFromSocialId.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sql-users/create.js b/dsql-app/.local_dist/server/pages/api/sql-users/create.js index d9023a2..725550b 100644 --- a/dsql-app/.local_dist/server/pages/api/sql-users/create.js +++ b/dsql-app/.local_dist/server/pages/api/sql-users/create.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7889,e.ids=[7889],e.modules={60818:e=>{e.exports=require("dotenv")},47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},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")},66650:(e,r,s)=>{s.r(r),s.d(r,{config:()=>x,default:()=>w,routeModule:()=>y});var t={};s.r(t),s.d(t,{default:()=>q});var a=s(89947),i=s(2706),o=s(96762),n=s(6420),u=s.n(n),d=s(48225),l=s.n(d);s(27825);var c=s(51348),h=s.n(c),m=s(20503),p=s.n(m),g=s(46889),f=s.n(g);s(29021);let E=s(47795);async function q(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=await u()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{data:t,edit:a,grants:i}=e.body;try{let e=process.env.DSQL_DB_HOST||"127.0.0.1",a=`dsql_user_${s.id}`,{host:o,password:n}=t;if(!o.match(/./))throw Error("Invalid host");if(o.match(/^%$/))throw Error("Cannot set a catch-all host for this user.");let u=String(o).replace(/[^a-zA-Z0-9-\.\:\/\%]/g,""),d=n?.match(/./)?n:E.generate({length:16,numbers:!0,symbols:!0,uppercase:!0,exclude:"*#.'`\""}),l=await h()("SELECT * FROM mysql.user WHERE User = ? AND (Host = ? OR Host = ?)",[a,u,e]);if(l?.[0]?.User)throw Error("SQL User already exists. Remember if you have the '%' host on your primary user, it catches all other hosts.");if(u.match(/^%$/))throw Error("Can't create a catch-all host for this username. Catch-all host is only allowed on the primary user.");let c=await h()("SELECT COUNT(*) FROM mariadb_users WHERE user_id = ?",[s.id]);if(c?.[0]?.["COUNT(*)"]>=10)throw Error("User limit reached");let m=p()({data:d}),g=await h()("INSERT INTO mariadb_users (user_id, username, host, password, grants) VALUES (?, ?, ?, ?, ?)",[s.id,a,u,m,JSON.stringify(i)]);if(!g?.insertId)throw Error("Error in adding SQL user");await f()({userId:s.id,mariadbUser:a,mariadbUserHost:u}),r.json({success:!0})}catch(e){console.log("Create MariaDB user ERROR:",e.message),l()({component:"/api/acceptUserInvitation/catch-error",message:e.message,user:s}),r.json({success:!1,msg:"Error in adding SQL user =>"+e.message,err:e.message})}}let w=(0,o.M)(t,"default"),x=(0,o.M)(t,"config"),y=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/sql-users/create",pathname:"/api/sql-users/create",bundlePath:"",filename:""},userland:t})}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[5264],()=>s(66650));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7889,e.ids=[7889],e.modules={60818:e=>{e.exports=require("dotenv")},47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},52795:(e,r,s)=>{s.r(r),s.d(r,{config:()=>f,default:()=>h,routeModule:()=>E});var t={};s.r(t),s.d(t,{default:()=>g});var a=s(89947),i=s(2706),o=s(96762),u=s(47795),n=s.n(u),d=s(69842),l=s(67619),c=s(48786),m=s(68829),p=s(5437);async function g(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=await (0,d.A)(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{data:t,edit:a,grants:i}=e.body;try{let e=process.env.DSQL_DB_HOST||"127.0.0.1",a=s?.id==Number(process.env.DSQL_SU_USER_ID),{host:o,password:u,username:d}=t,l=a&&d?.match(/./)?d:`dsql_user_${s.id}`;if(!o.match(/./))throw Error("Invalid host");let g=String(o).replace(/[^a-zA-Z0-9-\.\:\/\%]/g,""),h=u?.match(/./)?u:n().generate({length:16,numbers:!0,symbols:!0,uppercase:!0,exclude:"*#.'`\""}),f=await (0,c.A)("SELECT * FROM mysql.user WHERE User = ? AND (Host = ? OR Host = ?)",[l,g,e]);if(f?.[0]?.User)throw Error("SQL User already exists. Remember if you have the '%' host on your primary user, it catches all other hosts.");let E=await (0,c.A)("SELECT COUNT(*) FROM mariadb_users WHERE user_id = ?",[s.id]);if(E?.[0]?.["COUNT(*)"]>=10)throw Error("User limit reached");let S=(0,m.default)({data:h}),w=await (0,c.A)("INSERT INTO mariadb_users (user_id, username, host, password, grants) VALUES (?, ?, ?, ?, ?)",[s.id,l,g,S,JSON.stringify(i)]);if(!w?.insertId)throw Error("Error in adding SQL user");await (0,p.A)({userId:s.id,mariadbUsername:l,mariadbUserHost:g}),r.json({success:!0})}catch(e){console.log("Create MariaDB user ERROR:",e.message),(0,l.default)({component:"/api/acceptUserInvitation/catch-error",message:e.message,user:s}),r.json({success:!1,msg:"Error in adding SQL user =>"+e.message,err:e.message})}}let h=(0,o.M)(t,"default"),f=(0,o.M)(t,"config"),E=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/sql-users/create",pathname:"/api/sql-users/create",bundlePath:"",filename:""},userland:t})}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[3496],()=>s(52795));module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sql-users/create.js.nft.json b/dsql-app/.local_dist/server/pages/api/sql-users/create.js.nft.json index 6b5528f..64d72dd 100644 --- a/dsql-app/.local_dist/server/pages/api/sql-users/create.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/sql-users/create.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../.env","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/dotenv/lib/main.js","../../../../../node_modules/dotenv/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../.env","../../../../../node_modules/dotenv/lib/main.js","../../../../../node_modules/dotenv/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sql-users/delete.js b/dsql-app/.local_dist/server/pages/api/sql-users/delete.js index 0bbb025..299d57b 100644 --- a/dsql-app/.local_dist/server/pages/api/sql-users/delete.js +++ b/dsql-app/.local_dist/server/pages/api/sql-users/delete.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=536,e.ids=[536],e.modules={27825:e=>{e.exports=require("lodash")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},36968:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>f,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),i=t(2706),o=t(96762),a=t(6420),l=t.n(a),u=t(48225),c=t.n(u);t(27825);var d=t(51348),_=t.n(d);async function p(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await l()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{id:s}=e.body;try{let e=await _()("SELECT * FROM mariadb_users WHERE id = ? AND user_id = ?",[s,t.id]),n=e?.[0];if(!n?.id)throw Error("Active User couldn't be verified");if(String(n.primary)?.match(/1/))throw Error("Cannot Delete Primary User");let i=`dsql_user_${t.id}`,o=n.host;await _()("DELETE FROM mariadb_users WHERE user_id = ? AND id = ?",[t.id,n.id]),await _()(`DROP USER '${i}'@'${o}'`),r.json({success:!0})}catch(e){c()({component:"/api/acceptUserInvitation/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Error in adding SQL user =>"+e.message,err:e.message})}}t(29021);let f=(0,o.M)(s,"default"),E=(0,o.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/sql-users/delete",pathname:"/api/sql-users/delete",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),i=t(29021),o=t(31341);async function a(e,r,t,a){let{keyCookieName:l,csrfCookieName:u}=o();if(!e.cookies?.[l]?.match(/./))return null;let c=n({encryptedString:e.cookies[l]});if(!c)return null;let d=JSON.parse(c);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=a},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=t;let a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:o,csrfCookieName:a,oneTimeCodeName:l+=n}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:i}){let o=new Date,a=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||i.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=536,e.ids=[536],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},56625:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>d,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>c});var s=t(89947),i=t(2706),a=t(96762),o=t(69842),u=t(67619),l=t(48786);async function c(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,o.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{id:n}=e.body;try{let e=await (0,l.A)("SELECT * FROM mariadb_users WHERE id = ? AND user_id = ?",[n,t.id]),s=e?.[0];if(!s?.id)throw Error("Active User couldn't be verified");if(String(s.primary)?.match(/1/))throw Error("Cannot Delete Primary User");let i=s.username,a=s.host;await (0,l.A)("DELETE FROM mariadb_users WHERE user_id = ? AND id = ?",[t.id,s.id]),await (0,l.A)(`DROP USER '${i}'@'${a}'`),r.json({success:!0})}catch(e){(0,u.default)({component:"/api/acceptUserInvitation/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Error in adding SQL user =>"+e.message,err:e.message})}}let d=(0,a.M)(n,"default"),_=(0,a.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/sql-users/delete",pathname:"/api/sql-users/delete",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(48786),s=t(95969),i=t(29021),a=t.n(i),o=t(89159);async function u(e,r,t){let{keyCookieName:i,csrfCookieName:u}=(0,o.A)();if(!e.cookies?.[i]?.match(/./))return null;let l=(0,s.A)({encryptedString:e.cookies[i]});if(!l)return null;let c=JSON.parse(l);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=n;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),i&&(u+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:u+=s}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var n=t(29021),s=t.n(n);async function i({user:e,message:r,component:t,noMail:n,req:i}){let a=new Date,o=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),i?.url&&(n+=` URL: ${i.url}`),i?.body&&(n+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),a&&(n+=` -IP: ${a}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(i.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${a.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let u=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=n("aes-192-cbc",s(o,a,l),i.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=36968);module.exports=t})(); \ No newline at end of file +${u}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(55511),s=t(79428);function i({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=(0,n.scryptSync)(i,a,o),l=s.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",u,l);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=56625);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sql-users/delete.js.nft.json b/dsql-app/.local_dist/server/pages/api/sql-users/delete.js.nft.json index daa7b4e..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/sql-users/delete.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/sql-users/delete.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sql-users/update.js b/dsql-app/.local_dist/server/pages/api/sql-users/update.js index 3fe636d..e3654d5 100644 --- a/dsql-app/.local_dist/server/pages/api/sql-users/update.js +++ b/dsql-app/.local_dist/server/pages/api/sql-users/update.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2350,e.ids=[2350],e.modules={60818:e=>{e.exports=require("dotenv")},47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},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")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},46849:(e,r,s)=>{s.r(r),s.d(r,{config:()=>q,default:()=>w,routeModule:()=>x});var t={};s.r(t),s.d(t,{default:()=>g});var i=s(89947),a=s(2706),o=s(96762),d=s(6420),u=s.n(d),n=s(48225),l=s.n(n);s(27825);var p=s(51348),h=s.n(p);s(33873),s(79646);var c=s(20503),m=s.n(c),E=s(46889),f=s.n(E);async function g(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=await u()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{data:t,edit:i,prev:a,grants:o}=e.body;try{if(!a?.id)throw Error("Invalid existing DB entry");let e=await h()("SELECT * FROM mariadb_users WHERE id = ? AND user_id = ?",[a.id,s.id]),i=e?.[0];if(!i?.id)throw Error("Active User couldn't be verified");let d=`dsql_user_${s.id}`,{host:u,password:n}=t;if(!u)throw Error("No host provided");if(u.match(/^%$/))throw Error("Cannot set a catch-all host for this user.");let l=String(u).replace(/[^a-zA-Z0-9-\.\:\/\%]/g,"");if(i.host!=t.host){let e=await h()("SELECT * FROM mariadb_users WHERE user_id = ? AND host = ?",[s.id,l]);if(e?.[0]?.id)throw Error("User already exists with this host. Please choose another host.");await h()(`RENAME USER '${d}'@'${i.host}' TO '${d}'@'${l}'`)}let p=m()({data:n}),c=p==i.password?i.password:p;await h()("UPDATE mariadb_users SET host = ?, password = ?, grants = ? WHERE id = ?",[l,c,JSON.stringify(o),i.id]),await h()(`SET PASSWORD FOR '${d}'@'${l}' = PASSWORD('${n}');`),await f()({userId:s.id,mariadbUser:d,mariadbUserHost:l,sqlUserID:i.id}),r.json({success:!0})}catch(e){l()({component:"/api/acceptUserInvitation/catch-error",message:e.message,user:s}),r.json({success:!1,msg:"Error in adding SQL user =>"+e.message,err:e.message})}}s(29021);let w=(0,o.M)(t,"default"),q=(0,o.M)(t,"config"),x=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/sql-users/update",pathname:"/api/sql-users/update",bundlePath:"",filename:""},userland:t})}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[5264],()=>s(46849));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2350,e.ids=[2350],e.modules={60818:e=>{e.exports=require("dotenv")},47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},49844:(e,r,s)=>{s.r(r),s.d(r,{config:()=>E,default:()=>c,routeModule:()=>f});var a={};s.r(a),s.d(a,{default:()=>m});var i=s(89947),t=s(2706),d=s(96762),o=s(69842),u=s(67619),n=s(48786),p=s(68829),l=s(5437);async function m(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=await (0,o.A)(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{data:a,edit:i,prev:t,grants:d}=e.body;try{if(!t?.id)throw Error("Invalid existing DB entry");let e=await (0,n.A)("SELECT * FROM mariadb_users WHERE id = ? AND user_id = ?",[t.id,s.id]),i=s?.id==Number(process.env.DSQL_SU_USER_ID),o=e?.[0];if(!o?.id)throw Error("Active User couldn't be verified");let{host:u,password:m,username:c}=a,E=i&&c||`dsql_user_${s.id}`;if(!u)throw Error("No host provided");let f=String(u).replace(/[^a-zA-Z0-9-\.\:\/\%]/g,"");if(o.host!=a.host||o.username!=E){let e=await (0,n.A)("SELECT * FROM mariadb_users WHERE user_id=? AND username=? AND host=?",[s.id,E,f]);e?.[0]?.id||await (0,n.A)(`RENAME USER '${t.username}'@'${o.host}' TO '${E}'@'${f}'`)}let g=(0,p.default)({data:m}),A=g==o.password?o.password:g;await (0,n.A)("UPDATE mariadb_users SET username=?, host=?, password=?, grants=? WHERE id=?",[E,f,A,JSON.stringify(d),o.id]),await (0,n.A)(`SET PASSWORD FOR '${E}'@'${f}' = PASSWORD('${m}');`),await (0,l.A)({userId:s.id,mariadbUsername:E,mariadbUserHost:f,sqlUserID:o.id}),r.json({success:!0})}catch(e){(0,u.default)({component:"/api/acceptUserInvitation/catch-error",message:e.message,user:s}),r.json({success:!1,msg:"Error in adding SQL user =>"+e.message,err:e.message})}}s(29021);let c=(0,d.M)(a,"default"),E=(0,d.M)(a,"config"),f=new i.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/sql-users/update",pathname:"/api/sql-users/update",bundlePath:"",filename:""},userland:a})}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),a=r.X(0,[3496],()=>s(49844));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sql-users/update.js.nft.json b/dsql-app/.local_dist/server/pages/api/sql-users/update.js.nft.json index 6b5528f..64d72dd 100644 --- a/dsql-app/.local_dist/server/pages/api/sql-users/update.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/sql-users/update.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../.env","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/dotenv/lib/main.js","../../../../../node_modules/dotenv/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../.env","../../../../../node_modules/dotenv/lib/main.js","../../../../../node_modules/dotenv/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/stream/[path].js b/dsql-app/.local_dist/server/pages/api/stream/[path].js index e1f11e7..d06e4fc 100644 --- a/dsql-app/.local_dist/server/pages/api/stream/[path].js +++ b/dsql-app/.local_dist/server/pages/api/stream/[path].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5141,e.ids=[5141],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,n){return n in t?t[n]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,n)):"function"==typeof t&&"default"===n?t:void 0}}})},33921:(e,t,n)=>{n.r(t),n.d(t,{config:()=>P,default:()=>f,routeModule:()=>c});var r={};n.r(r),n.d(r,{default:()=>p});var i=n(89947),a=n(2706),o=n(96762),u=n(33873),s=n.n(u);let d=n(29021);async function p(e,t){if("GET"!==e.method)return t.json({msg:"Invalid Request"});let n=s().resolve(process.cwd(),"./public/videos"),r=e.query.name;if(!r||"string"!=typeof r){t.status(400).end("No video name provided");return}let i=s().join(n,r);if(!d.existsSync(i)){t.status(400).end("Video not found");return}d.statSync(i).size,e.headers.range,d.createReadStream(i).pipe(t)}let f=(0,o.M)(r,"default"),P=(0,o.M)(r,"config"),c=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/stream/[path]",pathname:"/api/stream/[path]",bundlePath:"",filename:""},userland:r})},2706:(e,t)=>{var n;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return n}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(n||(n={}))},89947:(e,t,n)=>{e.exports=n(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var n=t(t.s=33921);module.exports=n})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5141,e.ids=[5141],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,n){return n in t?t[n]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,n)):"function"==typeof t&&"default"===n?t:void 0}}})},99865:(e,t,n)=>{n.r(t),n.d(t,{config:()=>c,default:()=>P,routeModule:()=>l});var r={};n.r(r),n.d(r,{default:()=>f});var i=n(89947),a=n(2706),o=n(96762),u=n(29021),s=n.n(u),d=n(33873),p=n.n(d);async function f(e,t){if("GET"!==e.method)return t.json({msg:"Invalid Request"});let n=p().resolve(process.cwd(),"./public/videos"),r=e.query.name;if(!r||"string"!=typeof r){t.status(400).end("No video name provided");return}let i=p().join(n,r);if(!s().existsSync(i)){t.status(400).end("Video not found");return}s().statSync(i).size,e.headers.range,s().createReadStream(i).pipe(t)}let P=(0,o.M)(r,"default"),c=(0,o.M)(r,"config"),l=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/stream/[path]",pathname:"/api/stream/[path]",bundlePath:"",filename:""},userland:r})},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,n)=>{e.exports=n(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var n=t(t.s=99865);module.exports=n})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/stream/[path].js.nft.json b/dsql-app/.local_dist/server/pages/api/stream/[path].js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/stream/[path].js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/stream/[path].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sync-table-data.js b/dsql-app/.local_dist/server/pages/api/sync-table-data.js index fba2f6a..90e7baa 100644 --- a/dsql-app/.local_dist/server/pages/api/sync-table-data.js +++ b/dsql-app/.local_dist/server/pages/api/sync-table-data.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=538,e.ids=[538],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},41848:(e,r,t)=>{t.r(r),t.d(r,{config:()=>N,default:()=>h,routeModule:()=>I});var a={};t.r(a),t.d(a,{default:()=>y});var s=t(89947),o=t(2706),l=t(96762),n=t(48225),i=t.n(n),d=t(6420),u=t.n(d),c=t(27825),p=t.n(c),_=t(51348),m=t.n(_),b=t(27444);t(81630),t(48225);let f=t(51348);async function E({tbls:e,user:r,query:t}){let a;if(!t?.delegated)return{isPriviledged:!0,rootUserId:r.id};try{for(let t=0;te.dbFullName==i),c=n.find(e=>e.dbFullName==d),_=u?.tables.find(e=>e.tableName==o.table),f=c?.tables.find(e=>e.tableName==s.table);if(!_||!f)throw Error("Operation Failed! Tables Schemas not present.");if(!p().isEqual(f.fields,_.fields))throw Error("Tables incompatible");switch(a){case"Push":let S=await m()(`SELECT * FROM ${d}.${s.table}`),y=await (0,b.A)({dbName:o.db,paradigm:"import",payload:S,tableName:o.table,userId:l.rootUserId,payloadType:"object"});return await $({dbName:o.db,tableName:o.table,data:S,userId:l.rootUserId}),r.json({success:!0,payload:y});case"Pull":let h=await m()(`SELECT * FROM ${i}.${o.table}`),N=await (0,b.A)({dbName:s.db,paradigm:"import",payload:h,tableName:s.table,userId:l.rootUserId,payloadType:"object"});return await $({dbName:s.db,tableName:s.table,data:h,userId:l.rootUserId}),r.json({success:!0,payload:N})}r.json({success:!1})}catch(e){console.log(e.message),i()({component:"/api/sync-table-data",message:e.message,user:t}),r.json({success:!1,msg:e.message})}}async function $({dbName:e,tableName:r,data:t,userId:a}){let s=`${process.env.DSQL_USER_DB_PREFIX}${a}_${e.replace(/ /g,"")}`,o=t.map(e=>e.id),l=`DELETE FROM ${s}.${r}`;o?.[0]&&(l+=` WHERE id NOT IN (${o.join(",")})`),await m()(l)}let h=(0,l.M)(a,"default"),N=(0,l.M)(a,"config"),I=new s.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/sync-table-data",pathname:"/api/sync-table-data",bundlePath:"",filename:""},userland:a})},27444:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(47670),s=t.n(a);let o=t(48225),l=t(51348);async function n({paradigm:e,userId:r,dbName:t,tableName:a,payload:n,payloadType:i}){let d={};try{let o=`${process.env.DSQL_USER_DB_PREFIX}${r}_${t.replace(/ /g,"")}`;switch(e){case"export":let u=await l(`SELECT * FROM \`${o}\`.\`${a}\``);d.tableData=u;break;case"import":let c="base64"==i?Buffer.from(n,"base64").toString():n,p="object"===i?n:JSON.parse(c);for(let e=0;e{t(81630);let a=t(51348),s=t(72835),o=t(29021),l=t(31341);async function n(e,r,t,n){let{keyCookieName:i,csrfCookieName:d}=l();if(!e.cookies?.[i]?.match(/./))return null;let u=s({encryptedString:e.cookies[i]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await a(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=n},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=r;e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),l+=t;let n=r;e?.userId&&(n+=`user_${e.userId}_`),o&&(n+=`${o}_`),n+=a;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),{keyCookieName:l,csrfCookieName:n,oneTimeCodeName:i+=s}}},2258:(e,r,t)=>{let a=t(48225),s=t(29021),o=t(33873);e.exports=function({userId:e}){try{let r=o.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(s.readFileSync(r,"utf-8"))}catch(e){return a({component:"grabUserSchemaData",message:e.message}),null}}},48225:(e,r,t)=>{let a=t(29021),{IncomingMessage:s}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:s,req:o}){let l=new Date,n=(()=>{if(!o)return null;try{let e=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||a||r||o.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=538,e.ids=[538],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},69653:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>E,routeModule:()=>g});var a={};t.r(a),t.d(a,{default:()=>f});var s=t(89947),l=t(2706),o=t(96762),n=t(67619),i=t(69842),d=t(27825),u=t.n(d),c=t(48786),p=t(33170);async function _({tbls:e,user:r,query:t}){let a;if(!t?.delegated)return{isPriviledged:!0,rootUserId:r.id};try{for(let t=0;te.dbFullName==i),E=n.find(e=>e.dbFullName==d),S=f?.tables.find(e=>e.tableName==l.table),g=E?.tables.find(e=>e.tableName==s.table);if(!S||!g)throw Error("Operation Failed! Tables Schemas not present.");if(!u().isEqual(g.fields,S.fields))throw Error("Tables incompatible");switch(a){case"Push":let y=await (0,c.A)(`SELECT * FROM ${d}.${s.table}`),$=await (0,p.A)({dbName:l.db,paradigm:"import",payload:y,tableName:l.table,userId:o.rootUserId,payloadType:"object"});return await b({dbName:l.db,tableName:l.table,data:y,userId:o.rootUserId}),r.json({success:!0,payload:$});case"Pull":let v=await (0,c.A)(`SELECT * FROM ${i}.${l.table}`),N=await (0,p.A)({dbName:s.db,paradigm:"import",payload:v,tableName:s.table,userId:o.rootUserId,payloadType:"object"});return await b({dbName:s.db,tableName:s.table,data:v,userId:o.rootUserId}),r.json({success:!0,payload:N})}r.json({success:!1})}catch(e){console.log(e.message),(0,n.default)({component:"/api/sync-table-data",message:e.message,user:t}),r.json({success:!1,msg:e.message})}}async function b({dbName:e,tableName:r,data:t,userId:a}){let s=`${process.env.DSQL_USER_DB_PREFIX}${a}_${e.replace(/ /g,"")}`,l=t.map(e=>e.id),o=`DELETE FROM ${s}.${r}`;l?.[0]&&(o+=` WHERE id NOT IN (${l.join(",")})`),await (0,c.A)(o)}let E=(0,o.M)(a,"default"),S=(0,o.M)(a,"config"),g=new s.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/sync-table-data",pathname:"/api/sync-table-data",bundlePath:"",filename:""},userland:a})},33170:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(98e3),s=t(67619),l=t(48786);async function o({paradigm:e,userId:r,dbName:t,tableName:o,payload:n,payloadType:i}){let d={};try{let s=`${process.env.DSQL_USER_DB_PREFIX}${r}_${t.replace(/ /g,"")}`;switch(e){case"export":let u=await (0,l.A)(`SELECT * FROM \`${s}\`.\`${o}\``);d.tableData=u;break;case"import":let c="base64"==i?Buffer.from(n,"base64").toString():n,p="object"===i?n:JSON.parse(c);for(let e=0;e{t.d(r,{A:()=>i});var a=t(48786),s=t(95969),l=t(29021),o=t.n(l),n=t(89159);async function i(e,r,t){let{keyCookieName:l,csrfCookieName:i}=(0,n.A)();if(!e.cookies?.[l]?.match(/./))return null;let d=(0,s.A)({encryptedString:e.cookies[l]});if(!d)return null;let u=JSON.parse(d);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${c}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",l=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),l&&(o+=`${l}_`),o+=t;let n=r;e?.userId&&(n+=`user_${e.userId}_`),l&&(n+=`${l}_`),n+=a;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),l&&(i+=`${l}_`),{keyCookieName:o,csrfCookieName:n,oneTimeCodeName:i+=s}}},4820:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(67619),s=t(29021),l=t.n(s),o=t(33873),n=t.n(o);function i({userId:e}){try{let r=n().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(l().readFileSync(r,"utf-8"))}catch(e){return(0,a.default)({component:"grabUserSchemaData",message:e.message}),null}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>l});var a=t(29021),s=t.n(a);async function l({user:e,message:r,component:t,noMail:a,req:l}){let o=new Date,n=(()=>{if(!l)return null;try{let e=l.headers["x-forwarded-for"],r=l.headers["x-real-ip"],t=l.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||a||r||l.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),o?.url&&(s+=` -URL: ${o.url}`),o?.body&&(s+=` -Request Body: ${JSON.stringify(o.body,null,4)}`),n&&(s+=` -IP: ${n}`),s+=` -Date: ${l.toDateString()} -========================================`,a.existsSync("./.tmp/error.log")||a.writeFileSync("./.tmp/error.log","","utf-8");let i=a.readFileSync("./.tmp/error.log","utf-8");a.writeFileSync("./.tmp/error.log",s),a.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),l?.url&&(a+=` +URL: ${l.url}`),l?.body&&(a+=` +Request Body: ${JSON.stringify(l.body,null,4)}`),n&&(a+=` +IP: ${n}`),a+=` +Date: ${o.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let i=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",a),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:a,createDecipheriv:s}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let d=s("aes-192-cbc",a(l,n,i),o.alloc(16,0));try{let r=d.update(e,"hex","utf8");return r+=d.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[4050],()=>t(41848));module.exports=a})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(55511),s=t(79428);function l({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,n=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,a.scryptSync)(l,o,n),d=s.Buffer.alloc(16,0),u=(0,a.createDecipheriv)("aes-192-cbc",i,d);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[1251],()=>t(69653));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/sync-table-data.js.nft.json b/dsql-app/.local_dist/server/pages/api/sync-table-data.js.nft.json index 78bc7b4..dd60363 100644 --- a/dsql-app/.local_dist/server/pages/api/sync-table-data.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/sync-table-data.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/test/cors.js b/dsql-app/.local_dist/server/pages/api/test/cors.js index ac14536..446ebb6 100644 --- a/dsql-app/.local_dist/server/pages/api/test/cors.js +++ b/dsql-app/.local_dist/server/pages/api/test/cors.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7885,e.ids=[7885],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},76142:(e,t,r)=>{r.r(t),r.d(t,{config:()=>u,default:()=>l,routeModule:()=>d});var n={};r.r(n),r.d(n,{default:()=>a});var o=r(89947),s=r(2706),i=r(96762);async function a(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});t.setHeader("Access-Control-Allow-Credentials","true"),t.setHeader("Access-Control-Allow-Origin","*"),t.setHeader("Access-Control-Allow-Methods","*"),t.setHeader("Access-Control-Allow-Headers","*"),t.status(200).json({title:"Hello There",message:"General Kenobi"})}let l=(0,i.M)(n,"default"),u=(0,i.M)(n,"config"),d=new o.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/test/cors",pathname:"/api/test/cors",bundlePath:"",filename:""},userland:n})},2706:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=76142);module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7885,e.ids=[7885],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},66652:(e,t,r)=>{r.r(t),r.d(t,{config:()=>u,default:()=>l,routeModule:()=>d});var n={};r.r(n),r.d(n,{default:()=>a});var o=r(89947),s=r(2706),i=r(96762);async function a(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});t.setHeader("Access-Control-Allow-Credentials","true"),t.setHeader("Access-Control-Allow-Origin","*"),t.setHeader("Access-Control-Allow-Methods","*"),t.setHeader("Access-Control-Allow-Headers","*"),t.status(200).json({title:"Hello There",message:"General Kenobi"})}let l=(0,i.M)(n,"default"),u=(0,i.M)(n,"config"),d=new o.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/test/cors",pathname:"/api/test/cors",bundlePath:"",filename:""},userland:n})},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=66652);module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/test/cors.js.nft.json b/dsql-app/.local_dist/server/pages/api/test/cors.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/test/cors.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/test/cors.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/test/mail.js b/dsql-app/.local_dist/server/pages/api/test/mail.js index 57a6f1d..2e4e7a3 100644 --- a/dsql-app/.local_dist/server/pages/api/test/mail.js +++ b/dsql-app/.local_dist/server/pages/api/test/mail.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=5116,e.ids=[5116],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},57646:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>d,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>p});var s=t(89947),a=t(2706),i=t(96762),o=t(59474),l=t.n(o),u=t(48225),c=t.n(u);async function p(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});try{await l()({alias:"support",html:"

Test Mail

Hi there DSQL. Firing up on all systems now.

",subject:"Test Mail",text:"Test Mail",to:"dexomediaorg@gmail.com"}),r.json({success:!0})}catch(e){c()({component:"/api/addUserMedia/catch-error",message:e.message}),r.json({success:!1,msg:"Database Files could not be written!"})}}let d=(0,i.M)(n,"default"),m=(0,i.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/test/mail",pathname:"/api/test/mail",bundlePath:"",filename:""},userland:n})},59474:(e,r,t)=>{let n=t(29021),s=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:i}){let o;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let l=(i?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!n.existsSync("./email/index.html"))return;let u=n.readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,a||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let n={};n.from=`"Datasquirel" <${l}>`,n.sender=l,i&&(n["replyTo "]=l),n.to=e,n.subject=r,n.text=t,n.html=u,o=await s.sendMail(n)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return o}},48225:(e,r,t)=>{let n=t(29021),{IncomingMessage:s}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:s,req:a}){let i=new Date,o=(()=>{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 s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=5116,e.ids=[5116],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},5068:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>c,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>u});var s=t(89947),a=t(2706),i=t(96762),o=t(96052),l=t(67619);async function u(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});try{await (0,o.default)({alias:"support",html:"

Test Mail

Hi there DSQL. Firing up on all systems now.

",subject:"Test Mail",text:"Test Mail",to:"dexomediaorg@gmail.com"}),r.json({success:!0})}catch(e){(0,l.default)({component:"/api/addUserMedia/catch-error",message:e.message}),r.json({success:!1,msg:"Database Files could not be written!"})}}let c=(0,i.M)(n,"default"),d=(0,i.M)(n,"config"),p=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/test/mail",pathname:"/api/test/mail",bundlePath:"",filename:""},userland:n})},96052:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var n=t(29021),s=t.n(n),a=t(21572);let i=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 o({to:e,subject:r,text:t,html:n,alias:a,senderName:o}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let u=(a?.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}}/,n||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let n={};n.from=`"${o||"Datasquirel"}" <${u}>`,n.sender=u,a&&(n.replyTo=u),n.to=e,n.subject=r,n.text=t,n.html=c,l=await i.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 i=new Date,o=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(s+=` -URL: ${a.url}`),a?.body&&(s+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(s+=` -IP: ${o}`),s+=` +User Email: ${e?.email}`),a?.url&&(n+=` +URL: ${a.url}`),a?.body&&(n+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` Date: ${i.toDateString()} -========================================`,n.existsSync("./.tmp/error.log")||n.writeFileSync("./.tmp/error.log","","utf-8");let l=n.readFileSync("./.tmp/error.log","utf-8");n.writeFileSync("./.tmp/error.log",s),n.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=57646);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=5068);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/test/mail.js.nft.json b/dsql-app/.local_dist/server/pages/api/test/mail.js.nft.json index dc31431..0c23448 100644 --- a/dsql-app/.local_dist/server/pages/api/test/mail.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/test/mail.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/unsubscribe.js b/dsql-app/.local_dist/server/pages/api/unsubscribe.js index cffc60c..df5023c 100644 --- a/dsql-app/.local_dist/server/pages/api/unsubscribe.js +++ b/dsql-app/.local_dist/server/pages/api/unsubscribe.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6298,e.ids=[6298],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},10031:(e,r,s)=>{s.r(r),s.d(r,{config:()=>b,default:()=>m,routeModule:()=>c});var i={};s.r(i),s.d(i,{default:()=>p});var a=s(89947),t=s(2706),u=s(96762),l=s(47670),n=s.n(l),o=s(51348),d=s.n(o);async function p(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let{email:s,alerts:i,userId:a}=e.body;if(i)i&&await d()("DELETE FROM unsubscribes WHERE email=? AND type='alerts'",[s]);else{let e=await d()("SELECT email FROM unsubscribes WHERE email=? AND type='alerts'",[s]);e&&e[0]||await n()({dbFullName:"datasquirel",tableName:"unsubscribes",data:{email:s,type:"alerts",user_id:a||null}})}r.json({success:!0})}let m=(0,u.M)(i,"default"),b=(0,u.M)(i,"config"),c=new a.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/unsubscribe",pathname:"/api/unsubscribe",bundlePath:"",filename:""},userland:i})}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),i=r.X(0,[4050],()=>s(10031));module.exports=i})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6298,e.ids=[6298],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},21407:(e,r,s)=>{s.r(r),s.d(r,{config:()=>p,default:()=>o,routeModule:()=>m});var i={};s.r(i),s.d(i,{default:()=>d});var a=s(89947),t=s(2706),u=s(96762),l=s(98e3),n=s(48786);async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let{email:s,alerts:i,userId:a}=e.body;if(i)i&&await (0,n.A)("DELETE FROM unsubscribes WHERE email=? AND type='alerts'",[s]);else{let e=await (0,n.A)("SELECT email FROM unsubscribes WHERE email=? AND type='alerts'",[s]);e&&e[0]||await (0,l.A)({dbFullName:"datasquirel",tableName:"unsubscribes",data:{email:s,type:"alerts",user_id:a||null}})}r.json({success:!0})}let o=(0,u.M)(i,"default"),p=(0,u.M)(i,"config"),m=new a.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/unsubscribe",pathname:"/api/unsubscribe",bundlePath:"",filename:""},userland:i})}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),i=r.X(0,[1251],()=>s(21407));module.exports=i})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/unsubscribe.js.nft.json b/dsql-app/.local_dist/server/pages/api/unsubscribe.js.nft.json index 8310cb4..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/unsubscribe.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/unsubscribe.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js b/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js index de54b9b..3f78638 100644 --- a/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js +++ b/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=294,e.ids=[294],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},98397:(e,r,s)=>{s.r(r),s.d(r,{config:()=>S,default:()=>f,routeModule:()=>m});var t={};s.r(t),s.d(t,{default:()=>E});var i=s(89947),a=s(2706),l=s(96762),n=s(51348),u=s.n(n),o=s(6420),d=s.n(o),_=s(47670),c=s.n(_);s(29021),s(33873);let{execSync:p}=s(79646);async function E(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let s=await d()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{userObject:t,database_access:i,user_priviledge:a,db_tables:l,inv_user_id:n}=e.body,o=await u()("UPDATE user_users SET database_access = ? ,user_priviledge = ? WHERE user_id = ? AND email = ?",[i,a,s.id,t.email]),_=l.split("|");await u()(`DELETE FROM delegated_user_tables WHERE root_user_id='${s.id}' AND delegated_user_id='${n}'`);for(let e=0;e<_.length;e++){let[r,t]=_[e].split("-");await c()({dbFullName:"datasquirel",tableName:"delegated_user_tables",data:{delegated_user_id:n,root_user_id:s.id,database:r,table:t,priviledge:a}})}r.json({success:!!o?.affectedRows})}let f=(0,l.M)(t,"default"),S=(0,l.M)(t,"config"),m=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/updateAdminUserAccess",pathname:"/api/updateAdminUserAccess",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),i=s(72835),a=s(29021),l=s(31341);async function n(e,r,s,n){let{keyCookieName:u,csrfCookieName:o}=l();if(!e.cookies?.[u]?.match(/./))return null;let d=i({encryptedString:e.cookies[u]});if(!d)return null;let _=JSON.parse(d);if(!_.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a.existsSync(`${c}/${_.csrf_k}`))return null;if(0==_.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=n},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=s;let n=r;e?.userId&&(n+=`user_${e.userId}_`),a&&(n+=`${a}_`),n+=t;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),a&&(u+=`${a}_`),{keyCookieName:l,csrfCookieName:n,oneTimeCodeName:u+=i}}},72835:(e,r,s)=>{let{scryptSync:t,createDecipheriv:i}=s(55511),{Buffer:a}=s(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let l=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=s||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!l?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=i("aes-192-cbc",t(l,n,u),a.alloc(16,0));try{let r=o.update(e,"hex","utf8");return r+=o.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[4050],()=>s(98397));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=294,e.ids=[294],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},7522:(e,r,s)=>{s.r(r),s.d(r,{config:()=>p,default:()=>c,routeModule:()=>f});var t={};s.r(t),s.d(t,{default:()=>_});var i=s(89947),a=s(2706),n=s(96762),u=s(48786),l=s(69842),d=s(98e3);s(29021),s(33873);let{execSync:o}=s(79646);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let s=await (0,l.A)(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{userObject:t,database_access:i,user_priviledge:a,db_tables:n,inv_user_id:o}=e.body,_=await (0,u.A)("UPDATE user_users SET database_access = ? ,user_priviledge = ? WHERE user_id = ? AND email = ?",[i,a,s.id,t.email]),c=n.split("|");await (0,u.A)(`DELETE FROM delegated_user_tables WHERE root_user_id='${s.id}' AND delegated_user_id='${o}'`);for(let e=0;e{s.d(r,{A:()=>l});var t=s(48786),i=s(95969),a=s(29021),n=s.n(a),u=s(89159);async function l(e,r,s){let{keyCookieName:a,csrfCookieName:l}=(0,u.A)();if(!e.cookies?.[a]?.match(/./))return null;let d=(0,i.A)({encryptedString:e.cookies[a]});if(!d)return null;let o=JSON.parse(d);if(!o.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(o.csrf_k)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!n().existsSync(`${_}/${o.csrf_k}`))return null;if(0==o.verification_status&&!s){let e=await (0,t.A)(`SELECT verification_status FROM users WHERE id='${o.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return o?.date&&Date.now()-o.date>6048e5?null:o}},89159:(e,r,s)=>{s.d(r,{A:()=>t});function t(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",i=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),a&&(n+=`${a}_`),n+=s;let u=r;e?.userId&&(u+=`user_${e.userId}_`),a&&(u+=`${a}_`),u+=t;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:n,csrfCookieName:u,oneTimeCodeName:l+=i}}},95969:(e,r,s)=>{s.d(r,{A:()=>a});var t=s(55511),i=s(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:s}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,n=s||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!n?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,t.scryptSync)(a,n,u),d=i.Buffer.alloc(16,0),o=(0,t.createDecipheriv)("aes-192-cbc",l,d);try{let r=o.update(e,"hex","utf8");return r+=o.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[1251],()=>s(7522));module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js.nft.json index 8310cb4..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateAdminUserAccess.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js b/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js index 11cdca7..91785da 100644 --- a/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js +++ b/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3133,e.ids=[3133],e.modules={60818:e=>{e.exports=require("dotenv")},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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},47095:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>m,routeModule:()=>D});var s={};t.r(s),t.d(s,{default:()=>b});var a=t(89947),o=t(2706),n=t(96762),i=t(39831),l=t.n(i),u=t(48225),d=t.n(u),c=t(6420),_=t.n(c),p=t(19261),S=t.n(p);let f=t(29021);t(33873);let{execSync:E}=t(79646);async function b(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await _()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{tableData:s}=e.body,a=e.body.database,o=e.body.dbSlug;e.body.delegated;let n=a.replace(/[^a-z\_0-9]/g,"");try{let i=await l()({request:e,user:t,databaseSlug:o,query:e.query}),u=i?.rootUserId?i.rootUserId:t.id,d=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${u}/main.json`,c=JSON.parse(f.readFileSync(d,"utf-8")),_=c.findIndex(e=>e.dbFullName===a),p=c[_].tables.findIndex(e=>e.childTable&&e.childTableDbFullName===s.childTableDbFullName&&e.childTableName===s.childTableName&&e.tableName===s.tableName);c[_].tables[p]=s,f.writeFileSync(`${d}`,JSON.stringify(c),"utf8"),await S()({userId:u,targetDatabase:n}),r.json({success:!0})}catch(e){console.log(e.message),d()({component:"/api/addApiKey/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Foreign Key update Failed."})}}let m=(0,n.M)(s,"default"),g=(0,n.M)(s,"config"),D=new a.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/updateClonedTableForeignKeys",pathname:"/api/updateClonedTableForeignKeys",bundlePath:"",filename:""},userland:s})},39831:(e,r,t)=>{t(81630);let s=t(72835);e.exports=async function({request:e,databaseSlug:r,user:t,query:a}){try{let o=t.id,n=null;if(!a?.delegated)return{dbUserId:o};let i=a.dbUserId,l=`${process.env.DSQL_USER_DB_PREFIX}${i}_${r}`,u=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${l}`;try{if(!e.cookies?.[u])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[u]});if(!t)throw Error("Invalid Token");if((n=JSON.parse(t)).databaseSlug===r)return{dbUserId:o=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:o}}catch(e){return null}}},6420:(e,r,t)=>{t(81630);let s=t(51348),a=t(72835),o=t(29021),n=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:u}=n();if(!e.cookies?.[l]?.match(/./))return null;let d=a({encryptedString:e.cookies[l]});if(!d)return null;let c=JSON.parse(d);if(!c.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${_}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),o&&(n+=`${o}_`),n+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),{keyCookieName:n,csrfCookieName:i,oneTimeCodeName:l+=a}}},51348:(e,r,t)=>{let s=t(9973),a=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function n(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=n},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[2451],()=>t(47095));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3133,e.ids=[3133],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},25477:(e,r,t)=>{t.r(r),t.d(r,{config:()=>E,default:()=>p,routeModule:()=>S});var a={};t.r(a),t.d(a,{default:()=>f});var s=t(89947),n=t(2706),o=t(96762),i=t(60125),l=t(67619),d=t(69842),u=t(76856);let c=t(29021);t(33873);let{execSync:_}=t(79646);async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,d.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{tableData:a}=e.body,s=e.body.database,n=e.body.dbSlug;e.body.delegated;let o=s.replace(/[^a-z\_0-9]/g,"");try{let l=await (0,i.A)({request:e,user:t,databaseSlug:n,query:e.query}),d=l?.rootUserId?l.rootUserId:t.id,_=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${d}/main.json`,f=JSON.parse(c.readFileSync(_,"utf-8")),p=f.findIndex(e=>e.dbFullName===s),E=f[p].tables.findIndex(e=>e.childTable&&e.childTableDbFullName===a.childTableDbFullName&&e.childTableName===a.childTableName&&e.tableName===a.tableName);f[p].tables[E]=a,c.writeFileSync(`${_}`,JSON.stringify(f),"utf8"),await (0,u.A)({userId:d,targetDatabase:o}),r.json({success:!0})}catch(e){console.log(e.message),(0,l.default)({component:"/api/addApiKey/catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Foreign Key update Failed."})}}let p=(0,o.M)(a,"default"),E=(0,o.M)(a,"config"),S=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/updateClonedTableForeignKeys",pathname:"/api/updateClonedTableForeignKeys",bundlePath:"",filename:""},userland:a})},60125:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);async function s({request:e,databaseSlug:r,user:t,query:s}){try{let n=t.id,o=null;if(!s?.delegated)return{dbUserId:n};let i=s.dbUserId,l=`${process.env.DSQL_USER_DB_PREFIX}${i}_${r}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${l}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let t=(0,a.A)({encryptedString:e.cookies[d]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},69842:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(48786),s=t(95969),n=t(29021),o=t.n(n),i=t(89159);async function l(e,r,t){let{keyCookieName:n,csrfCookieName:l}=(0,i.A)();if(!e.cookies?.[n]?.match(/./))return null;let d=(0,s.A)({encryptedString:e.cookies[n]});if(!d)return null;let u=JSON.parse(d);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${c}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=a;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=s}}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[2282],()=>t(25477));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js.nft.json index dd2764f..847d86d 100644 --- a/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateClonedTableForeignKeys.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.env","../../../../jsonData/dbSchemas/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/main.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js b/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js index 3cdb74a..3b84a01 100644 --- a/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js +++ b/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=861,e.ids=[861],e.modules={60818:e=>{e.exports=require("dotenv")},27825:e=>{e.exports=require("lodash")},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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},23249:(e,r,t)=>{t.r(r),t.d(r,{config:()=>P,default:()=>A,routeModule:()=>O});var s={};t.r(s),t.d(s,{default:()=>N});var a=t(89947),o=t(2706),n=t(96762),l=t(51348),i=t.n(l),d=t(39831),u=t.n(d),c=t(48225),_=t.n(c),p=t(6420),f=t.n(p),m=t(2258),b=t.n(m),S=t(29021),E=t.n(S),D=t(27825),h=t.n(D),g=t(19261),I=t.n(g);t(29021),t(33873);let{execSync:v}=t(79646);async function N(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await f()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body.schema,a=e.body.database,o=e.body.table;e.body.delegated;try{let n;let l=await u()({request:e,user:t,databaseSlug:a,query:e.query}),d=l?.rootUserId?l.rootUserId:t.id,c=`datasquirel_user_${d}_${a}`.replace(/[^a-z\_0-9]/g,"");if(l?.delegated){let e=await i()("SELECT * FROM user_users WHERE invited_user_id=? AND user_id=? AND user_priviledge LIKE '%Edit Tables%'",[t.id,l.rootUserId]);e&&e[0]&&(n=!0)}else n=!0;if(!n)return r.json({success:!1,msg:"Unauthorized"});let _=b()({userId:d});if(!_)throw Error("Database schema not found!");if(!function({dbSchemaData:e,delegatedUser:r,dbFullName:t,schema:s,table:a,userId:o}){let n=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${o}/main.json`;try{if(!e)throw Error("Database schema not found!");let o=h().cloneDeep(e),l=o.find(e=>e.dbFullName==t);if(!l)throw Error("Old Database schema not found!");let i=o.findIndex(e=>e.dbFullName==t);if(i<0)throw Error("Target Database index not found!");let d=s.find(e=>e.dbFullName===t);if(!d)throw Error("New Database schema not found!");if(r?.delegated&&(r.priviledges?.match(/create.?table/i),!r.priviledges?.match(/edit.?table/i)))throw Error("Unauthorized!");let u=d.tables.find(e=>e.tableName==a.tableName);if(!u)throw Error("Table schema not found!");let c=l.tables.findIndex(e=>e.tableName==a.tableName);u&&(o[i].tables[c]=u);let _=l?.childrenDatabases;_?.forEach(e=>{let r=o.findIndex(r=>r.dbFullName===e.dbFullName);o[r]&&l&&(o[r].tables=l.tables.map(e=>{let r=h().cloneDeep(e);return delete r.childrenTables,r}))});let p=o?.[i]?.tables?.[c]?.childrenTables;return p&&p.forEach(e=>{let r=o.findIndex(r=>r.dbFullName==e.dbNameFull),t=o[r]?.tables?.findIndex(r=>r.tableName===e.tableName);o[r]?.tables[t]&&(o[r].tables[t].fields=h().cloneDeep(u.fields),o[r].tables[t].indexes=h().cloneDeep(u.indexes))}),E().writeFileSync(`${n}`,JSON.stringify(o),"utf8"),!0}catch(e){return console.log("updateSchemaData.js ERROR: ",e.message),!1}}({dbFullName:c,dbSchemaData:_,delegatedUser:l,schema:s,table:o,userId:d}))throw Error("Update Failed!");return await I()({userId:d,targetDatabase:c}),r.json({success:!0})}catch(e){console.log("updateDbSchemaDataForUser ERROR:",e.message),_()({component:"/api/updateDbSchemaDataForUser/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:e.message})}}let A=(0,n.M)(s,"default"),P=(0,n.M)(s,"config"),O=new a.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/updateDbSchemaDataForUser",pathname:"/api/updateDbSchemaDataForUser",bundlePath:"",filename:""},userland:s})},39831:(e,r,t)=>{t(81630);let s=t(72835);e.exports=async function({request:e,databaseSlug:r,user:t,query:a}){try{let o=t.id,n=null;if(!a?.delegated)return{dbUserId:o};let l=a.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[d]});if(!t)throw Error("Invalid Token");if((n=JSON.parse(t)).databaseSlug===r)return{dbUserId:o=n.rootUserId,rootUserId:n.rootUserId,rootUserName:n.rootUserName,rootUserEmail:n.rootUserEmail,rootUserImage:n.rootUserImage,databaseFullName:n.databaseFullName,databaseSlug:n.databaseSlug,allowedTables:n.allowedTables,priviledges:n.priviledges,database:n.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:o}}catch(e){return null}}},6420:(e,r,t)=>{t(81630);let s=t(51348),a=t(72835),o=t(29021),n=t(31341);async function l(e,r,t,l){let{keyCookieName:i,csrfCookieName:d}=n();if(!e.cookies?.[i]?.match(/./))return null;let u=a({encryptedString:e.cookies[i]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${c.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${_}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}e.exports=l},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),n=r;e?.userId&&(n+=`user_${e.userId}_`),o&&(n+=`${o}_`),n+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),o&&(l+=`${o}_`),l+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),{keyCookieName:n,csrfCookieName:l,oneTimeCodeName:i+=a}}},2258:(e,r,t)=>{let s=t(48225),a=t(29021),o=t(33873);e.exports=function({userId:e}){try{let r=o.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(a.readFileSync(r,"utf-8"))}catch(e){return s({component:"grabUserSchemaData",message:e.message}),null}}},51348:(e,r,t)=>{let s=t(9973),a=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function n(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=n},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[2451],()=>t(23249));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=861,e.ids=[861],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},15679:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>h,routeModule:()=>D});var a={};t.r(a),t.d(a,{default:()=>S});var s=t(89947),n=t(2706),o=t(96762),l=t(48786),i=t(60125),d=t(67619),u=t(69842),c=t(4820),f=t(29021),_=t.n(f),b=t(27825),E=t.n(b),m=t(76856);t(29021),t(33873);let{execSync:p}=t(79646);async function S(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let a=e.body.schema,s=e.body.database,n=e.body.table;e.body.delegated;try{let o;let d=await (0,i.A)({request:e,user:t,databaseSlug:s,query:e.query}),u=d?.rootUserId?d.rootUserId:t.id,f=`datasquirel_user_${u}_${s}`.replace(/[^a-z\_0-9]/g,"");if(d?.delegated){let e=await (0,l.A)("SELECT * FROM user_users WHERE invited_user_id=? AND user_id=? AND user_priviledge LIKE '%Edit Tables%'",[t.id,d.rootUserId]);e&&e[0]&&(o=!0)}else o=!0;if(!o)return r.json({success:!1,msg:"Unauthorized"});let b=(0,c.A)({userId:u});if(!b)throw Error("Database schema not found!");if(!function({dbSchemaData:e,delegatedUser:r,dbFullName:t,schema:a,table:s,userId:n}){let o=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${n}/main.json`;try{if(!e)throw Error("Database schema not found!");let n=E().cloneDeep(e),l=n.find(e=>e.dbFullName==t);if(!l)throw Error("Old Database schema not found!");let i=n.findIndex(e=>e.dbFullName==t);if(i<0)throw Error("Target Database index not found!");let d=a.find(e=>e.dbFullName===t);if(!d)throw Error("New Database schema not found!");if(r?.delegated&&(r.priviledges?.match(/create.?table/i),!r.priviledges?.match(/edit.?table/i)))throw Error("Unauthorized!");let u=d.tables.find(e=>e.tableName==s.tableName);if(!u)throw Error("Table schema not found!");let c=l.tables.findIndex(e=>e.tableName==s.tableName);u&&(n[i].tables[c]=u);let f=l?.childrenDatabases;f?.forEach(e=>{let r=n.findIndex(r=>r.dbFullName===e.dbFullName);n[r]&&l&&(n[r].tables=l.tables.map(e=>{let r=E().cloneDeep(e);return delete r.childrenTables,r}))});let b=n?.[i]?.tables?.[c]?.childrenTables;return b&&b.forEach(e=>{let r=n.findIndex(r=>r.dbFullName==e.dbNameFull),t=n[r]?.tables?.findIndex(r=>r.tableName===e.tableName);n[r]?.tables[t]&&(n[r].tables[t].fields=E().cloneDeep(u.fields),n[r].tables[t].indexes=E().cloneDeep(u.indexes))}),_().writeFileSync(`${o}`,JSON.stringify(n),"utf8"),!0}catch(e){return console.log("updateSchemaData.ts ERROR: ",e.message),!1}}({dbFullName:f,dbSchemaData:b,delegatedUser:d,schema:a,table:n,userId:u}))throw Error("Update Failed!");return await (0,m.A)({userId:u,targetDatabase:f}),r.json({success:!0})}catch(e){console.log("updateDbSchemaDataForUser ERROR:",e.message),(0,d.default)({component:"/api/updateDbSchemaDataForUser/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:e.message})}}let h=(0,o.M)(a,"default"),g=(0,o.M)(a,"config"),D=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/updateDbSchemaDataForUser",pathname:"/api/updateDbSchemaDataForUser",bundlePath:"",filename:""},userland:a})},60125:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);async function s({request:e,databaseSlug:r,user:t,query:s}){try{let n=t.id,o=null;if(!s?.delegated)return{dbUserId:n};let l=s.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${l}_${r}`,d=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[d])throw Error("Cookie not present");let t=(0,a.A)({encryptedString:e.cookies[d]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},69842:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(48786),s=t(95969),n=t(29021),o=t.n(n),l=t(89159);async function i(e,r,t){let{keyCookieName:n,csrfCookieName:i}=(0,l.A)();if(!e.cookies?.[n]?.match(/./))return null;let d=(0,s.A)({encryptedString:e.cookies[n]});if(!d)return null;let u=JSON.parse(d);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let c=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!c)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${c}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=a;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=s}}},4820:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(67619),s=t(29021),n=t.n(s),o=t(33873),l=t.n(o);function i({userId:e}){try{let r=l().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(n().readFileSync(r,"utf-8"))}catch(e){return(0,a.default)({component:"grabUserSchemaData",message:e.message}),null}}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[2282],()=>t(15679));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js.nft.json index c3ba013..3cc874c 100644 --- a/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateDbSchemaDataForUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.env","../../../../jsonData/dbSchemas/main.json","../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/main.json","../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateDbUser.js b/dsql-app/.local_dist/server/pages/api/updateDbUser.js index 07d6a89..9cbde5a 100644 --- a/dsql-app/.local_dist/server/pages/api/updateDbUser.js +++ b/dsql-app/.local_dist/server/pages/api/updateDbUser.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3683,e.ids=[3683],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},96016:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>p,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),o=t(2706),a=t(96762),c=t(33364),i=t.n(c),l=t(6420),u=t.n(l);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await u()(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{dbFullName:t,payload:s}=e.body,n=(()=>{let e=Object.keys(s),r={};return e.forEach(e=>{!e?.match(/user_type|priviledge|database_access|databases?|confirm/)&&(e?.match(/databases|confirm/)||(r[e]=s[e]))}),r})(),o=await i()({dbFullName:t,tableName:"users",identifierColumnName:"id",identifierValue:s.id,data:{...n},dbContext:"Dsql User",paradigm:"Full Access"});r.json({success:!!o?.affectedRows,msg:o?.affectedRows?"User Updated":o})}let p=(0,a.M)(s,"default"),d=(0,a.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/updateDbUser",pathname:"/api/updateDbUser",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),a=t(31341);async function c(e,r,t,c){let{keyCookieName:i,csrfCookieName:l}=a();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),{keyCookieName:a,csrfCookieName:c,oneTimeCodeName:i+=n}}},33364:(e,r,t)=>{let s=t(72583),n=t(16570),o=t(51348),a=t(21339),c=t(20503),i=t(44900);async function l({dbContext:e,paradigm:r,dbFullName:t,tableName:l,data:u,tableSchema:_,identifierColumnName:p,identifierValue:d,encryptionKey:S,encryptionSalt:f,useLocal:E}){if(!u||!Object.keys(u).length)return null;let D=!!E||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),g=E?i:D?o:a,h=Object.keys(u),m=[],v=[];for(let e=0;ee.fieldName===r):null,a=o&&o[0]?o[0]:null;if(null==t||void 0==t)continue;let i=/<[^>]+>/g;(a?.richText||String(t).match(i))&&(t=s(t,n)),a?.encrypted&&(t=c({data:t,encryptionKey:S,encryptionSalt:f})),"object"==typeof t&&(t=JSON.stringify(t)),a?.pattern&&!new RegExp(a.pattern,a.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),m.push(`\`${r}\`=?`),"number"==typeof t?v.push(String(t)):v.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}m.push(`date_updated='${Date()}'`),m.push(`date_updated_code='${Date.now()}'`);let L=`UPDATE ${l} SET ${m.join(",")} WHERE \`${p}\`=?`;return v.push(d),D?await g(L,v):await g({paradigm:r,database:t,queryString:L,queryValues:v})}e.exports=l},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(a,c,i),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=n("aes-192-cbc",s(a,c,i),o.alloc(16,0));try{let r=l.update(e,"utf8","hex");return r+=l.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),o=t(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){a.end(),i(JSON.parse(JSON.stringify(e)))}function p(e){a.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:c,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),c&&Array.isArray(c)&&c[0]?a.query(t,c).then(_).catch(p):a.query(t).then(_).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function o(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=96016);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3683,e.ids=[3683],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},18348:(e,t,r)=>{r.r(t),r.d(t,{config:()=>d,default:()=>u,routeModule:()=>f});var n={};r.r(n),r.d(n,{default:()=>l});var s=r(89947),a=r(2706),o=r(96762),i=r(30802),c=r(69842);async function l(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});if(!await (0,c.A)(e,t,!0))return t.json({success:!1,msg:"Unauthorized"});let{dbFullName:r,payload:n}=e.body,s=(()=>{let e=Object.keys(n),t={};return e.forEach(e=>{!e?.match(/user_type|priviledge|database_access|databases?|confirm/)&&(e?.match(/databases|confirm/)||(t[e]=n[e]))}),t})(),a=await (0,i.A)({dbFullName:r,tableName:"users",identifierColumnName:"id",identifierValue:n.id,data:{...s},dbContext:"Dsql User",paradigm:"Full Access"});t.json({success:!!a?.affectedRows,msg:a?.affectedRows?"User Updated":a})}let u=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/updateDbUser",pathname:"/api/updateDbUser",bundlePath:"",filename:""},userland:n})},69842:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(48786),s=r(95969),a=r(29021),o=r.n(a),i=r(89159);async function c(e,t,r){let{keyCookieName:a,csrfCookieName:c}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let l=(0,s.A)({encryptedString:e.cookies[a]});if(!l)return null;let u=JSON.parse(l);if(!u.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!r){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,t,r)=>{r.d(t,{A:()=>n});function n(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=n;let c=t;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:c+=s}}},30802:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(72583),s=r.n(n),a=r(92652),o=r(48786),i=r(37275),c=r(68829),l=r(7971);async function u({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:u,tableSchema:d,identifierColumnName:f,identifierValue:_,encryptionKey:p,encryptionSalt:S,useLocal:g}){if(!u||!Object.keys(u).length)return null;let E=!!g||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),y=g?l.A:E?o.A:i.default,h=Object.keys(u),m=[],D=[];for(let e=0;ee.fieldName===t):null,o=n&&n[0]?n[0]:null;if(null==r||void 0==r)continue;let i=/<[^>]+>/g;(o?.richText||String(r).match(i))&&(r=s()(r,a.A)),o?.encrypted&&(r=(0,c.default)({data:r,encryptionKey:p,encryptionSalt:S})),"object"==typeof r&&(r=JSON.stringify(r)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),m.push(`\`${t}\`=?`),"number"==typeof r?D.push(String(r)):D.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}m.push(`date_updated='${Date()}'`),m.push(`date_updated_code='${Date.now()}'`);let N=`UPDATE \`${r}\`.\`${n}\` SET ${m.join(",")} WHERE \`${f}\`=?`;return D.push(_),E?await y(N,D):await y({paradigm:t,queryString:N,queryValues:D})}},92652:(e,t,r)=>{r.d(t,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},95969:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(55511),s=r(79428);function a({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,n.scryptSync)(a,o,i),l=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",c,l);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},68829:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(55511),s=r(79428);function a({data:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=(0,n.scryptSync)(a,o,i),l=s.Buffer.alloc(16,0),u=(0,n.createCipheriv)("aes-192-cbc",c,l);try{let t=u.update(e,"utf8","hex");return t+=u.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},48786:(e,t,r)=>{r.d(t,{A:()=>n});async function n(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},37275:(e,t,r)=>{async function n(e,t,r){try{if("string"==typeof t){let n=await e.query(s(t),r);return JSON.parse(JSON.stringify(n))}if("object"!=typeof t)return null;{let r=[];for(let n=0;na})},7971:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(9973),s=r.n(n),a=r(29021),o=r.n(a);async function i(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!o().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=t(t.s=18348);module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateDbUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateDbUser.js.nft.json index d78c2e0..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/updateDbUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateDbUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateTableEntry.js b/dsql-app/.local_dist/server/pages/api/updateTableEntry.js index 510a2de..06dda4e 100644 --- a/dsql-app/.local_dist/server/pages/api/updateTableEntry.js +++ b/dsql-app/.local_dist/server/pages/api/updateTableEntry.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=1132,e.ids=[1132],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},82595:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>h,routeModule:()=>N});var s={};t.r(s),t.d(s,{default:()=>D});var a=t(89947),n=t(2706),o=t(96762),i=t(96771),l=t.n(i),c=t(73677),u=t.n(c),d=t(39831),_=t.n(d),p=t(48225),S=t.n(p),E=t(6420),g=t.n(E),f=t(33364),m=t.n(f);async function D(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await g()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbSlug:s,tableName:a,payload:n,entryId:o,tableSchema:i,delegated:c,dbId:d}=e.body;delete n.id,delete n.uuid,delete n.date_created,delete n.date_created_code,delete n.date_created_timestamp,delete n.date_updated,delete n.date_updated_code,delete n.date_updated_timestamp;try{let c=await _()({databaseSlug:s,request:e,user:t,query:e.query}),p=c?.rootUserId?`datasquirel_user_${c.rootUserId}_${s}`:`datasquirel_user_${t.id}_${s}`;if(!await u()({user:t,confirmedDelegetedUser:c,database:s,table:a,dbId:d,priviledgeRegex:/Update Entries/i}))return r.json({success:!1,msg:"Unauthorized"});let S=await m()({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:p,tableName:a,identifierColumnName:"id",identifierValue:o,data:n,tableSchema:i});if(S?.error)throw Error(S.error);if(!S)throw Error("No result returned!");await l()({dbName:p,entryId:o,entryOrder:n.order,tableName:a,tableSchema:i}),r.json({success:!0,payload:S})}catch(e){S()({component:"/api/updateTableEntry/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!",err:e.message})}}let h=(0,o.M)(s,"default"),y=(0,o.M)(s,"config"),N=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/updateTableEntry",pathname:"/api/updateTableEntry",bundlePath:"",filename:""},userland:s})},73677:(e,r,t)=>{let s=t(51348),a=t(48225);e.exports=async function({user:e,confirmedDelegetedUser:r,database:t,table:n,priviledgeRegex:o,dbId:i}){let l,c;try{r?.delegated?(l=await s("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,t,n]),c=l[0]?.priviledge?.match(o)):(l=await s("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,n,i]),c=!0)}catch(r){a({component:"checkUserRights",message:r.message,user:e})}return!!l&&!!l[0]&&!!c}},39831:(e,r,t)=>{t(81630);let s=t(72835);e.exports=async function({request:e,databaseSlug:r,user:t,query:a}){try{let n=t.id,o=null;if(!a?.delegated)return{dbUserId:n};let i=a.dbUserId,l=`${process.env.DSQL_USER_DB_PREFIX}${i}_${r}`,c=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${l}`;try{if(!e.cookies?.[c])throw Error("Cookie not present");let t=s({encryptedString:e.cookies[c]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},96771:(e,r,t)=>{let s=t(21339);e.exports=async function({dbName:e,entryId:r,entryOrder:t,tableName:a,tableSchema:n}){try{if(n.fields.find(e=>!!e.fieldName?.match(/^order$/i))&&t){let n=await s({database:e,paradigm:"Full Access",queryString:`SELECT * FROM ${a} WHERE \`order\` = '${t}' AND id != ?`,queryValues:[String(r)]});if(!n?.[0])throw Error("No Existing Order");await s({database:e,paradigm:"Full Access",queryString:`UPDATE ${a} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ${t} AND id != ?`,queryValues:[String(r)]})}return!0}catch(e){return!1}}},6420:(e,r,t)=>{t(81630);let s=t(51348),a=t(72835),n=t(29021),o=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=a({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!n.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=a}}},33364:(e,r,t)=>{let s=t(72583),a=t(16570),n=t(51348),o=t(21339),i=t(20503),l=t(44900);async function c({dbContext:e,paradigm:r,dbFullName:t,tableName:c,data:u,tableSchema:d,identifierColumnName:_,identifierValue:p,encryptionKey:S,encryptionSalt:E,useLocal:g}){if(!u||!Object.keys(u).length)return null;let f=!!g||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),m=g?l:f?n:o,D=Object.keys(u),h=[],y=[];for(let e=0;ee.fieldName===r):null,o=n&&n[0]?n[0]:null;if(null==t||void 0==t)continue;let l=/<[^>]+>/g;(o?.richText||String(t).match(l))&&(t=s(t,a)),o?.encrypted&&(t=i({data:t,encryptionKey:S,encryptionSalt:E})),"object"==typeof t&&(t=JSON.stringify(t)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),h.push(`\`${r}\`=?`),"number"==typeof t?y.push(String(t)):y.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}h.push(`date_updated='${Date()}'`),h.push(`date_updated_code='${Date.now()}'`);let N=`UPDATE ${c} SET ${h.join(",")} WHERE \`${_}\`=?`;return y.push(p),f?await m(N,y):await m({paradigm:r,database:t,queryString:N,queryValues:y})}e.exports=c},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:a,req:n}){let o=new Date,i=(()=>{if(!n)return null;try{let e=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)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=1132,e.ids=[1132],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},18885:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>f,routeModule:()=>E});var a={};t.r(a),t.d(a,{default:()=>p});var n=t(89947),s=t(2706),o=t(96762),i=t(77377),l=t(31495),u=t(60125),c=t(67619),d=t(69842),_=t(30802);async function p(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await (0,d.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{dbSlug:a,tableName:n,payload:s,entryId:o,tableSchema:p,delegated:f,dbId:g}=e.body;delete s.id,delete s.uuid,delete s.date_created,delete s.date_created_code,delete s.date_created_timestamp,delete s.date_updated,delete s.date_updated_code,delete s.date_updated_timestamp;try{let c=await (0,u.A)({databaseSlug:a,request:e,user:t,query:e.query}),d=c?.rootUserId?`datasquirel_user_${c.rootUserId}_${a}`:`datasquirel_user_${t.id}_${a}`;if(!await (0,l.A)({user:t,confirmedDelegetedUser:c,database:a,table:n,dbId:g,priviledgeRegex:/Update Entries/i}))return r.json({success:!1,msg:"Unauthorized"});let f=await (0,_.A)({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:d,tableName:n,identifierColumnName:"id",identifierValue:o,data:s,tableSchema:p});if(f?.error)throw Error(f.error);if(!f)throw Error("No result returned!");await (0,i.A)({dbName:d,entryId:o,entryOrder:s.order,tableName:n,tableSchema:p}),r.json({success:!0,payload:f})}catch(e){(0,c.default)({component:"/api/updateTableEntry/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!",err:e.message})}}let f=(0,o.M)(a,"default"),g=(0,o.M)(a,"config"),E=new n.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/updateTableEntry",pathname:"/api/updateTableEntry",bundlePath:"",filename:""},userland:a})},31495:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(48786),n=t(67619);async function s({user:e,confirmedDelegetedUser:r,database:t,table:s,priviledgeRegex:o,dbId:i}){let l,u;try{r?.delegated?(l=await (0,a.A)("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[r.rootUserId,e.id,t,s]),u=l[0]?.priviledge?.match(o)):(l=await (0,a.A)("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,s,i]),u=!0)}catch(r){(0,n.default)({component:"checkUserRights",message:r.message,user:e})}return!!l&&!!l[0]&&!!u}},60125:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(95969);async function n({request:e,databaseSlug:r,user:t,query:n}){try{let s=t.id,o=null;if(!n?.delegated)return{dbUserId:s};let i=n.dbUserId,l=`${process.env.DSQL_USER_DB_PREFIX}${i}_${r}`,u=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${l}`;try{if(!e.cookies?.[u])throw Error("Cookie not present");let t=(0,a.A)({encryptedString:e.cookies[u]});if(!t)throw Error("Invalid Token");if((o=JSON.parse(t)).databaseSlug===r)return{dbUserId:s=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:s}}catch(e){return null}}},77377:(e,r,t)=>{t.d(r,{A:()=>n});let a=t(37275);async function n({dbName:e,entryId:r,entryOrder:t,tableName:n,tableSchema:s}){try{if(s.fields.find(e=>!!e.fieldName?.match(/^order$/i))&&t){let s=await a({database:e,paradigm:"Full Access",queryString:`SELECT * FROM ${n} WHERE \`order\` = '${t}' AND id != ?`,queryValues:[String(r)]});if(!s?.[0])throw Error("No Existing Order");await a({database:e,paradigm:"Full Access",queryString:`UPDATE ${n} SET \`order\` = \`order\` + 1 WHERE \`order\` >= ${t} AND id != ?`,queryValues:[String(r)]})}return!0}catch(e){return!1}}},69842:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(48786),n=t(95969),s=t(29021),o=t.n(s),i=t(89159);async function l(e,r,t){let{keyCookieName:s,csrfCookieName:l}=(0,i.A)();if(!e.cookies?.[s]?.match(/./))return null;let u=(0,n.A)({encryptedString:e.cookies[s]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>a});function a(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),s&&(o+=`${s}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),s&&(i+=`${s}_`),i+=a;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),s&&(l+=`${s}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},30802:(e,r,t)=>{t.d(r,{A:()=>c});var a=t(72583),n=t.n(a),s=t(92652),o=t(48786),i=t(37275),l=t(68829),u=t(7971);async function c({dbContext:e,paradigm:r,dbFullName:t,tableName:a,data:c,tableSchema:d,identifierColumnName:_,identifierValue:p,encryptionKey:f,encryptionSalt:g,useLocal:E}){if(!c||!Object.keys(c).length)return null;let S=!!E||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),m=E?u.A:S?o.A:i.default,y=Object.keys(c),h=[],A=[];for(let e=0;ee.fieldName===r):null,o=a&&a[0]?a[0]:null;if(null==t||void 0==t)continue;let i=/<[^>]+>/g;(o?.richText||String(t).match(i))&&(t=n()(t,s.A)),o?.encrypted&&(t=(0,l.default)({data:t,encryptionKey:f,encryptionSalt:g})),"object"==typeof t&&(t=JSON.stringify(t)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),h.push(`\`${r}\`=?`),"number"==typeof t?A.push(String(t)):A.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}h.push(`date_updated='${Date()}'`),h.push(`date_updated_code='${Date.now()}'`);let N=`UPDATE \`${t}\`.\`${a}\` SET ${h.join(",")} WHERE \`${_}\`=?`;return A.push(p),S?await m(N,A):await m({paradigm:r,queryString:N,queryValues:A})}},92652:(e,r,t)=>{t.d(r,{A:()=>a});let a={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var a=t(29021),n=t.n(a);async function s({user:e,message:r,component:t,noMail:a,req:s}){let o=new Date,i=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||a||r||s.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(a+=` -URL: ${n.url}`),n?.body&&(a+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(a+=` +User Email: ${e?.email}`),s?.url&&(a+=` +URL: ${s.url}`),s?.body&&(a+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),i&&(a+=` IP: ${i}`),a+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",a),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:a}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=a("aes-192-cbc",s(o,i,l),n.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:a}=t(55511),{Buffer:n}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=a("aes-192-cbc",s(o,i,l),n.alloc(16,0));try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),a=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function o(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let a=t(9973),n=t(21580),o=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),l(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),l({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:n()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(d).catch(_):o.query(t).then(d).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),a=t(21580);async function n(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=82595);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(55511),n=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,a.scryptSync)(s,o,i),u=n.Buffer.alloc(16,0),c=(0,a.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var a=t(55511),n=t(79428);function s({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,a.scryptSync)(s,o,i),u=n.Buffer.alloc(16,0),c=(0,a.createCipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function a(e,r,t){try{if("string"==typeof r){let a=await e.query(n(r),t);return JSON.parse(JSON.stringify(a))}if("object"!=typeof r)return null;{let t=[];for(let a=0;as})},7971:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(9973),n=t.n(a),s=t(29021),o=t.n(s);async function i(...e){let r=n()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=18885);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateTableEntry.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateTableEntry.js.nft.json index d78c2e0..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/updateTableEntry.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateTableEntry.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUser.js b/dsql-app/.local_dist/server/pages/api/updateUser.js index 4af2f17..42717f4 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUser.js +++ b/dsql-app/.local_dist/server/pages/api/updateUser.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8925,e.ids=[8925],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},34229:e=>{e.exports=require("node-fetch")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},9288:e=>{e.exports=require("sharp")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},43359:(e,r,t)=>{t.r(r),t.d(r,{config:()=>v,default:()=>y,routeModule:()=>L});var s={};t.r(s),t.d(s,{default:()=>D});var n=t(89947),a=t(2706),o=t(96762),i=t(51348),l=t.n(i),c=t(17662),u=t.n(c),p=t(48225),_=t.n(p),d=t(6420),S=t.n(d),f=t(33873),m=t.n(f),g=t(79646),E=t(33364),h=t.n(E);async function D(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await S()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{first_name:s,last_name:n,image:a}=e.body;try{let e=(await l()(`SELECT image FROM users WHERE id='${t.id}'`))[0].image===a,o=process.env.DSQL_STATIC_SERVER_DIR;if(!o)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let i=m().join(o,`images/user-images/user-${t.id}/user-${t.id}-profile.jpg`),c=m().join(o,`images/user-images/user-${t.id}/user-${t.id}-profile-thumbnail.jpg`);e||(await u()({imageSourceUrl:"string"==typeof a?a:a.imageBase64,imageWritePath:i,sourceType:"string"==typeof a?"url":"base64"}),await u()({imageSourceUrl:"string"==typeof a?a:a.imageBase64,imageWritePath:c,maxSize:250,sourceType:"string"==typeof a?"url":"base64"}),(0,g.execSync)(`chmod 644 ${i} ${c}`));let p=i.replace(o,process.env.DSQL_STATIC_HOST||""),_=c.replace(o,process.env.DSQL_STATIC_HOST||"");await h()({dbFullName:"datasquirel",tableName:"users",identifierColumnName:"id",identifierValue:t.id,data:{first_name:s,last_name:n,image:p,image_thumbnail:_}}),await h()({dbFullName:"datasquirel",tableName:"user_users",identifierColumnName:"invited_user_id",identifierValue:t.id,data:{first_name:s,last_name:n,image:p,image_thumbnail:_}}),r.json({user:!0})}catch(e){_()({component:"/api/updateUser/main-catch-error",message:e.message,user:t}),r.json({user:null})}}let y=(0,o.M)(s,"default"),v=(0,o.M)(s,"config"),L=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/updateUser",pathname:"/api/updateUser",bundlePath:"",filename:""},userland:s})},17662:(e,r,t)=>{let s=t(34229),n=t(9288),a=t(48225);e.exports=async function({imageSourceUrl:e,imageWritePath:r,maxSize:t,sourceType:o}){try{async function i(){let r;if(o?.match("url")){if(e.match(/^http/i)){let t=await s(e,{});r=await t.buffer()}else r=`./public${e}`}else o?.match("base64")&&(r=Buffer.from(e,"base64"));return r}let a=await i(),l=t||650,c=n(a),{width:u,height:p,format:_}=await c.metadata();if(u&&p&&u>l){let e=l/u;c.resize(l,Math.round(p*e),{fit:"cover"})}_&&c.toFormat(_,{quality:80}),await c.toFile(r)}catch(e){a({component:"functions/backend/fsWriteImageToDisk",message:e.message})}}},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function i(e,r,t,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${_}/${p.csrf_k}`))return null;if(0==p.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=i},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},33364:(e,r,t)=>{let s=t(72583),n=t(16570),a=t(51348),o=t(21339),i=t(20503),l=t(44900);async function c({dbContext:e,paradigm:r,dbFullName:t,tableName:c,data:u,tableSchema:p,identifierColumnName:_,identifierValue:d,encryptionKey:S,encryptionSalt:f,useLocal:m}){if(!u||!Object.keys(u).length)return null;let g=!!m||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),E=m?l:g?a:o,h=Object.keys(u),D=[],y=[];for(let e=0;ee.fieldName===r):null,o=a&&a[0]?a[0]:null;if(null==t||void 0==t)continue;let l=/<[^>]+>/g;(o?.richText||String(t).match(l))&&(t=s(t,n)),o?.encrypted&&(t=i({data:t,encryptionKey:S,encryptionSalt:f})),"object"==typeof t&&(t=JSON.stringify(t)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),D.push(`\`${r}\`=?`),"number"==typeof t?y.push(String(t)):y.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}D.push(`date_updated='${Date()}'`),D.push(`date_updated_code='${Date.now()}'`);let v=`UPDATE ${c} SET ${D.join(",")} WHERE \`${_}\`=?`;return y.push(d),g?await E(v,y):await E({paradigm:r,database:t,queryString:v,queryValues:y})}e.exports=c},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8925,e.ids=[8925],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},9288:e=>{e.exports=require("sharp")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},58240:(e,r,t)=>{t.r(r),t.d(r,{config:()=>N,default:()=>h,routeModule:()=>D});var n={};t.r(n),t.d(n,{default:()=>E});var s=t(89947),a=t(2706),i=t(96762),o=t(48786);let l=require("node-fetch");var u=t.n(l),c=t(9288),d=t.n(c),f=t(67619);async function p({imageSourceUrl:e,imageWritePath:r,maxSize:t,sourceType:n}){try{async function s(){let r;if(n?.match("url")){if(e.match(/^http/i)){let t=await u()(e,{});r=await t.buffer()}else r=`./public${e}`}else n?.match("base64")&&(r=Buffer.from(e,"base64"));return r}let a=await s(),i=t||650,o=d()(a),{width:l,height:c,format:f}=await o.metadata();if(l&&c&&l>i){let e=i/l;o.resize(i,Math.round(c*e),{fit:"cover"})}f&&o.toFormat(f,{quality:80}),await o.toFile(r)}catch(e){(0,f.default)({component:"functions/backend/fsWriteImageToDisk",message:e.message})}}var _=t(69842),g=t(33873),m=t.n(g),S=t(79646),y=t(30802);async function E(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,_.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{first_name:n,last_name:s,image:a}=e.body;try{let e=(await (0,o.A)(`SELECT image FROM users WHERE id='${t.id}'`))[0].image===a,i=process.env.DSQL_STATIC_SERVER_DIR;if(!i)throw console.log("Static File ENV not Found!"),Error("No Static Path!");let l=m().join(i,`images/user-images/user-${t.id}/user-${t.id}-profile.jpg`),u=m().join(i,`images/user-images/user-${t.id}/user-${t.id}-profile-thumbnail.jpg`);e||(await p({imageSourceUrl:"string"==typeof a?a:a.imageBase64,imageWritePath:l,sourceType:"string"==typeof a?"url":"base64"}),await p({imageSourceUrl:"string"==typeof a?a:a.imageBase64,imageWritePath:u,maxSize:250,sourceType:"string"==typeof a?"url":"base64"}),(0,S.execSync)(`chmod 644 ${l} ${u}`));let c=l.replace(i,process.env.DSQL_STATIC_HOST||""),d=u.replace(i,process.env.DSQL_STATIC_HOST||"");await (0,y.A)({dbFullName:"datasquirel",tableName:"users",identifierColumnName:"id",identifierValue:t.id,data:{first_name:n,last_name:s,image:c,image_thumbnail:d}}),await (0,y.A)({dbFullName:"datasquirel",tableName:"user_users",identifierColumnName:"invited_user_id",identifierValue:t.id,data:{first_name:n,last_name:s,image:c,image_thumbnail:d}}),r.json({user:!0})}catch(e){(0,f.default)({component:"/api/updateUser/main-catch-error",message:e.message,user:t}),r.json({user:null})}}let h=(0,i.M)(n,"default"),N=(0,i.M)(n,"config"),D=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/updateUser",pathname:"/api/updateUser",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),s=t(95969),a=t(29021),i=t.n(a),o=t(89159);async function l(e,r,t){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[a]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=t;let o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=s}}},30802:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(72583),s=t.n(n),a=t(92652),i=t(48786),o=t(37275),l=t(68829),u=t(7971);async function c({dbContext:e,paradigm:r,dbFullName:t,tableName:n,data:c,tableSchema:d,identifierColumnName:f,identifierValue:p,encryptionKey:_,encryptionSalt:g,useLocal:m}){if(!c||!Object.keys(c).length)return null;let S=!!m||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),y=m?u.A:S?i.A:o.default,E=Object.keys(c),h=[],N=[];for(let e=0;ee.fieldName===r):null,i=n&&n[0]?n[0]:null;if(null==t||void 0==t)continue;let o=/<[^>]+>/g;(i?.richText||String(t).match(o))&&(t=s()(t,a.A)),i?.encrypted&&(t=(0,l.default)({data:t,encryptionKey:_,encryptionSalt:g})),"object"==typeof t&&(t=JSON.stringify(t)),i?.pattern&&!new RegExp(i.pattern,i.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),h.push(`\`${r}\`=?`),"number"==typeof t?N.push(String(t)):N.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}h.push(`date_updated='${Date()}'`),h.push(`date_updated_code='${Date.now()}'`);let D=`UPDATE \`${t}\`.\`${n}\` SET ${h.join(",")} WHERE \`${f}\`=?`;return N.push(p),S?await y(D,N):await y({paradigm:r,queryString:D,queryValues:N})}},92652:(e,r,t)=>{t.d(r,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},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 i=new Date,o=(()=>{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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(a.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${i.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function p(e){o.end(),l(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),l({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(p).catch(_):o.query(t).then(p).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=43359);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(a,i,o),u=s.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var n=t(55511),s=t(79428);function a({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,n.scryptSync)(a,i,o),u=s.Buffer.alloc(16,0),c=(0,n.createCipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(9973),s=t.n(n),a=t(29021),i=t.n(a);async function o(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!i().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:i().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=58240);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateUser.js.nft.json index 98ac9fe..ce5d46f 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linux-x64/package.json","../../../../node_modules/@img/sharp-libvips-linux-x64/versions.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../../../../node_modules/@img/sharp-linux-x64/LICENSE","../../../../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../../../../node_modules/@img/sharp-linux-x64/package.json","../../../../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../../../../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../../../../node_modules/@img/sharp-linuxmusl-x64/package.json","../../../../node_modules/color-convert/conversions.js","../../../../node_modules/color-convert/index.js","../../../../node_modules/color-convert/package.json","../../../../node_modules/color-convert/route.js","../../../../node_modules/color-name/index.js","../../../../node_modules/color-name/package.json","../../../../node_modules/color-string/index.js","../../../../node_modules/color-string/package.json","../../../../node_modules/color/index.js","../../../../node_modules/color/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/detect-libc/lib/detect-libc.js","../../../../node_modules/detect-libc/lib/filesystem.js","../../../../node_modules/detect-libc/lib/process.js","../../../../node_modules/detect-libc/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/node-fetch/lib/index.js","../../../../node_modules/node-fetch/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sharp/lib/channel.js","../../../../node_modules/sharp/lib/colour.js","../../../../node_modules/sharp/lib/composite.js","../../../../node_modules/sharp/lib/constructor.js","../../../../node_modules/sharp/lib/index.js","../../../../node_modules/sharp/lib/input.js","../../../../node_modules/sharp/lib/is.js","../../../../node_modules/sharp/lib/libvips.js","../../../../node_modules/sharp/lib/operation.js","../../../../node_modules/sharp/lib/output.js","../../../../node_modules/sharp/lib/resize.js","../../../../node_modules/sharp/lib/sharp.js","../../../../node_modules/sharp/lib/utility.js","../../../../node_modules/sharp/node_modules/semver/classes/comparator.js","../../../../node_modules/sharp/node_modules/semver/classes/range.js","../../../../node_modules/sharp/node_modules/semver/classes/semver.js","../../../../node_modules/sharp/node_modules/semver/functions/cmp.js","../../../../node_modules/sharp/node_modules/semver/functions/coerce.js","../../../../node_modules/sharp/node_modules/semver/functions/compare.js","../../../../node_modules/sharp/node_modules/semver/functions/eq.js","../../../../node_modules/sharp/node_modules/semver/functions/gt.js","../../../../node_modules/sharp/node_modules/semver/functions/gte.js","../../../../node_modules/sharp/node_modules/semver/functions/lt.js","../../../../node_modules/sharp/node_modules/semver/functions/lte.js","../../../../node_modules/sharp/node_modules/semver/functions/neq.js","../../../../node_modules/sharp/node_modules/semver/functions/parse.js","../../../../node_modules/sharp/node_modules/semver/functions/satisfies.js","../../../../node_modules/sharp/node_modules/semver/internal/constants.js","../../../../node_modules/sharp/node_modules/semver/internal/debug.js","../../../../node_modules/sharp/node_modules/semver/internal/identifiers.js","../../../../node_modules/sharp/node_modules/semver/internal/lrucache.js","../../../../node_modules/sharp/node_modules/semver/internal/parse-options.js","../../../../node_modules/sharp/node_modules/semver/internal/re.js","../../../../node_modules/sharp/node_modules/semver/package.json","../../../../node_modules/sharp/package.json","../../../../node_modules/simple-swizzle/index.js","../../../../node_modules/simple-swizzle/node_modules/is-arrayish/index.js","../../../../node_modules/simple-swizzle/node_modules/is-arrayish/package.json","../../../../node_modules/simple-swizzle/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/tr46/index.js","../../../../node_modules/tr46/lib/mappingTable.json","../../../../node_modules/tr46/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../node_modules/webidl-conversions/lib/index.js","../../../../node_modules/webidl-conversions/package.json","../../../../node_modules/whatwg-url/lib/URL-impl.js","../../../../node_modules/whatwg-url/lib/URL.js","../../../../node_modules/whatwg-url/lib/public-api.js","../../../../node_modules/whatwg-url/lib/url-state-machine.js","../../../../node_modules/whatwg-url/lib/utils.js","../../../../node_modules/whatwg-url/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@img/sharp-libvips-linux-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linux-x64/package.json","../../../../node_modules/@img/sharp-libvips-linux-x64/versions.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/package.json","../../../../node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json","../../../../node_modules/@img/sharp-linux-x64/LICENSE","../../../../node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node","../../../../node_modules/@img/sharp-linux-x64/package.json","../../../../node_modules/@img/sharp-linuxmusl-x64/LICENSE","../../../../node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node","../../../../node_modules/@img/sharp-linuxmusl-x64/package.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/color-convert/conversions.js","../../../../node_modules/color-convert/index.js","../../../../node_modules/color-convert/package.json","../../../../node_modules/color-convert/route.js","../../../../node_modules/color-name/index.js","../../../../node_modules/color-name/package.json","../../../../node_modules/color-string/index.js","../../../../node_modules/color-string/package.json","../../../../node_modules/color/index.js","../../../../node_modules/color/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-arrayish/index.js","../../../../node_modules/is-arrayish/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/node-fetch/lib/index.js","../../../../node_modules/node-fetch/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/semver/classes/comparator.js","../../../../node_modules/semver/classes/range.js","../../../../node_modules/semver/classes/semver.js","../../../../node_modules/semver/functions/cmp.js","../../../../node_modules/semver/functions/coerce.js","../../../../node_modules/semver/functions/compare.js","../../../../node_modules/semver/functions/eq.js","../../../../node_modules/semver/functions/gt.js","../../../../node_modules/semver/functions/gte.js","../../../../node_modules/semver/functions/lt.js","../../../../node_modules/semver/functions/lte.js","../../../../node_modules/semver/functions/neq.js","../../../../node_modules/semver/functions/parse.js","../../../../node_modules/semver/functions/satisfies.js","../../../../node_modules/semver/internal/constants.js","../../../../node_modules/semver/internal/debug.js","../../../../node_modules/semver/internal/identifiers.js","../../../../node_modules/semver/internal/lrucache.js","../../../../node_modules/semver/internal/parse-options.js","../../../../node_modules/semver/internal/re.js","../../../../node_modules/semver/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sharp/lib/channel.js","../../../../node_modules/sharp/lib/colour.js","../../../../node_modules/sharp/lib/composite.js","../../../../node_modules/sharp/lib/constructor.js","../../../../node_modules/sharp/lib/index.js","../../../../node_modules/sharp/lib/input.js","../../../../node_modules/sharp/lib/is.js","../../../../node_modules/sharp/lib/libvips.js","../../../../node_modules/sharp/lib/operation.js","../../../../node_modules/sharp/lib/output.js","../../../../node_modules/sharp/lib/resize.js","../../../../node_modules/sharp/lib/sharp.js","../../../../node_modules/sharp/lib/utility.js","../../../../node_modules/sharp/package.json","../../../../node_modules/simple-swizzle/index.js","../../../../node_modules/simple-swizzle/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/tr46/index.js","../../../../node_modules/tr46/lib/mappingTable.json","../../../../node_modules/tr46/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../node_modules/webidl-conversions/lib/index.js","../../../../node_modules/webidl-conversions/package.json","../../../../node_modules/whatwg-url/lib/URL-impl.js","../../../../node_modules/whatwg-url/lib/URL.js","../../../../node_modules/whatwg-url/lib/public-api.js","../../../../node_modules/whatwg-url/lib/url-state-machine.js","../../../../node_modules/whatwg-url/lib/utils.js","../../../../node_modules/whatwg-url/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js b/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js index a999c93..2a3b61e 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js +++ b/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=7214,e.ids=[7214],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},29750:(e,r,t)=>{t.r(r),t.d(r,{config:()=>h,default:()=>E,routeModule:()=>y});var s={};t.r(s),t.d(s,{default:()=>g});var n=t(89947),a=t(2706),o=t(96762),l=t(33364),i=t.n(l),c=t(48225),u=t.n(c),p=t(6420),d=t.n(p),_=t(57638),S=t.n(_);let m=t(29021),f=t(21820);t(33873);let{execSync:D}=t(79646);async function g(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let t=await d()(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let{id:s,db_name:n,db_slug:a,db_description:o,db_image:l,db_full_name:c,active_clone:p,active_clone_parent_db:_}=e.body;c?.match(/datasquirel_user_.*/)||r.json({success:!1,msg:"Unauthorized"});let g=`datasquirel_user_${t.id}_${a}`;if(await i()({dbFullName:"datasquirel",tableName:"user_databases",identifierColumnName:"id",identifierValue:s,data:{db_name:n,db_slug:a,db_description:o,db_image:l,db_full_name:g}}),c&&c!==g){console.log("Renaming Database");let e=f.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql.exe'":"mysql",r=f.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysqldump.exe'":"mysqldump";try{await S()({queryString:`CREATE DATABASE \`${g}\` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin`,database:c});let t={cwd:process.cwd()};f.platform().match(/win/i)&&(t.shell="bash.exe");let s=`${r} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${c} > tmpDbFile.sql`;console.log(`updateUserDatabase.js exe => ${s}`),D(s,t),D(`${e} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${g} < tmpDbFile.sql`,t),await S()({queryString:`DROP DATABASE \`${c}\``,database:c})}catch(e){u()({component:"/api/updateUserDatabase/lines-88-111",message:e.message,user:t})}}try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`,s=JSON.parse(m.readFileSync(e,"utf8")),i=s.filter(e=>e.dbFullName===c);if(i[0].dbName=n,i[0].dbFullName=g,i[0].dbDescription=o,i[0].dbImage=l,i[0].dbSlug=a,p){let e=s.filter(e=>e.dbFullName===i[0].childDatabaseDbFullName)[0],r=e.childrenDatabases?.find(e=>e.dbFullName===c);r&&(r.dbFullName=g)}m.writeFileSync(`${e}`,JSON.stringify(s),"utf8"),r.json({success:!0})}catch(e){u()({component:"/api/updateUserDatabase/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Database Files could not be written!"})}}let E=(0,o.M)(s,"default"),h=(0,o.M)(s,"config"),y=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/updateUserDatabase",pathname:"/api/updateUserDatabase",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),a=t(29021),o=t(31341);async function l(e,r,t,l){let{keyCookieName:i,csrfCookieName:c}=o();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${d}/${p.csrf_k}`))return null;if(0==p.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=l},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let l=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=n}}},33364:(e,r,t)=>{let s=t(72583),n=t(16570),a=t(51348),o=t(21339),l=t(20503),i=t(44900);async function c({dbContext:e,paradigm:r,dbFullName:t,tableName:c,data:u,tableSchema:p,identifierColumnName:d,identifierValue:_,encryptionKey:S,encryptionSalt:m,useLocal:f}){if(!u||!Object.keys(u).length)return null;let D=!!f||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),g=f?i:D?a:o,E=Object.keys(u),h=[],y=[];for(let e=0;ee.fieldName===r):null,o=a&&a[0]?a[0]:null;if(null==t||void 0==t)continue;let i=/<[^>]+>/g;(o?.richText||String(t).match(i))&&(t=s(t,n)),o?.encrypted&&(t=l({data:t,encryptionKey:S,encryptionSalt:m})),"object"==typeof t&&(t=JSON.stringify(t)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),h.push(`\`${r}\`=?`),"number"==typeof t?y.push(String(t)):y.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}h.push(`date_updated='${Date()}'`),h.push(`date_updated_code='${Date.now()}'`);let b=`UPDATE ${c} SET ${h.join(",")} WHERE \`${d}\`=?`;return y.push(_),D?await g(b,y):await g({paradigm:r,database:t,queryString:b,queryValues:y})}e.exports=c},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},6061:(e,r,t)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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,l=(()=>{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=`🚀 SERVER ERROR =========================== -Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +"use strict";(()=>{var e={};e.id=7214,e.ids=[7214],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},53382:(e,t,r)=>{r.r(t),r.d(t,{config:()=>S,default:()=>m,routeModule:()=>g});var n={};r.r(n),r.d(n,{default:()=>_});var s=r(89947),a=r(2706),l=r(96762),i=r(30802),o=r(67619),c=r(69842),u=r(30944);let d=r(29021),p=r(21820);r(33873);let{execSync:f}=r(79646);async function _(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});let r=await (0,c.A)(e,t,!0);if(!r)return t.json({success:!1,msg:"Unauthorized"});let{id:n,db_name:s,db_slug:a,db_description:l,db_image:_,db_full_name:m,active_clone:S,active_clone_parent_db:g}=e.body;m?.match(/datasquirel_user_.*/)||t.json({success:!1,msg:"Unauthorized"});let y=`datasquirel_user_${r.id}_${a}`;if(await (0,i.A)({dbFullName:"datasquirel",tableName:"user_databases",identifierColumnName:"id",identifierValue:n,data:{db_name:s,db_slug:a,db_description:l,db_image:_,db_full_name:y}}),m&&m!==y){console.log("Renaming Database");let e=p.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql.exe'":"mysql",t=p.platform().match(/win/i)?"'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysqldump.exe'":"mysqldump";try{await (0,u.A)({queryString:`CREATE DATABASE \`${y}\` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin`});let r={cwd:process.cwd()};p.platform().match(/win/i)&&(r.shell="bash.exe");let n=`${t} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${m} > tmpDbFile.sql`;console.log(`updateUserDatabase.ts exe => ${n}`),f(n,r),f(`${e} -u ${process.env.DSQL_DB_USERNAME} -h ${process.env.DSQL_DB_HOST} -p${process.env.DSQL_DB_PASSWORD} ${y} < tmpDbFile.sql`,r),await (0,u.A)({queryString:`DROP DATABASE \`${m}\``})}catch(e){(0,o.default)({component:"/api/updateUserDatabase/lines-88-111",message:e.message,user:r})}}try{let e=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${r.id}/main.json`,n=JSON.parse(d.readFileSync(e,"utf8")),i=n.filter(e=>e.dbFullName===m);if(i[0].dbName=s,i[0].dbFullName=y,i[0].dbDescription=l,i[0].dbImage=_,i[0].dbSlug=a,S){let e=n.filter(e=>e.dbFullName===i[0].childDatabaseDbFullName)[0],t=e.childrenDatabases?.find(e=>e.dbFullName===m);t&&(t.dbFullName=y)}d.writeFileSync(`${e}`,JSON.stringify(n),"utf8"),t.json({success:!0})}catch(e){(0,o.default)({component:"/api/updateUserDatabase/main-catch-error",message:e.message,user:r}),t.json({success:!1,msg:"Database Files could not be written!"})}}let m=(0,l.M)(n,"default"),S=(0,l.M)(n,"config"),g=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/updateUserDatabase",pathname:"/api/updateUserDatabase",bundlePath:"",filename:""},userland:n})},69842:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(48786),s=r(95969),a=r(29021),l=r.n(a),i=r(89159);async function o(e,t,r){let{keyCookieName:a,csrfCookieName:o}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let c=(0,s.A)({encryptedString:e.cookies[a]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!l().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!r){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,t,r)=>{r.d(t,{A:()=>n});function n(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=t;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=n;let o=t;return e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),{keyCookieName:l,csrfCookieName:i,oneTimeCodeName:o+=s}}},30802:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(72583),s=r.n(n),a=r(92652),l=r(48786),i=r(37275),o=r(68829),c=r(7971);async function u({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:u,tableSchema:d,identifierColumnName:p,identifierValue:f,encryptionKey:_,encryptionSalt:m,useLocal:S}){if(!u||!Object.keys(u).length)return null;let g=!!S||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),y=S?c.A:g?l.A:i.default,D=Object.keys(u),E=[],h=[];for(let e=0;ee.fieldName===t):null,l=n&&n[0]?n[0]:null;if(null==r||void 0==r)continue;let i=/<[^>]+>/g;(l?.richText||String(r).match(i))&&(r=s()(r,a.A)),l?.encrypted&&(r=(0,o.default)({data:r,encryptionKey:_,encryptionSalt:m})),"object"==typeof r&&(r=JSON.stringify(r)),l?.pattern&&!new RegExp(l.pattern,l.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),E.push(`\`${t}\`=?`),"number"==typeof r?h.push(String(r)):h.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}E.push(`date_updated='${Date()}'`),E.push(`date_updated_code='${Date.now()}'`);let A=`UPDATE \`${r}\`.\`${n}\` SET ${E.join(",")} WHERE \`${p}\`=?`;return h.push(f),g?await y(A,h):await y({paradigm:t,queryString:A,queryValues:h})}},92652:(e,t,r)=>{r.d(t,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},43775:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function a({unparsedResults:e,tableSchema:t}){let r=[];try{for(let a=0;a",t.message),e}}},67619:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(29021),s=r.n(n);async function a({user:e,message:t,component:r,noMail:n,req:a}){let l=new Date,i=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],t=a.headers["x-real-ip"],r=a.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=r||n||t||a.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +Error Message: ${t} +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} User Email: ${e?.email}`),a?.url&&(n+=` URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),l&&(n+=` -IP: ${l}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let i=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` +IP: ${i}`),n+=` +Date: ${l.toDateString()} +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let o=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),l=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:c}){let u;let p=!!c||!!t?.match(/^datasquirel$/),d=c?l:p?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?p?await d(e,r):await d({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):p?await d(e):await d({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&i)try{let e=u;return await s({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,l,i),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=n("aes-192-cbc",s(o,l,i),a.alloc(16,0));try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:l}){try{return new Promise((i,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function p(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function d(e){o.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:l,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),l&&Array.isArray(l)&&l[0]?o.query(t,l).then(p).catch(d):o.query(t).then(p).catch(d)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=29750);module.exports=t})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(43775),s=r(67619),a=r(48786),l=r(37275),i=r(7971);async function o({queryString:e,queryValuesArray:t,database:r,tableSchema:o,useLocal:c}){let u;let d=!!c||!!r?.match(/^datasquirel$/),p=c?i.A:d?a.A:l.default;try{u=e&&t&&Array.isArray(t)&&t[0]?d?await p(e,t):await p({paradigm:"Full Access",queryString:e,queryValues:t}):d?await p(e):await p({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&o)try{let e=u;return await (0,n.A)({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",r,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(55511),s=r(79428);function a({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,l=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,n.scryptSync)(a,l,i),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",o,c);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},68829:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(55511),s=r(79428);function a({data:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,l=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let o=(0,n.scryptSync)(a,l,i),c=s.Buffer.alloc(16,0),u=(0,n.createCipheriv)("aes-192-cbc",o,c);try{let t=u.update(e,"utf8","hex");return t+=u.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},48786:(e,t,r)=>{r.d(t,{A:()=>n});async function n(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},37275:(e,t,r)=>{async function n(e,t,r){try{if("string"==typeof t){let n=await e.query(s(t),r);return JSON.parse(JSON.stringify(n))}if("object"!=typeof t)return null;{let r=[];for(let n=0;na})},7971:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(9973),s=r.n(n),a=r(29021),l=r.n(a);async function i(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!l().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=t(t.s=53382);module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js.nft.json index d78c2e0..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateUserDatabase.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUserTable.js b/dsql-app/.local_dist/server/pages/api/updateUserTable.js index 941da1c..1185d8b 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUserTable.js +++ b/dsql-app/.local_dist/server/pages/api/updateUserTable.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4371,e.ids=[4371],e.modules={60818:e=>{e.exports=require("dotenv")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},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,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},56363:(e,t,r)=>{r.r(t),r.d(t,{config:()=>A,default:()=>v,routeModule:()=>L});var s={};r.r(s),r.d(s,{default:()=>y});var a=r(89947),n=r(2706),o=r(96762),l=r(51348),i=r.n(l),c=r(73677),u=r.n(c),d=r(39831),_=r.n(d),p=r(48225),S=r.n(p),f=r(6420),g=r.n(f),E=r(33364),D=r.n(E),m=r(19261),b=r.n(m);let h=r(29021);r(33873);let{execSync:N}=r(79646);async function y(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});let r=await g()(e,t,!0);if(!r)return t.json({success:!1,msg:"Unauthorized"});let{dbFullName:s,dbSlug:a,dbId:n,tableNameOld:o,payload:l,delegated:c}=e.body,{tableName:d,tableFullName:p,tableDescription:f}=l;if(!d?.match(/./)||d.match(/[^a-zA-Z0-9-_]/))return t.json({success:!1,msg:"Bad Input"});try{let l=await _()({databaseSlug:a,request:e,user:r,query:e.query});if(!await u()({user:r,confirmedDelegetedUser:l,database:a,table:o,dbId:n,priviledgeRegex:/Edit Table/i}))return console.log("User Unauthorized"),t.json({success:!1,msg:"Unauthorized"});let g=l?.rootUserId?l.rootUserId:r.id,E=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${g}/main.json`,m=JSON.parse(h.readFileSync(E,"utf8")),N=m.filter(e=>e.dbFullName===s)[0].tables.filter((e,t)=>{if(e.tableName===o)return!0});if(N&&N[0])N[0].tableName=d,N[0].tableNameOld=o,N[0].tableFullName=p,f&&(N[0].tableDescription=f),N[0].childrenTables&&N[0].childrenTables.forEach(e=>{try{m.filter(t=>t.dbFullName===e.dbNameFull)[0].tables.filter(t=>{if(t.tableName===e.tableName)return!0})[0].childTableName=d}catch(e){S()({component:"/api/updateUserTable/lines-131-138",message:e.message,user:r})}});else throw Error("Table Does not exist");h.writeFileSync(`${E}`,JSON.stringify(m),"utf8"),await D()({dbFullName:"datasquirel",tableName:"user_database_tables",identifierColumnName:"table_slug",identifierValue:o,data:{table_name:p,table_slug:d,table_description:f}}),c&&l&&await i()("UPDATE delegated_user_tables SET `table`=? WHERE delegated_user_id=? AND root_user_id=? AND `table`=? AND `database`=?",[d,r.id,l.rootUserId,o,a]);let y=s.replace(/[^a-z\_0-9]/g,"");await b()({userId:g,targetDatabase:y}),t.json({success:!0})}catch(e){S()({component:"/api/updateUserTable/main-catch-error",message:e.message,user:r}),t.json({success:!1,msg:"Database Files could not be written!"})}}let v=(0,o.M)(s,"default"),A=(0,o.M)(s,"config"),L=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/updateUserTable",pathname:"/api/updateUserTable",bundlePath:"",filename:""},userland:s})},73677:(e,t,r)=>{let s=r(51348),a=r(48225);e.exports=async function({user:e,confirmedDelegetedUser:t,database:r,table:n,priviledgeRegex:o,dbId:l}){let i,c;try{t?.delegated?(i=await s("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[t.rootUserId,e.id,r,n]),c=i[0]?.priviledge?.match(o)):(i=await s("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,n,l]),c=!0)}catch(t){a({component:"checkUserRights",message:t.message,user:e})}return!!i&&!!i[0]&&!!c}},39831:(e,t,r)=>{r(81630);let s=r(72835);e.exports=async function({request:e,databaseSlug:t,user:r,query:a}){try{let n=r.id,o=null;if(!a?.delegated)return{dbUserId:n};let l=a.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${l}_${t}`,c=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[c])throw Error("Cookie not present");let r=s({encryptedString:e.cookies[c]});if(!r)throw Error("Invalid Token");if((o=JSON.parse(r)).databaseSlug===t)return{dbUserId:n=o.rootUserId,rootUserId:o.rootUserId,rootUserName:o.rootUserName,rootUserEmail:o.rootUserEmail,rootUserImage:o.rootUserImage,databaseFullName:o.databaseFullName,databaseSlug:o.databaseSlug,allowedTables:o.allowedTables,priviledges:o.priviledges,database:o.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},6420:(e,t,r)=>{r(81630);let s=r(51348),a=r(72835),n=r(29021),o=r(31341);async function l(e,t,r,l){let{keyCookieName:i,csrfCookieName:c}=o();if(!e.cookies?.[i]?.match(/./))return null;let u=a({encryptedString:e.cookies[i]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!n.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!r){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=l},31341:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=r;let l=t;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=s;let i=t;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:i+=a}}},33364:(e,t,r)=>{let s=r(72583),a=r(16570),n=r(51348),o=r(21339),l=r(20503),i=r(44900);async function c({dbContext:e,paradigm:t,dbFullName:r,tableName:c,data:u,tableSchema:d,identifierColumnName:_,identifierValue:p,encryptionKey:S,encryptionSalt:f,useLocal:g}){if(!u||!Object.keys(u).length)return null;let E=!!g||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),D=g?i:E?n:o,m=Object.keys(u),b=[],h=[];for(let e=0;ee.fieldName===t):null,o=n&&n[0]?n[0]:null;if(null==r||void 0==r)continue;let i=/<[^>]+>/g;(o?.richText||String(r).match(i))&&(r=s(r,a)),o?.encrypted&&(r=l({data:r,encryptionKey:S,encryptionSalt:f})),"object"==typeof r&&(r=JSON.stringify(r)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),b.push(`\`${t}\`=?`),"number"==typeof r?h.push(String(r)):h.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}b.push(`date_updated='${Date()}'`),b.push(`date_updated_code='${Date.now()}'`);let N=`UPDATE ${c} SET ${b.join(",")} WHERE \`${_}\`=?`;return h.push(p),E?await D(N,h):await D({paradigm:t,database:r,queryString:N,queryValues:h})}e.exports=c},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},20503:(e,t,r)=>{let{scryptSync:s,createCipheriv:a}=r(55511),{Buffer:n}=r(79428);e.exports=({data:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=t||process.env.DSQL_ENCRYPTION_PASSWORD,l=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=a("aes-192-cbc",s(o,l,i),n.alloc(16,0));try{let t=c.update(e,"utf8","hex");return t+=c.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},51348:(e,t,r)=>{let s=r(9973),a=r(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function o(...e){try{let t=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,t,r)=>{let s=r(29021);r(33873);let a=r(9973),n=r(21580),o=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:t,queryString:r,queryValues:l}){try{return new Promise((i,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),i(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),i({error:e.message,queryStringGenerated:r,queryValuesGenerated:l,sql:e.sql})}o=u?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:n()}}),l&&Array.isArray(l)&&l[0]?o.query(r,l).then(d).catch(_):o.query(r).then(d).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,t,r)=>{let s=r(9973),a=r(21580);async function n(...e){let t=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},21580:(e,t,r)=>{let s=r(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!s.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[2451],()=>r(56363));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4371,e.ids=[4371],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},81147:(e,t,r)=>{r.r(t),r.d(t,{config:()=>m,default:()=>E,routeModule:()=>b});var a={};r.r(a),r.d(a,{default:()=>S});var s=r(89947),n=r(2706),l=r(96762),o=r(48786),i=r(31495),u=r(60125),c=r(67619),d=r(69842),_=r(30802),f=r(76856);let p=r(29021);r(33873);let{execSync:g}=r(79646);async function S(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});let r=await (0,d.A)(e,t,!0);if(!r)return t.json({success:!1,msg:"Unauthorized"});let{dbFullName:a,dbSlug:s,dbId:n,tableNameOld:l,payload:g,delegated:S}=e.body,{tableName:E,tableFullName:m,tableDescription:b}=g;if(!E?.match(/./)||E.match(/[^a-zA-Z0-9-_]/))return t.json({success:!1,msg:"Bad Input"});try{let d=await (0,u.A)({databaseSlug:s,request:e,user:r,query:e.query});if(!await (0,i.A)({user:r,confirmedDelegetedUser:d,database:s,table:l,dbId:n,priviledgeRegex:/Edit Table/i}))return console.log("User Unauthorized"),t.json({success:!1,msg:"Unauthorized"});let g=d?.rootUserId?d.rootUserId:r.id,h=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${g}/main.json`,y=JSON.parse(p.readFileSync(h,"utf8")),A=y.filter(e=>e.dbFullName===a)[0].tables.filter((e,t)=>{if(e.tableName===l)return!0});if(A&&A[0])A[0].tableName=E,A[0].tableNameOld=l,A[0].tableFullName=m,b&&(A[0].tableDescription=b),A[0].childrenTables&&A[0].childrenTables.forEach(e=>{try{y.filter(t=>t.dbFullName===e.dbNameFull)[0].tables.filter(t=>{if(t.tableName===e.tableName)return!0})[0].childTableName=E}catch(e){(0,c.default)({component:"/api/updateUserTable/lines-131-138",message:e.message,user:r})}});else throw Error("Table Does not exist");p.writeFileSync(`${h}`,JSON.stringify(y),"utf8"),await (0,_.A)({dbFullName:"datasquirel",tableName:"user_database_tables",identifierColumnName:"table_slug",identifierValue:l,data:{table_name:m,table_slug:E,table_description:b}}),S&&d&&await (0,o.A)("UPDATE delegated_user_tables SET `table`=? WHERE delegated_user_id=? AND root_user_id=? AND `table`=? AND `database`=?",[E,r.id,d.rootUserId,l,s]);let N=a.replace(/[^a-z\_0-9]/g,"");await (0,f.A)({userId:g,targetDatabase:N}),t.json({success:!0})}catch(e){(0,c.default)({component:"/api/updateUserTable/main-catch-error",message:e.message,user:r}),t.json({success:!1,msg:"Database Files could not be written!"})}}let E=(0,l.M)(a,"default"),m=(0,l.M)(a,"config"),b=new s.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/updateUserTable",pathname:"/api/updateUserTable",bundlePath:"",filename:""},userland:a})},31495:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(48786),s=r(67619);async function n({user:e,confirmedDelegetedUser:t,database:r,table:n,priviledgeRegex:l,dbId:o}){let i,u;try{t?.delegated?(i=await (0,a.A)("SELECT priviledge FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=? AND `database`=? AND `table`=?",[t.rootUserId,e.id,r,n]),u=i[0]?.priviledge?.match(l)):(i=await (0,a.A)("SELECT table_slug FROM user_database_tables WHERE user_id=? AND table_slug=? AND db_id=?",[e.id,n,o]),u=!0)}catch(t){(0,s.default)({component:"checkUserRights",message:t.message,user:e})}return!!i&&!!i[0]&&!!u}},60125:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(95969);async function s({request:e,databaseSlug:t,user:r,query:s}){try{let n=r.id,l=null;if(!s?.delegated)return{dbUserId:n};let o=s.dbUserId,i=`${process.env.DSQL_USER_DB_PREFIX}${o}_${t}`,u=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${i}`;try{if(!e.cookies?.[u])throw Error("Cookie not present");let r=(0,a.A)({encryptedString:e.cookies[u]});if(!r)throw Error("Invalid Token");if((l=JSON.parse(r)).databaseSlug===t)return{dbUserId:n=l.rootUserId,rootUserId:l.rootUserId,rootUserName:l.rootUserName,rootUserEmail:l.rootUserEmail,rootUserImage:l.rootUserImage,databaseFullName:l.databaseFullName,databaseSlug:l.databaseSlug,allowedTables:l.allowedTables,priviledges:l.priviledges,database:l.databaseSlug,delegated:!0}}catch(e){}return{dbUserId:n}}catch(e){return null}}},69842:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(48786),s=r(95969),n=r(29021),l=r.n(n),o=r(89159);async function i(e,t,r){let{keyCookieName:n,csrfCookieName:i}=(0,o.A)();if(!e.cookies?.[n]?.match(/./))return null;let u=(0,s.A)({encryptedString:e.cookies[n]});if(!u)return null;let c=JSON.parse(u);if(!c.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!l().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!r){let e=await (0,a.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,t,r)=>{r.d(t,{A:()=>a});function a(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",a=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),l=t;e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),l+=r;let o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=a;let i=t;return e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),{keyCookieName:l,csrfCookieName:o,oneTimeCodeName:i+=s}}},30802:(e,t,r)=>{r.d(t,{A:()=>c});var a=r(72583),s=r.n(a),n=r(92652),l=r(48786),o=r(37275),i=r(68829),u=r(7971);async function c({dbContext:e,paradigm:t,dbFullName:r,tableName:a,data:c,tableSchema:d,identifierColumnName:_,identifierValue:f,encryptionKey:p,encryptionSalt:g,useLocal:S}){if(!c||!Object.keys(c).length)return null;let E=!!S||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),m=S?u.A:E?l.A:o.default,b=Object.keys(c),h=[],y=[];for(let e=0;ee.fieldName===t):null,l=a&&a[0]?a[0]:null;if(null==r||void 0==r)continue;let o=/<[^>]+>/g;(l?.richText||String(r).match(o))&&(r=s()(r,n.A)),l?.encrypted&&(r=(0,i.default)({data:r,encryptionKey:p,encryptionSalt:g})),"object"==typeof r&&(r=JSON.stringify(r)),l?.pattern&&!new RegExp(l.pattern,l.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),h.push(`\`${t}\`=?`),"number"==typeof r?y.push(String(r)):y.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}h.push(`date_updated='${Date()}'`),h.push(`date_updated_code='${Date.now()}'`);let A=`UPDATE \`${r}\`.\`${a}\` SET ${h.join(",")} WHERE \`${_}\`=?`;return y.push(f),E?await m(A,y):await m({paradigm:t,queryString:A,queryValues:y})}},92652:(e,t,r)=>{r.d(t,{A:()=>a});let a={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},68829:(e,t,r)=>{r.r(t),r.d(t,{default:()=>n});var a=r(55511),s=r(79428);function n({data:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let n=t||process.env.DSQL_ENCRYPTION_PASSWORD,l=r||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let i=(0,a.scryptSync)(n,l,o),u=s.Buffer.alloc(16,0),c=(0,a.createCipheriv)("aes-192-cbc",i,u);try{let t=c.update(e,"utf8","hex");return t+=c.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},48786:(e,t,r)=>{r.d(t,{A:()=>a});async function a(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},37275:(e,t,r)=>{async function a(e,t,r){try{if("string"==typeof t){let a=await e.query(s(t),r);return JSON.parse(JSON.stringify(a))}if("object"!=typeof t)return null;{let r=[];for(let a=0;an})},7971:(e,t,r)=>{r.d(t,{A:()=>o});var a=r(9973),s=r.n(a),n=r(29021),l=r.n(n);async function o(...e){let t=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!l().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[2282],()=>r(81147));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUserTable.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateUserTable.js.nft.json index 99d161f..dc22bbc 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUserTable.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateUserTable.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.env","../../../../jsonData/dbSchemas/main.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/main.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package-shared/data/defaultFields.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUserUser.js b/dsql-app/.local_dist/server/pages/api/updateUserUser.js index 53e5a39..1232560 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUserUser.js +++ b/dsql-app/.local_dist/server/pages/api/updateUserUser.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=2500,e.ids=[2500],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},66162:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>p,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),o=t(2706),a=t(96762),c=t(33364),i=t.n(c),l=t(6420),u=t.n(l);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await u()(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{user_type:t}=e.body,s=(()=>{let r=Object.keys(e.body),s={};return r.forEach(r=>{!(t?.match(/database/)&&r?.match(/user_type|priviledge|database_access|databases?|confirm/))&&(r?.match(/databases|confirm/)||(s[r]=e.body[r]))}),s})(),n=await i()({dbFullName:"datasquirel",tableName:"user_users",identifierColumnName:"id",identifierValue:e.body.id,data:{...s}});r.json({success:!!n?.affectedRows,msg:n?.affectedRows?"User Updated":n})}let p=(0,a.M)(s,"default"),d=(0,a.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/updateUserUser",pathname:"/api/updateUserUser",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);let s=t(51348),n=t(72835),o=t(29021),a=t(31341);async function c(e,r,t,c){let{keyCookieName:i,csrfCookieName:l}=a();if(!e.cookies?.[i]?.match(/./))return null;let u=n({encryptedString:e.cookies[i]});if(!u)return null;let _=JSON.parse(u);if(!_.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${_.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o.existsSync(`${p}/${_.csrf_k}`))return null;if(0==_.verification_status&&!t){let e=await s(`SELECT verification_status FROM users WHERE id='${_.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return _?.date&&Date.now()-_.date>6048e5?null:_}e.exports=c},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=t;let c=r;e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),c+=s;let i=r;return e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),{keyCookieName:a,csrfCookieName:c,oneTimeCodeName:i+=n}}},33364:(e,r,t)=>{let s=t(72583),n=t(16570),o=t(51348),a=t(21339),c=t(20503),i=t(44900);async function l({dbContext:e,paradigm:r,dbFullName:t,tableName:l,data:u,tableSchema:_,identifierColumnName:p,identifierValue:d,encryptionKey:S,encryptionSalt:f,useLocal:E}){if(!u||!Object.keys(u).length)return null;let D=!!E||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),g=E?i:D?o:a,h=Object.keys(u),m=[],y=[];for(let e=0;ee.fieldName===r):null,a=o&&o[0]?o[0]:null;if(null==t||void 0==t)continue;let i=/<[^>]+>/g;(a?.richText||String(t).match(i))&&(t=s(t,n)),a?.encrypted&&(t=c({data:t,encryptionKey:S,encryptionSalt:f})),"object"==typeof t&&(t=JSON.stringify(t)),a?.pattern&&!new RegExp(a.pattern,a.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),m.push(`\`${r}\`=?`),"number"==typeof t?y.push(String(t)):y.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}m.push(`date_updated='${Date()}'`),m.push(`date_updated_code='${Date.now()}'`);let v=`UPDATE ${l} SET ${m.join(",")} WHERE \`${p}\`=?`;return y.push(d),D?await g(v,y):await g({paradigm:r,database:t,queryString:v,queryValues:y})}e.exports=l},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(a,c,i),o.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:o}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,c=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!c?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=n("aes-192-cbc",s(a,c,i),o.alloc(16,0));try{let r=l.update(e,"utf8","hex");return r+=l.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),o=t(21580),a=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:o()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:c}){try{return new Promise((i,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function _(e){a.end(),i(JSON.parse(JSON.stringify(e)))}function p(e){a.end(),i({error:e.message,queryStringGenerated:t,queryValuesGenerated:c,sql:e.sql})}a=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:o()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:o()}}),c&&Array.isArray(c)&&c[0]?a.query(t,c).then(_).catch(p):a.query(t).then(_).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),i({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function o(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=o},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=66162);module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=2500,e.ids=[2500],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},72387:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>u,routeModule:()=>f});var n={};t.r(n),t.d(n,{default:()=>l});var s=t(89947),a=t(2706),o=t(96762),i=t(30802),c=t(69842);async function l(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});if(!await (0,c.A)(e,r,!0))return r.json({success:!1,msg:"Unauthorized"});let{user_type:t}=e.body,n=(()=>{let r=Object.keys(e.body),n={};return r.forEach(r=>{!(t?.match(/database/)&&r?.match(/user_type|priviledge|database_access|databases?|confirm/))&&(r?.match(/databases|confirm/)||(n[r]=e.body[r]))}),n})(),s=await (0,i.A)({dbFullName:"datasquirel",tableName:"user_users",identifierColumnName:"id",identifierValue:e.body.id,data:{...n}});r.json({success:!!s?.affectedRows,msg:s?.affectedRows?"User Updated":s})}let u=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),f=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/updateUserUser",pathname:"/api/updateUserUser",bundlePath:"",filename:""},userland:n})},69842:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(48786),s=t(95969),a=t(29021),o=t.n(a),i=t(89159);async function c(e,r,t){let{keyCookieName:a,csrfCookieName:c}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let l=(0,s.A)({encryptedString:e.cookies[a]});if(!l)return null;let u=JSON.parse(l);if(!u.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!t){let e=await (0,n.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=n;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:c+=s}}},30802:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(72583),s=t.n(n),a=t(92652),o=t(48786),i=t(37275),c=t(68829),l=t(7971);async function u({dbContext:e,paradigm:r,dbFullName:t,tableName:n,data:u,tableSchema:d,identifierColumnName:f,identifierValue:_,encryptionKey:p,encryptionSalt:S,useLocal:E}){if(!u||!Object.keys(u).length)return null;let g=!!E||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),y=E?l.A:g?o.A:i.default,h=Object.keys(u),m=[],N=[];for(let e=0;ee.fieldName===r):null,o=n&&n[0]?n[0]:null;if(null==t||void 0==t)continue;let i=/<[^>]+>/g;(o?.richText||String(t).match(i))&&(t=s()(t,a.A)),o?.encrypted&&(t=(0,c.default)({data:t,encryptionKey:p,encryptionSalt:S})),"object"==typeof t&&(t=JSON.stringify(t)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),m.push(`\`${r}\`=?`),"number"==typeof t?N.push(String(t)):N.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}m.push(`date_updated='${Date()}'`),m.push(`date_updated_code='${Date.now()}'`);let D=`UPDATE \`${t}\`.\`${n}\` SET ${m.join(",")} WHERE \`${f}\`=?`;return N.push(_),g?await y(D,N):await y({paradigm:r,queryString:D,queryValues:N})}},92652:(e,r,t)=>{t.d(r,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,n.scryptSync)(a,o,i),l=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",c,l);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var n=t(55511),s=t(79428);function a({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=(0,n.scryptSync)(a,o,i),l=s.Buffer.alloc(16,0),u=(0,n.createCipheriv)("aes-192-cbc",c,l);try{let r=u.update(e,"utf8","hex");return r+=u.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function i(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var t=r(r.s=72387);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/updateUserUser.js.nft.json b/dsql-app/.local_dist/server/pages/api/updateUserUser.js.nft.json index d78c2e0..2485e9d 100644 --- a/dsql-app/.local_dist/server/pages/api/updateUserUser.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/updateUserUser.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js b/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js index cdaf2a4..b1c1d8d 100644 --- a/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js +++ b/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4105,e.ids=[4105],e.modules={60818:e=>{e.exports=require("dotenv")},27825:e=>{e.exports=require("lodash")},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")},79646:e=>{e.exports=require("child_process")},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(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},46127:(e,r,s)=>{s.r(r),s.d(r,{config:()=>D,default:()=>v,routeModule:()=>b});var t={};s.r(t),s.d(t,{default:()=>h});var a=s(89947),n=s(2706),i=s(96762),o=s(6420),u=s.n(o),c=s(48225),l=s.n(c);s(27825);var d=s(51348),_=s.n(d),p=s(33873),f=s.n(p);s(79646);var S=s(19261),E=s.n(S);let m=s(29021);async function h(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let s=await u()(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let t=e.body.schema,a=e.body.dbId;try{let e=await _()("SELECT * FROM user_databases WHERE user_id = ? AND id = ?",[s.id,a]);if(!e?.[0])throw Error("Invalid Database");let n=e[0],i=f().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${s.id}/main.json`),o=JSON.parse(m.readFileSync(i,"utf-8")),u=o.find(e=>e.dbFullName==n.db_full_name);if(!u)throw Error("This Database doesn't exist");if(u.tables=t.tables,u.childrenDatabases)for(let e=0;ee.dbFullName===r);if(!s||!s.tables){u.childrenDatabases?.splice(e,1);continue}s.tables=t.tables}m.writeFileSync(`${i}`,JSON.stringify(o),"utf8"),await E()({userId:s.id,targetDatabase:n.db_full_name}),r.json({success:!0})}catch(t){l()({component:"/api/acceptUserInvitation/catch-error",message:t.message,user:s,req:e}),r.json({success:!1})}}let v=(0,i.M)(t,"default"),D=(0,i.M)(t,"config"),b=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/user-schema/replace-database-schema",pathname:"/api/user-schema/replace-database-schema",bundlePath:"",filename:""},userland:t})},6420:(e,r,s)=>{s(81630);let t=s(51348),a=s(72835),n=s(29021),i=s(31341);async function o(e,r,s,o){let{keyCookieName:u,csrfCookieName:c}=i();if(!e.cookies?.[u]?.match(/./))return null;let l=a({encryptedString:e.cookies[u]});if(!l)return null;let d=JSON.parse(l);if(!d.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let _=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!_)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!n.existsSync(`${_}/${d.csrf_k}`))return null;if(0==d.verification_status&&!s){let e=await t(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let o=r;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=t;let u=r;return e?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:u+=a}}},51348:(e,r,s)=>{let t=s(9973),a=s(21580),n=t({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function i(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,s)=>{let t=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!t.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:t.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var s;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},89947:(e,r,s)=>{e.exports=s(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[2451],()=>s(46127));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4105,e.ids=[4105],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},55096:(e,r,t)=>{t.r(r),t.d(r,{config:()=>A,default:()=>E,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>p});var a=t(89947),n=t(2706),i=t(96762),u=t(69842),o=t(67619),l=t(48786),c=t(33873),d=t.n(c),_=t(76856);let f=t(29021);async function p(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Registration Failed!"});let t=await (0,u.A)(e,r,!0);if(!t)return r.json({success:!1,msg:"Unauthorized"});let s=e.body.schema,a=e.body.dbId;try{let e=await (0,l.A)("SELECT * FROM user_databases WHERE user_id = ? AND id = ?",[t.id,a]);if(!e?.[0])throw Error("Invalid Database");let n=e[0],i=d().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${t.id}/main.json`),u=JSON.parse(f.readFileSync(i,"utf-8")),o=u.find(e=>e.dbFullName==n.db_full_name);if(!o)throw Error("This Database doesn't exist");if(o.tables=s.tables,o.childrenDatabases)for(let e=0;ee.dbFullName===r);if(!t||!t.tables){o.childrenDatabases?.splice(e,1);continue}t.tables=s.tables}f.writeFileSync(`${i}`,JSON.stringify(u),"utf8"),await (0,_.A)({userId:t.id,targetDatabase:n.db_full_name}),r.json({success:!0})}catch(s){(0,o.default)({component:"/api/acceptUserInvitation/catch-error",message:s.message,user:t,req:e}),r.json({success:!1})}}let E=(0,i.M)(s,"default"),A=(0,i.M)(s,"config"),S=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/user-schema/replace-database-schema",pathname:"/api/user-schema/replace-database-schema",bundlePath:"",filename:""},userland:s})},69842:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(48786),a=t(95969),n=t(29021),i=t.n(n),u=t(89159);async function o(e,r,t){let{keyCookieName:n,csrfCookieName:o}=(0,u.A)();if(!e.cookies?.[n]?.match(/./))return null;let l=(0,a.A)({encryptedString:e.cookies[n]});if(!l)return null;let c=JSON.parse(l);if(!c.csrf_k||t&&!Object.keys(e.headers).find(e=>e.includes(c.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!i().existsSync(`${d}/${c.csrf_k}`))return null;if(0==c.verification_status&&!t){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${c.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}return c?.date&&Date.now()-c.date>6048e5?null:c}},89159:(e,r,t)=>{t.d(r,{A:()=>s});function s(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=t;let u=r;e?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),u+=s;let o=r;return e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),{keyCookieName:i,csrfCookieName:u,oneTimeCodeName:o+=a}}},48786:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[2282],()=>t(55096));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js.nft.json b/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js.nft.json index dd722fd..deb7f5f 100644 --- a/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user-schema/replace-database-schema.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../.env","../../../../../jsonData/dbSchemas/main.json","../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/dotenv/lib/main.js","../../../../../node_modules/dotenv/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package-shared/data/defaultFields.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../jsonData/dbSchemas/main.json","../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package-shared/data/defaultFields.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js index c81ebb8..f90ee7e 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=8864,e.ids=[8864],e.modules={60818:e=>{e.exports=require("dotenv")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},79646:e=>{e.exports=require("child_process")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},48942:(e,a,t)=>{t.r(a),t.d(a,{config:()=>T,default:()=>f,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>p});var r=t(89947),l=t(2706),n=t(96762),i=t(48225),u=t.n(i),d=t(77619),o=t.n(d),m=t(25788),c=t.n(m);async function p(e,a){if("POST"!==e.method)return a.json({success:!1,payload:null,msg:"Failed!"});try{let t=e.headers.authorization,{payload:s,database:r,encryptionKey:l}=e.body,n=o()({key:t,database:r,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");if((!n.full_access||!n.sign)&&!s?.password){a.json({success:!1,msg:"Password is required to create an account"});return}let i=`datasquirel_user_${n.user_id}_${r}`,u=await c()({encryptionKey:l,database:i,payload:s,userId:n.user_id});a.json(u)}catch(t){u()({component:"/api/user/add-user/main-catch-error",message:t.message,user:{},req:e}),a.json({success:!1,msg:"API Error",error:t.message})}}let f=(0,n.M)(s,"default"),T=(0,n.M)(s,"config"),g=new r.PagesAPIRouteModule({definition:{kind:l.A.PAGES_API,page:"/api/user/[user_id]/add-user",pathname:"/api/user/[user_id]/add-user",bundlePath:"",filename:""},userland:s})},25788:(e,a,t)=>{let s=t(63026),r=t(47670),l=t(70402),n=t(57638),i=t(14533);e.exports=async function({encryptionKey:e,payload:a,database:t,userId:u,useLocal:d}){let o=u||process.env.DSQL_API_USER_ID,m=e||process.env.DSQL_ENCRYPTION_PASSWORD;if(!m)return{success:!1,msg:"No encryption key provided",payload:null};if(!m?.match(/.{8,}/))return{success:!1,msg:"Encryption key must be at least 8 characters long",payload:null};let c=i({encryptionKey:m,password:String(a.password)});a.password=c;let p="SHOW COLUMNS FROM users",f=await n({queryString:p,database:t,useLocal:d});if(f?.[0]||(await s({userId:Number(o),database:t,useLocal:d,payload:a}),f=await n({queryString:p,database:t,useLocal:d})),!f?.[0])return{success:!1,msg:"Could not create users table"};let T=f.map(e=>e.Field);for(let e=0;e{t(29021),t(33873);let{execSync:s}=t(79646),r=t(48225),l=t(51348),{default:n}=t(2258),{default:i}=t(78634),u=t(47670),d=t(19261),o=t(44900),m=t(18801);e.exports=async function({userId:e,database:a,useLocal:t,payload:s}){try{let r=m({payload:s});if(!r)throw Error("Couldn't Get User Preset!");let c=n({userId:e});if(!c)throw Error("User schema data not found!");let p=c.find(e=>e.dbFullName===a);if(!p)throw Error("Couldn't Find Target Database!");let f=p?.tables.findIndex(e=>"users"===e.tableName);"number"==typeof f&&f>0?p.tables[f]=r:p.tables.push(r),i({schemaData:c,userId:e});let T=t?await o("SELECT id FROM user_databases WHERE user_id=? AND db_slug=?",[e,a]):await l("SELECT id FROM user_databases WHERE user_id=? AND db_slug=?",[e,a]);return T?.[0]&&await u({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:e,db_id:T[0].id,db_slug:p.dbSlug,table_name:"Users",table_slug:"users"},useLocal:t}),await d({userId:e,targetDatabase:a}),"Done!"}catch(a){return console.log(`addUsersTableToDb.js ERROR: ${a.message}`),r({component:"addUsersTableToDb",message:a.message,user:{id:e}}),a.message}}},77619:(e,a,t)=>{let s=t(29021),r=t(72835);e.exports=({key:e,database:a,table:t,user_id:l,media:n})=>{if(!e||!l)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let u=r({encryptedString:e}),d=JSON.parse(u||""),o=s.existsSync(`${i}/${d.sign}`);if(String(d.user_id)!==String(l)||!o)return null;if(!d.target_database||n)return d;if(!a&&d.target_database)return null;let m=d.target_database?.split(",").includes(String(a));if(m&&!d.target_table)return d;if(m&&!t&&d.target_table)return null;if(d.target_table?.split(",").includes(String(t)))return d;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},18801:(e,a,t)=>{let s=t(85288),r=t(48225);e.exports=function(e){try{let a=t(8693),r=t(95610),l=e?.payload?s({data:e?.payload,excludeData:r,excludeFields:a.fields}):[];console.log("supplementalFields",l);let n=[...a.fields,...l];console.log("allFields",n);let i=[...r.slice(0,2),...n,...r.slice(2)];return a.fields=[...i],a}catch(e){return console.log(`grabNewUsersTableSchema.js ERROR: ${e.message}`),r({component:"grabNewUsersTableSchema",message:e.message}),null}}},85288:(e,a,t)=>{let s=t(48225);e.exports=function({data:e,fields:a,excludeData:r,excludeFields:l}){try{t(81648),t(57539);let s=[],n=[];return e&&Object.keys(e)?.[0]&&(n=Object.keys(e)),a&&(n=[...n,...a],n=[...new Set(n)]),(n=n.filter(e=>!r||!Object.keys(r).includes(e)).filter(e=>!l||!l.find(a=>a.fieldName==e))).forEach(a=>{let t=e?e[a]:null;if("string"==typeof t){let e={fieldName:a,dataType:t.length>255?"TEXT":"VARCHAR(255)"};t.match(/<[^>]+>/g)&&(e.richText=!0),s.push(e)}else"number"==typeof t?s.push({fieldName:a,dataType:"INT"}):s.push({fieldName:a,dataType:"VARCHAR(255)"})}),s}catch(e){return console.log(`grabSchemaFieldsFromData.js ERROR: ${e.message}`),s({component:"grabSchemaFieldsFromData.js",message:e.message}),[]}}},2258:(e,a,t)=>{let s=t(48225),r=t(29021),l=t(33873);e.exports=function({userId:e}){try{let a=l.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(r.readFileSync(a,"utf-8"))}catch(e){return s({component:"grabUserSchemaData",message:e.message}),null}}},6061:(e,a,t)=>{let s=t(72835),r=t(30003);e.exports=async function({unparsedResults:e,tableSchema:a}){let t=[];try{for(let l=0;l",a.message),e}}},78634:(e,a,t)=>{let s=t(48225),r=t(29021),l=t(33873);e.exports=function({userId:e,schemaData:a}){try{let t=l.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return r.writeFileSync(t,JSON.stringify(a),"utf8"),!0}catch(e){return s({component:"/functions/backend/setUserSchemaData",message:e.message}),!1}}},70402:(e,a,t)=>{let s=t(48225),{default:r}=t(2258),{default:l}=t(78634),n=t(19261),i=t(85288);e.exports=async function({userId:e,database:a,newFields:t,newPayload:u}){try{let s=r({userId:e});if(!s)throw Error("User schema data not found!");let d=s.findIndex(e=>e.dbFullName===a);if(d<0)throw Error("Couldn't Find Target Database!");let o=s[d]?.tables.findIndex(e=>"users"===e.tableName),m=s[d].tables[o];if(!m?.fields?.[0])throw Error("Users Table Not Found!");let c=i({fields:t,data:u}),p=m.fields.findIndex(e=>"date_created"===e.fieldName);return m.fields.splice(p>=0?p:0,0,...c),l({schemaData:s,userId:e}),await n({userId:e,targetDatabase:a}),"Done!"}catch(a){return console.log(`addUsersTableToDb.js ERROR: ${a.message}`),s({component:"addUsersTableToDb",message:a.message,user:{id:e}}),a.message}}},57638:(e,a,t)=>{t(29021);let s=t(6061),r=t(48225),l=t(51348),n=t(21339),i=t(44900);e.exports=async function({queryString:e,queryValuesArray:a,database:t,tableSchema:u,useLocal:d}){let o;let m=!!d||!!t?.match(/^datasquirel$/),c=d?i:m?l:n;try{o=e&&a&&Array.isArray(a)&&a[0]?m?await c(e,a):await c({paradigm:"Full Access",database:t,queryString:e,queryValues:a}):m?await c(e):await c({paradigm:"Full Access",database:t,queryString:e})}catch(e){r({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(o&&u)try{let e=o;return await s({unparsedResults:e,tableSchema:u})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),r({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(o)return o;else return null}},14533:(e,a,t)=>{let{createHmac:s}=t(55511);e.exports=function({password:e,encryptionKey:a}){let t=a||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let r=s("sha512",t);return r.update(e),r.digest("base64")}},57539:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')},81648:e=>{e.exports=JSON.parse('{"fieldName":"string","dataType":"BIGINT","nullValue":true,"primaryKey":true,"autoIncrement":true,"defaultValue":"CURRENT_TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP","notNullValue":true,"foreignKey":{"foreignKeyName":"Name","destinationTableName":"Table Name","destinationTableColumnName":"Column Name","cascadeDelete":true,"cascadeUpdate":true},"onUpdate":"CURRENT_TIMESTAMP","onUpdateLiteral":"CURRENT_TIMESTAMP","onDelete":"CURRENT_TIMESTAMP","onDeleteLiteral":"CURRENT_TIMESTAMP","encrypted":false}')},8693:e=>{e.exports=JSON.parse('{"tableName":"users","tableFullName":"Users","fields":[{"fieldName":"first_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"last_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"email","dataType":"VARCHAR(200)","notNullValue":true},{"fieldName":"phone","dataType":"VARCHAR(50)"},{"fieldName":"user_type","dataType":"VARCHAR(20)","defaultValue":"default"},{"fieldName":"username","dataType":"VARCHAR(100)","nullValue":true},{"fieldName":"password","dataType":"TEXT"},{"fieldName":"image","dataType":"VARCHAR(250)"},{"fieldName":"image_thumbnail","dataType":"VARCHAR(250)"},{"fieldName":"address","dataType":"VARCHAR(255)"},{"fieldName":"city","dataType":"VARCHAR(50)"},{"fieldName":"state","dataType":"VARCHAR(50)"},{"fieldName":"country","dataType":"VARCHAR(50)"},{"fieldName":"zip_code","dataType":"VARCHAR(50)"},{"fieldName":"social_login","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"social_platform","dataType":"VARCHAR(50)","nullValue":true},{"fieldName":"social_id","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"more_user_data","dataType":"BIGINT","defaultValue":"0"},{"fieldName":"verification_status","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"temp_login_code","dataType":"VARCHAR(50)","nullValue":true}]}')}};var a=require("../../../../webpack-api-runtime.js");a.C(e);var t=e=>a(a.s=e),s=a.X(0,[4050,2451],()=>t(48942));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8864,e.ids=[8864],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},71274:(e,a,t)=>{t.r(a),t.d(a,{config:()=>E,default:()=>_,routeModule:()=>h});var s={};t.r(s),t.d(s,{default:()=>R});var r=t(89947),l=t(2706),n=t(96762),i=t(67619),u=t(56081),d=t(48786),o=t(4820),m=t(21724),c=t(98e3),p=t(76856),f=t(7971);function T({data:e,fields:a,excludeData:s,excludeFields:r}){try{t(81648),t(57539);let l=[],n=[];return e&&Object.keys(e)?.[0]&&(n=Object.keys(e)),a&&(n=[...n,...a],n=[...new Set(n)]),(n=n.filter(e=>!s||!Object.keys(s).includes(e)).filter(e=>!r||!r.find(a=>a.fieldName==e))).forEach(a=>{let t=e?e[a]:null;if("string"==typeof t){let e={fieldName:a,dataType:t.length>255?"TEXT":"VARCHAR(255)"};t.match(/<[^>]+>/g)&&(e.richText=!0),l.push(e)}else"number"==typeof t?l.push({fieldName:a,dataType:"INT"}):l.push({fieldName:a,dataType:"VARCHAR(255)"})}),l}catch(e){return console.log(`grabSchemaFieldsFromData.ts ERROR: ${e.message}`),(0,i.default)({component:"grabSchemaFieldsFromData.ts",message:e.message}),[]}}async function g({userId:e,database:a,useLocal:s,payload:r}){try{let l=function(e){try{let a=t(8693),s=t(95610),r=e?.payload?T({data:e?.payload,excludeData:s,excludeFields:a.fields}):[];console.log("supplementalFields",r);let l=[...a.fields,...r];console.log("allFields",l);let n=[...s.slice(0,2),...l,...s.slice(2)];return a.fields=[...n],a}catch(e){return console.log(`grabNewUsersTableSchema.ts ERROR: ${e.message}`),(0,i.default)({component:"grabNewUsersTableSchema",message:e.message}),null}}({payload:r});if(!l)throw Error("Couldn't Get User Preset!");let n=(0,o.A)({userId:e});if(!n)throw Error("User schema data not found!");let u=n.find(e=>e.dbFullName===a);if(!u)throw Error("Couldn't Find Target Database!");let g=u?.tables.findIndex(e=>"users"===e.tableName);"number"==typeof g&&g>0?u.tables[g]=l:u.tables.push(l),(0,m.A)({schemaData:n,userId:e});let A=s?await (0,f.A)("SELECT id FROM user_databases WHERE user_id=? AND db_slug=?",[e,a]):await (0,d.A)("SELECT id FROM user_databases WHERE user_id=? AND db_slug=?",[e,a]);return A?.[0]&&await (0,c.A)({dbFullName:"datasquirel",tableName:"user_database_tables",data:{user_id:e,db_id:A[0].id,db_slug:u.dbSlug,table_name:"Users",table_slug:"users"},useLocal:s}),await (0,p.A)({userId:e,targetDatabase:a}),"Done!"}catch(a){return console.log(`addUsersTableToDb.ts ERROR: ${a.message}`),(0,i.default)({component:"addUsersTableToDb",message:a.message,user:{id:e}}),a.message}}async function A({userId:e,database:a,newFields:t,newPayload:s}){try{let r=(0,o.A)({userId:e});if(!r)throw Error("User schema data not found!");let l=r.findIndex(e=>e.dbFullName===a);if(l<0)throw Error("Couldn't Find Target Database!");let n=r[l]?.tables.findIndex(e=>"users"===e.tableName),i=r[l].tables[n];if(!i?.fields?.[0])throw Error("Users Table Not Found!");let u=T({fields:t,data:s}),d=i.fields.findIndex(e=>"date_created"===e.fieldName);return i.fields.splice(d>=0?d:0,0,...u),(0,m.A)({schemaData:r,userId:e}),await (0,p.A)({userId:e,targetDatabase:a}),"Done!"}catch(a){return console.log(`addUsersTableToDb.ts ERROR: ${a.message}`),(0,i.default)({component:"addUsersTableToDb",message:a.message,user:{id:e}}),a.message}}var y=t(30944),N=t(83919);async function b({encryptionKey:e,payload:a,database:t,userId:s,useLocal:r}){let l=s||process.env.DSQL_API_USER_ID,n=e||process.env.DSQL_ENCRYPTION_PASSWORD;if(!n)return{success:!1,msg:"No encryption key provided",payload:null};if(!n?.match(/.{8,}/))return{success:!1,msg:"Encryption key must be at least 8 characters long",payload:null};let i=(0,N.A)({encryptionKey:n,password:String(a.password)});a.password=i;let u=`SHOW COLUMNS FROM ${t}.users`,d=await (0,y.A)({queryString:u,database:t,useLocal:r});if(d?.[0]||(await g({userId:Number(l),database:t,useLocal:r,payload:a}),d=await (0,y.A)({queryString:u,database:t,useLocal:r})),!d?.[0])return{success:!1,msg:"Could not create users table"};let o=d.map(e=>e.Field);for(let e=0;e{t.d(a,{A:()=>n});var s=t(29021),r=t.n(s),l=t(95969);let n=({key:e,database:a,table:t,user_id:s,media:n})=>{if(!e||!s)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let u=(0,l.A)({encryptedString:e}),d=JSON.parse(u||""),o=r().existsSync(`${i}/${d.sign}`);if(String(d.user_id)!==String(s)||!o)return null;if(!d.target_database||n)return d;if(!a&&d.target_database)return null;let m=d.target_database?.split(",").includes(String(a));if(m&&!d.target_table)return d;if(m&&!t&&d.target_table)return null;if(d.target_table?.split(",").includes(String(t)))return d;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},4820:(e,a,t)=>{t.d(a,{A:()=>u});var s=t(67619),r=t(29021),l=t.n(r),n=t(33873),i=t.n(n);function u({userId:e}){try{let a=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(l().readFileSync(a,"utf-8"))}catch(e){return(0,s.default)({component:"grabUserSchemaData",message:e.message}),null}}},43775:(e,a,t)=>{t.d(a,{A:()=>l});var s=t(95969);let r=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function l({unparsedResults:e,tableSchema:a}){let t=[];try{for(let l=0;l",a.message),e}}},21724:(e,a,t)=>{t.d(a,{A:()=>u});var s=t(67619),r=t(29021),l=t.n(r),n=t(33873),i=t.n(n);function u({userId:e,schemaData:a}){try{let t=i().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return l().writeFileSync(t,JSON.stringify(a),"utf8"),!0}catch(e){return(0,s.default)({component:"/functions/backend/setUserSchemaData",message:e.message}),!1}}},30944:(e,a,t)=>{t.d(a,{A:()=>u});var s=t(43775),r=t(67619),l=t(48786),n=t(37275),i=t(7971);async function u({queryString:e,queryValuesArray:a,database:t,tableSchema:u,useLocal:d}){let o;let m=!!d||!!t?.match(/^datasquirel$/),c=d?i.A:m?l.A:n.default;try{o=e&&a&&Array.isArray(a)&&a[0]?m?await c(e,a):await c({paradigm:"Full Access",queryString:e,queryValues:a}):m?await c(e):await c({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,r.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(o&&u)try{let e=o;return await (0,s.A)({unparsedResults:e,tableSchema:u})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,r.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(o)return o;else return null}},83919:(e,a,t)=>{t.d(a,{A:()=>r});var s=t(55511);function r({password:e,encryptionKey:a}){let t=a||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let r=(0,s.createHmac)("sha512",t);return r.update(e),r.digest("base64")}},57539:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')},81648:e=>{e.exports=JSON.parse('{"fieldName":"string","dataType":"BIGINT","nullValue":true,"primaryKey":true,"autoIncrement":true,"defaultValue":"CURRENT_TIMESTAMP","defaultValueLiteral":"CURRENT_TIMESTAMP","notNullValue":true,"foreignKey":{"foreignKeyName":"Name","destinationTableName":"Table Name","destinationTableColumnName":"Column Name","cascadeDelete":true,"cascadeUpdate":true},"onUpdate":"CURRENT_TIMESTAMP","onUpdateLiteral":"CURRENT_TIMESTAMP","onDelete":"CURRENT_TIMESTAMP","onDeleteLiteral":"CURRENT_TIMESTAMP","encrypted":false}')},8693:e=>{e.exports=JSON.parse('{"tableName":"users","tableFullName":"Users","fields":[{"fieldName":"first_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"last_name","dataType":"VARCHAR(100)","notNullValue":true},{"fieldName":"email","dataType":"VARCHAR(200)","notNullValue":true},{"fieldName":"phone","dataType":"VARCHAR(50)"},{"fieldName":"user_type","dataType":"VARCHAR(20)","defaultValue":"default"},{"fieldName":"username","dataType":"VARCHAR(100)","nullValue":true},{"fieldName":"password","dataType":"TEXT"},{"fieldName":"image","dataType":"VARCHAR(250)"},{"fieldName":"image_thumbnail","dataType":"VARCHAR(250)"},{"fieldName":"address","dataType":"VARCHAR(255)"},{"fieldName":"city","dataType":"VARCHAR(50)"},{"fieldName":"state","dataType":"VARCHAR(50)"},{"fieldName":"country","dataType":"VARCHAR(50)"},{"fieldName":"zip_code","dataType":"VARCHAR(50)"},{"fieldName":"social_login","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"social_platform","dataType":"VARCHAR(50)","nullValue":true},{"fieldName":"social_id","dataType":"VARCHAR(250)","nullValue":true},{"fieldName":"more_user_data","dataType":"BIGINT","defaultValue":"0"},{"fieldName":"verification_status","dataType":"TINYINT","defaultValue":"0"},{"fieldName":"temp_login_code","dataType":"VARCHAR(50)","nullValue":true}]}')}};var a=require("../../../../webpack-api-runtime.js");a.C(e);var t=e=>a(a.s=e),s=a.X(0,[1251,2282],()=>t(71274));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js.nft.json index 0984450..8f81861 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/add-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../.env","../../../../../../jsonData/dbSchemas/main.json","../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/dotenv/lib/main.js","../../../../../../node_modules/dotenv/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package-shared/data/dataTypes.json","../../../../../../package-shared/data/defaultFields.json","../../../../../../package-shared/data/possibleFields.json","../../../../../../package-shared/data/presets/users.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../jsonData/dbSchemas/main.json","../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package-shared/data/dataTypes.json","../../../../../../package-shared/data/defaultFields.json","../../../../../../package-shared/data/possibleFields.json","../../../../../../package-shared/data/presets/users.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js index 21c0600..4d4ac5d 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8078,e.ids=[8078],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},21611:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>S,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),a=t(2706),o=t(96762),i=t(48225),c=t.n(i),l=t(77619),u=t.n(l),d=t(42249),p=t.n(d);async function _(e,r){if("POST"!==e.method)return r.json({success:!1,payload:null,msg:"Failed!"});try{let t=e.headers.authorization,{deletedUserId:s,database:n}=e.body,a=u()({key:t,database:n?.db_slug,user_id:String(e.query.user_id)});if(!a?.user_id)throw Error("Api Credentials invalid!");if(!a.full_access||!a.sign)return r.json({success:!1,msg:"Unauthorized"});let o=`datasquirel_user_${a.user_id}_${n}`,i=await p()({dbFullName:o,deletedUserId:s});r.json(i)}catch(t){c()({component:"/api/user/delete-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let S=(0,o.M)(s,"default"),g=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/user/[user_id]/delete-user",pathname:"/api/user/[user_id]/delete-user",bundlePath:"",filename:""},userland:s})},42249:(e,r,t)=>{let s=t(64122),n=t(57638);e.exports=async function({dbFullName:e,deletedUserId:r,useLocal:t}){let a=await n({queryString:"SELECT * FROM users WHERE id = ?",queryValuesArray:[r],database:e,useLocal:t});return a?.[0]?{success:!0,result:await s({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:"users",identifierColumnName:"id",identifierValue:r,useLocal:t})}:{success:!1,msg:"User not found"}}},77619:(e,r,t)=>{let s=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:o})=>{if(!e||!a)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let c=n({encryptedString:e}),l=JSON.parse(c||""),u=s.existsSync(`${i}/${l.sign}`);if(String(l.user_id)!==String(a)||!u)return null;if(!l.target_database||o)return l;if(!r&&l.target_database)return null;let d=l.target_database?.split(",").includes(String(r));if(d&&!l.target_table)return l;if(d&&!t&&l.target_table)return null;if(l.target_table?.split(",").includes(String(t)))return l;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},64122:(e,r,t)=>{let s=t(51348),n=t(21339),a=t(44900);async function o({dbContext:e,paradigm:r,dbFullName:t,tableName:o,identifierColumnName:i,identifierValue:c,useLocal:l}){try{let u=!!l||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=l?a:u?s:n,p=`DELETE FROM ${o} WHERE \`${i}\`=?`;return u?await d(p,[c]):await d({paradigm:r,queryString:p,database:t,queryValues:[c]})}catch(e){return null}}e.exports=o},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8078,e.ids=[8078],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},31483:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>g,routeModule:()=>_});var n={};t.r(n),t.d(n,{default:()=>f});var a=t(89947),s=t(2706),l=t(96762),i=t(67619),o=t(56081),u=t(61932),c=t(30944);async function d({dbFullName:e,deletedUserId:r,useLocal:t}){let n=`SELECT * FROM ${e}.users WHERE id = ?`,a=await (0,c.A)({queryString:n,queryValuesArray:[r],database:e,useLocal:t});return a?.[0]?{success:!0,result:await (0,u.A)({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:e,tableName:"users",identifierColumnName:"id",identifierValue:r,useLocal:t})}:{success:!1,msg:"User not found"}}async function f(e,r){if("POST"!==e.method)return r.json({success:!1,payload:null,msg:"Failed!"});try{let t=e.headers.authorization,{deletedUserId:n,database:a}=e.body,s=(0,o.A)({key:t,database:a?.db_slug,user_id:String(e.query.user_id)});if(!s?.user_id)throw Error("Api Credentials invalid!");if(!s.full_access||!s.sign)return r.json({success:!1,msg:"Unauthorized"});let l=`datasquirel_user_${s.user_id}_${a}`,i=await d({dbFullName:l,deletedUserId:n});r.json(i)}catch(t){(0,i.default)({component:"/api/user/delete-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let g=(0,l.M)(n,"default"),p=(0,l.M)(n,"config"),_=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/user/[user_id]/delete-user",pathname:"/api/user/[user_id]/delete-user",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(29021),a=t.n(n),s=t(95969);let l=({key:e,database:r,table:t,user_id:n,media:l})=>{if(!e||!n)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let o=(0,s.A)({encryptedString:e}),u=JSON.parse(o||""),c=a().existsSync(`${i}/${u.sign}`);if(String(u.user_id)!==String(n)||!c)return null;if(!u.target_database||l)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},61932:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(48786),a=t(37275),s=t(7971);async function l({dbContext:e,paradigm:r,dbFullName:t,tableName:l,identifierColumnName:i,identifierValue:o,useLocal:u}){try{let c=!!u||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),d=u?s.A:c?n.A:a.default,f=`DELETE FROM \`${t}\`.\`${l}\` WHERE \`${i}\`=?`;return c?await d(f,[o]):await d({paradigm:r,queryString:f,queryValues:[o]})}catch(e){return null}}},43775:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(95969);let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),a=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let l=new Date,i=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||n||r||s.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` +User Email: ${e?.email}`),s?.url&&(n+=` +URL: ${s.url}`),s?.body&&(n+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),i&&(n+=` IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +Date: ${l.toDateString()} +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let o=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",n),a().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),i=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:c,useLocal:l}){let u;let d=!!l||!!t?.match(/^datasquirel$/),p=l?i:d?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&c)try{let e=u;return await s({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,i,c),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((c,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),c(JSON.parse(JSON.stringify(e)))}function p(e){o.end(),c({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(d).catch(p):o.query(t).then(d).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=21611);module.exports=t})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(43775),a=t(67619),s=t(48786),l=t(37275),i=t(7971);async function o({queryString:e,queryValuesArray:r,database:t,tableSchema:o,useLocal:u}){let c;let d=!!u||!!t?.match(/^datasquirel$/),f=u?i.A:d?s.A:l.default;try{c=e&&r&&Array.isArray(r)&&r[0]?d?await f(e,r):await f({paradigm:"Full Access",queryString:e,queryValues:r}):d?await f(e):await f({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,a.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&o)try{let e=c;return await (0,n.A)({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,a.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),a=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,n.scryptSync)(s,l,i),u=a.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",o,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(a(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;ns})},7971:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(9973),a=t.n(n),s=t(29021),l=t.n(s);async function i(...e){let r=a()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!l().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=31483);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js.nft.json index 1da0f9a..6402c47 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/delete-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js index aa95feb..dba1f6b 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=795,e.ids=[795],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},40132:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>S,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),a=t(2706),o=t(96762),i=t(48225),c=t.n(i);t(57638);var l=t(77619),u=t.n(l),p=t(17550),d=t.n(p);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization,{userId:s,database:n}=e.body,a=u()({key:t,database:n,user_id:String(e.query.user_id)});if(!a?.user_id)throw Error("Api Credentials invalid!");if(!a.full_access||!a.sign)return r.json({success:!1,msg:"Unauthorized"});let o=e.body.fields.map(e=>e.replace(/[^a-z\_]/g,"")),i=`datasquirel_user_${a.user_id}_${n}`,c=await d()({dbFullName:i,userId:s,fields:o});r.json(c)}catch(t){c()({component:"/api/user/get-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"User fetch Error"})}}let S=(0,o.M)(s,"default"),g=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/user/[user_id]/get-user",pathname:"/api/user/[user_id]/get-user",bundlePath:"",filename:""},userland:s})},17550:(e,r,t)=>{let s=t(57638);e.exports=async function({fields:e,dbFullName:r,userId:t,useLocal:n}){let a=`SELECT ${e.join(",")} FROM users WHERE id=?`,o=t||process.env.DSQL_API_USER_ID,i=await s({queryString:a,queryValuesArray:[o],database:r.replace(/[^a-z0-9_]/g,""),useLocal:n});return i&&i[0]?{success:!0,payload:i[0]}:{success:!1,payload:null}}},77619:(e,r,t)=>{let s=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:o})=>{if(!e||!a)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let c=n({encryptedString:e}),l=JSON.parse(c||""),u=s.existsSync(`${i}/${l.sign}`);if(String(l.user_id)!==String(a)||!u)return null;if(!l.target_database||o)return l;if(!r&&l.target_database)return null;let p=l.target_database?.split(",").includes(String(r));if(p&&!l.target_table)return l;if(p&&!t&&l.target_table)return null;if(l.target_table?.split(",").includes(String(t)))return l;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=795,e.ids=[795],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},54014:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>f,routeModule:()=>g});var n={};t.r(n),t.d(n,{default:()=>d});var a=t(89947),s=t(2706),l=t(96762),o=t(67619),i=t(56081),u=t(30944);async function c({fields:e,dbFullName:r,userId:t,useLocal:n}){let a=r.replace(/[^a-z0-9_]/g,""),s=`SELECT ${e.join(",")} FROM ${a}.users WHERE id=?`,l=t||process.env.DSQL_API_USER_ID,o=await (0,u.A)({queryString:s,queryValuesArray:[l],database:a,useLocal:n});return o&&o[0]?{success:!0,payload:o[0]}:{success:!1,payload:null}}async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let t=e.headers.authorization,{userId:n,database:a}=e.body,s=(0,i.A)({key:t,database:a,user_id:String(e.query.user_id)});if(!s?.user_id)throw Error("Api Credentials invalid!");if(!s.full_access||!s.sign)return r.json({success:!1,msg:"Unauthorized"});let l=e.body.fields.map(e=>e.replace(/[^a-z\_]/g,"")),o=`datasquirel_user_${s.user_id}_${a}`,u=await c({dbFullName:o,userId:n,fields:l});r.json(u)}catch(t){(0,o.default)({component:"/api/user/get-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"User fetch Error"})}}let f=(0,l.M)(n,"default"),p=(0,l.M)(n,"config"),g=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/user/[user_id]/get-user",pathname:"/api/user/[user_id]/get-user",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(29021),a=t.n(n),s=t(95969);let l=({key:e,database:r,table:t,user_id:n,media:l})=>{if(!e||!n)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let i=(0,s.A)({encryptedString:e}),u=JSON.parse(i||""),c=a().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(n)||!c)return null;if(!u.target_database||l)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},43775:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(95969);let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),a=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let l=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||n||r||s.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),s?.url&&(n+=` +URL: ${s.url}`),s?.body&&(n+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${l.toDateString()} +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let i=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",n),a().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),i=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:c,useLocal:l}){let u;let p=!!l||!!t?.match(/^datasquirel$/),d=l?i:p?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?p?await d(e,r):await d({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):p?await d(e):await d({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&c)try{let e=u;return await s({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,i,c),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((c,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function p(e){o.end(),c(JSON.parse(JSON.stringify(e)))}function d(e){o.end(),c({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(p).catch(d):o.query(t).then(p).catch(d)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=40132);module.exports=t})(); \ No newline at end of file +${i}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(43775),a=t(67619),s=t(48786),l=t(37275),o=t(7971);async function i({queryString:e,queryValuesArray:r,database:t,tableSchema:i,useLocal:u}){let c;let d=!!u||!!t?.match(/^datasquirel$/),f=u?o.A:d?s.A:l.default;try{c=e&&r&&Array.isArray(r)&&r[0]?d?await f(e,r):await f({paradigm:"Full Access",queryString:e,queryValues:r}):d?await f(e):await f({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,a.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&i)try{let e=c;return await (0,n.A)({unparsedResults:e,tableSchema:i})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,a.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),a=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let i=(0,n.scryptSync)(s,l,o),u=a.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",i,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(a(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;ns})},7971:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(9973),a=t.n(n),s=t(29021),l=t.n(s);async function o(...e){let r=a()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!l().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:l().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=54014);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js.nft.json index 1da0f9a..6402c47 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/get-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js index 89151a3..9b15645 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7110,e.ids=[7110],e.modules={47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},79551:e=>{e.exports=require("url")},72403:(e,t,r)=>{r.r(t),r.d(t,{config:()=>m,default:()=>h,routeModule:()=>f});var s={};r.r(s),r.d(s,{default:()=>d});var i=r(89947),a=r(2706),n=r(96762),o=r(48225),l=r.n(o),u=r(77619),c=r.n(u),p=r(16465),g=r.n(p);async function d(e,t){if("POST"!==e.method)return t.json({success:!1,msg:"Failed!"});try{let{code:r,email:s,clientId:i,clientSecret:a,database:n,additionalFields:o}=e.body,l=e.headers.authorization||"",u=c()({key:l,database:n,user_id:String(e.query.user_id)});if(!u?.user_id)throw Error("Api Credentials invalid!");if(!u.full_access||!u.sign)return t.json({success:!1,msg:"Unauthorized"});let p=`datasquirel_user_${u.user_id}_${n}`,d=await g()({additionalFields:o,clientId:i,clientSecret:a,code:r,database:p,email:s,res:t,userId:u.user_id});t.json(d)}catch(r){console.log("ERROR in 'github-auth' API route =>",r.message),l()({component:"/api/social-login/github-auth/catch-error",message:r.message,req:e}),t.json({success:!1,msg:"Failed!"})}}let h=(0,n.M)(s,"default"),m=(0,n.M)(s,"config"),f=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/user/[user_id]/github-login",pathname:"/api/user/[user_id]/github-login",bundlePath:"",filename:""},userland:s})},67684:(e,t,r)=>{let s=r(51348),i=r(83634);e.exports=async function({code:e,clientId:t,clientSecret:r}){let a;try{let n=await i({method:"POST",hostname:"github.com",path:`/login/oauth/access_token?client_id=${t}&client_secret=${r}&code=${e}`,headers:{Accept:"application/json","User-Agent":"*"},scheme:"https"}),o=JSON.parse(n);if(!o?.access_token)return a;let l=await i({method:"GET",hostname:"api.github.com",path:"/user",headers:{Authorization:`Bearer ${o.access_token}`,"User-Agent":"*"},scheme:"https"});if(a=JSON.parse(l),!a?.email&&a){let e=await s(`SELECT email FROM users WHERE social_login='1' AND social_platform='github' AND social_id='${a.id}'`);e&&e[0]&&(a.email=e[0].email)}}catch(e){console.log("ERROR in githubLogin.js backend function =>",e.message)}return a}},16465:(e,t,r)=>{let s=r(14385),i=r(67684),a=r(19691);e.exports=async function({code:e,clientId:t,clientSecret:r,database:n,additionalFields:o,res:l,email:u,userId:c}){if(!e||!t||!r||!n)return{success:!1,msg:"Missing query params"};if("string"!=typeof e||"string"!=typeof t||"string"!=typeof r||"string"!=typeof n)return{success:!1,msg:"Wrong Parameters"};let p=await i({code:e,clientId:t,clientSecret:r});if(!p)return{success:!1,msg:"No github user returned"};let g=p.name||p.id||p.login,d=p.name||p.login,h=d?.match(/ /)?d?.split(" "):d?.match(/\-/)?d?.split("-"):[d],m={email:p.email,first_name:a(h[0]),last_name:a(h[1]),social_id:g,social_platform:"github",image:p.avatar_url,image_thumbnail:p.avatar_url,username:"github-user-"+g};return{...await s({database:n,email:p.email,payload:m,social_platform:"github",social_id:g,supEmail:u,additionalFields:o})}}},77619:(e,t,r)=>{let s=r(29021),i=r(72835);e.exports=({key:e,database:t,table:r,user_id:a,media:n})=>{if(!e||!a)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=i({encryptedString:e}),u=JSON.parse(l||""),c=s.existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(a)||!c)return null;if(!u.target_database||n)return u;if(!t&&u.target_database)return null;let p=u.target_database?.split(",").includes(String(t));if(p&&!u.target_table)return u;if(p&&!r&&u.target_table)return null;if(u.target_table?.split(",").includes(String(r)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},83634:(e,t,r)=>{let s=r(55591),i=r(81630),{URL:a}=r(79551);e.exports=function({url:e,method:t,hostname:r,path:n,headers:o,body:l,port:u,scheme:c}){let p=l?JSON.stringify(l):null,g=e?new a(e):null,d={method:t||"GET",hostname:g?g.hostname:r,port:c?.match(/https/i)?443:g?g.protocol?.match(/https/i)?443:g.port:u?Number(u):80,headers:{}};return n&&(d.path=n),o&&(d.headers=o),l&&(d.headers["Content-Type"]="application/json",d.headers["Content-Length"]=p?Buffer.from(p).length:void 0),new Promise((e,t)=>{let r=(c?.match(/https/i)?s:g?.protocol?.match(/https/i)?s:i).request(d,r=>{var s="";r.on("data",function(e){s+=e}),r.on("end",function(){e(s)}),r.on("error",e=>{console.log("HTTP response error =>",e.message),t(`HTTP response error =>, ${e.message}`)}),r.on("close",()=>{console.log("HTTP(S) Response Closed Successfully")})});l&&r.write(p),r.on("error",e=>{console.log("HTTPS request ERROR =>",e.message),t(`HTTP request error =>, ${e.message}`)}),r.end()})}},19691:e=>{e.exports=function(e){if(!e?.match(/./))return"";if(e?.match(/ /))return e;if(!e)return null;{let t=e.split(""),r=[];for(let e=0;et(t.s=e),s=t.X(0,[4050,4385],()=>r(72403));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7110,e.ids=[7110],e.modules={47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},79551:e=>{e.exports=require("url")},98728:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>m,routeModule:()=>f});var s={};r.r(s),r.d(s,{default:()=>d});var i=r(89947),a=r(2706),n=r(96762),o=r(67619),u=r(56081),l=r(83704),c=r(2402);function p(e){if(!e?.match(/./))return"";if(e?.match(/ /))return e;if(!e)return null;{let t=e.split(""),r=[];for(let e=0;e",r.message),(0,o.default)({component:"/api/social-login/github-auth/catch-error",message:r.message,req:e}),t.json({success:!1,msg:"Failed!"})}}let m=(0,n.M)(s,"default"),h=(0,n.M)(s,"config"),f=new i.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/user/[user_id]/github-login",pathname:"/api/user/[user_id]/github-login",bundlePath:"",filename:""},userland:s})},2402:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(48786),i=r(61556);async function a({code:e,clientId:t,clientSecret:r}){let a;try{let n=await (0,i.A)({method:"POST",hostname:"github.com",path:`/login/oauth/access_token?client_id=${t}&client_secret=${r}&code=${e}`,headers:{Accept:"application/json","User-Agent":"*"},scheme:"https"}),o=JSON.parse(n);if(!o?.access_token)return a;let u=await (0,i.A)({method:"GET",hostname:"api.github.com",path:"/user",headers:{Authorization:`Bearer ${o.access_token}`,"User-Agent":"*"},scheme:"https"});if(a=JSON.parse(u),!a?.email&&a){let e=await (0,s.A)(`SELECT email FROM users WHERE social_login='1' AND social_platform='github' AND social_id='${a.id}'`);e&&e[0]&&(a.email=e[0].email)}}catch(e){console.log("ERROR in githubLogin.ts backend function =>",e.message)}return a}},56081:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(29021),i=r.n(s),a=r(95969);let n=({key:e,database:t,table:r,user_id:s,media:n})=>{if(!e||!s)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let u=(0,a.A)({encryptedString:e}),l=JSON.parse(u||""),c=i().existsSync(`${o}/${l.sign}`);if(String(l.user_id)!==String(s)||!c)return null;if(!l.target_database||n)return l;if(!t&&l.target_database)return null;let p=l.target_database?.split(",").includes(String(t));if(p&&!l.target_table)return l;if(p&&!r&&l.target_table)return null;if(l.target_table?.split(",").includes(String(r)))return l;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},61556:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(55591),i=r.n(s),a=r(81630),n=r.n(a),o=r(79551);function u({url:e,method:t,hostname:r,path:s,headers:a,body:u,port:l,scheme:c}){let p=u?JSON.stringify(u):null,g=e?new o.URL(e):null,d={method:t||"GET",hostname:g?g.hostname:r,port:c?.match(/https/i)?443:g?g.protocol?.match(/https/i)?443:g.port:l?Number(l):80,headers:{}};return s&&(d.path=s),a&&(d.headers=a),u&&(d.headers["Content-Type"]="application/json",d.headers["Content-Length"]=p?Buffer.from(p).length:void 0),new Promise((e,t)=>{let r=(c?.match(/https/i)?i():g?.protocol?.match(/https/i)?i():n()).request(d,r=>{var s="";r.on("data",function(e){s+=e}),r.on("end",function(){e(s)}),r.on("error",e=>{console.log("HTTP response error =>",e.message),t(`HTTP response error =>, ${e.message}`)}),r.on("close",()=>{console.log("HTTP(S) Response Closed Successfully")})});u&&r.write(p),r.on("error",e=>{console.log("HTTPS request ERROR =>",e.message),t(`HTTP request error =>, ${e.message}`)}),r.end()})}}};var t=require("../../../../webpack-api-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[1251,3704],()=>r(98728));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js.nft.json index 33cfc23..fc3bc65 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/github-login.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/generate-password/main.js","../../../../../../node_modules/generate-password/package.json","../../../../../../node_modules/generate-password/src/generate.js","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../../node_modules/nodemailer/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/generate-password/main.js","../../../../../../node_modules/generate-password/package.json","../../../../../../node_modules/generate-password/src/generate.js","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../../node_modules/nodemailer/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js index 604317a..210d765 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5770,e.ids=[5770],e.modules={47795:e=>{e.exports=require("generate-password")},27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},56891:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>f,routeModule:()=>_});var s={};t.r(s),t.d(s,{default:()=>c});var a=t(89947),i=t(2706),o=t(96762),n=t(48225),u=t.n(n),l=t(77619),d=t.n(l),g=t(2853),p=t.n(g);async function c(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Failed!"});try{let{token:t,database:s,additionalFields:a}=e.body,i=e.headers.authorization,o=d()({key:i,database:s,user_id:String(e.query.user_id)});if(!o?.user_id)throw Error("Api Credentials invalid!");if(!o.full_access||!o.sign)return r.json({success:!1,msg:"Unauthorized"});let n=`datasquirel_user_${o.user_id}_${s}`,u=await p()({database:n,token:t,additionalFields:a});r.json(u)}catch(t){u()({component:"/api/user/google-login/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Error: "+t.message})}}let f=(0,o.M)(s,"default"),m=(0,o.M)(s,"config"),_=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/user/[user_id]/google-login",pathname:"/api/user/[user_id]/google-login",bundlePath:"",filename:""},userland:s})},2853:(e,r,t)=>{let s=t(55591),a=t(14385),i=t(27836);e.exports=async function({token:e,database:r,additionalFields:t}){try{let o=await new Promise((r,t)=>{s.request({method:"GET",hostname:"www.googleapis.com",path:"/oauth2/v3/userinfo",headers:{Authorization:`Bearer ${e}`}},e=>{let t="";e.on("data",e=>{t+=e}),e.on("end",()=>{r(i.parse(t))})}).end()});if(!o?.email_verified)throw Error("No Google User.");if(!r||"string"!=typeof r||r?.match(/ /))return{success:!1,payload:void 0,msg:"Please provide a database slug(database name in lowercase with no spaces)"};let{given_name:n,family_name:u,email:l,sub:d,picture:g}=o,p={email:l,first_name:n,last_name:u,social_id:d,social_platform:"google",image:g,image_thumbnail:g,username:`google-user-${d}`};return{...await a({database:r,email:l||"",payload:p,social_platform:"google",social_id:d,additionalFields:t})}}catch(e){return console.log(`apo-google-login.js ERROR: ${e.message}`),{success:!1,payload:void 0,msg:e.message}}}},77619:(e,r,t)=>{let s=t(29021),a=t(72835);e.exports=({key:e,database:r,table:t,user_id:i,media:o})=>{if(!e||!i)return null;try{let n=process.env.DSQL_API_KEYS_PATH;if(!n)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let u=a({encryptedString:e}),l=JSON.parse(u||""),d=s.existsSync(`${n}/${l.sign}`);if(String(l.user_id)!==String(i)||!d)return null;if(!l.target_database||o)return l;if(!r&&l.target_database)return null;let g=l.target_database?.split(",").includes(String(r));if(g&&!l.target_table)return l;if(g&&!t&&l.target_table)return null;if(l.target_table?.split(",").includes(String(t)))return l;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},27836:e=>{e.exports={parse:function(e,r){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,r)}catch(e){return}}},stringify:function(e,r,t){try{return JSON.stringify(e,r,t)}catch(e){return}}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4050,4385],()=>t(56891));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5770,e.ids=[5770],e.modules={47795:e=>{e.exports=require("generate-password")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},72583:e=>{e.exports=require("sanitize-html")},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")},55591:e=>{e.exports=require("https")},33873:e=>{e.exports=require("path")},21748:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>m,routeModule:()=>h});var s={};t.r(s),t.d(s,{default:()=>f});var a=t(89947),i=t(2706),o=t(96762),n=t(67619),u=t(56081),l=t(55591),d=t.n(l),g=t(83704),c=t(59338);async function p({token:e,database:r,additionalFields:t,additionalData:s}){try{let a=await new Promise((r,t)=>{d().request({method:"GET",hostname:"www.googleapis.com",path:"/oauth2/v3/userinfo",headers:{Authorization:`Bearer ${e}`}},e=>{let t="";e.on("data",e=>{t+=e}),e.on("end",()=>{r(c.A.parse(t))})}).end()});if(!a?.email_verified)throw Error("No Google User.");if(!r||"string"!=typeof r||r?.match(/ /))return{success:!1,payload:void 0,msg:"Please provide a database slug(database name in lowercase with no spaces)"};let{given_name:i,family_name:o,email:n,sub:u,picture:l}=a,p={email:n,first_name:i,last_name:o,social_id:u,social_platform:"google",image:l,image_thumbnail:l,username:`google-user-${u}`};return s&&(p={...p,...s}),{...await (0,g.A)({database:r,email:n||"",payload:p,social_platform:"google",social_id:u,additionalFields:t})}}catch(e){return console.log(`api-google-login.ts ERROR: ${e.message}`),{success:!1,payload:void 0,msg:e.message}}}async function f(e,r){if("POST"!==e.method)return r.json({success:!1,msg:"Failed!"});try{let{token:t,database:s,additionalFields:a,additionalData:i}=e.body,o=e.headers.authorization,n=(0,u.A)({key:o,database:s,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");if(!n.full_access||!n.sign)return r.json({success:!1,msg:"Unauthorized"});let l=`datasquirel_user_${n.user_id}_${s}`,d=await p({database:l,token:t,additionalFields:a,additionalData:i});r.json(d)}catch(t){(0,n.default)({component:"/api/user/google-login/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Error: "+t.message})}}let m=(0,o.M)(s,"default"),_=(0,o.M)(s,"config"),h=new a.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/user/[user_id]/google-login",pathname:"/api/user/[user_id]/google-login",bundlePath:"",filename:""},userland:s})},56081:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(29021),a=t.n(s),i=t(95969);let o=({key:e,database:r,table:t,user_id:s,media:o})=>{if(!e||!s)return null;try{let n=process.env.DSQL_API_KEYS_PATH;if(!n)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let u=(0,i.A)({encryptedString:e}),l=JSON.parse(u||""),d=a().existsSync(`${n}/${l.sign}`);if(String(l.user_id)!==String(s)||!d)return null;if(!l.target_database||o)return l;if(!r&&l.target_database)return null;let g=l.target_database?.split(",").includes(String(r));if(g&&!l.target_table)return l;if(g&&!t&&l.target_table)return null;if(l.target_table?.split(",").includes(String(t)))return l;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},59338:(e,r,t)=>{t.d(r,{A:()=>s});let s={parse:function(e,r){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,r)}catch(e){return}}},stringify:function(e,r,t){try{return JSON.stringify(e,r||void 0,t)}catch(e){return}}}}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[1251,3704],()=>t(21748));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js.nft.json index 33cfc23..fc3bc65 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/google-login.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/generate-password/main.js","../../../../../../node_modules/generate-password/package.json","../../../../../../node_modules/generate-password/src/generate.js","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../../node_modules/nodemailer/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/generate-password/main.js","../../../../../../node_modules/generate-password/package.json","../../../../../../node_modules/generate-password/src/generate.js","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../../node_modules/nodemailer/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js index 5bfd9c9..fb057ce 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=2738,e.ids=[2738],e.modules={76154:e=>{e.exports=require("google-auth-library")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},41620:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>p,routeModule:()=>m});var n={};t.r(n),t.d(n,{default:()=>g});var s=t(89947),i=t(2706),o=t(96762),a=t(48225),l=t.n(a),u=t(77619),c=t.n(u);let{OAuth2Client:d}=t(76154);async function g(e,r){if("POST"!==e.method)return r.json({success:!1,payload:null,msg:"Failed!"});try{let t=e.headers.authorization,n=c()({key:t,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");if(!n.full_access||!n.sign)return r.json({success:!1,payload:null,msg:"Unauthorized"});let{token:s,clientId:i}=e.body,o=new d(i),a=await o.verifyIdToken({idToken:s,audience:i});if(!a?.getPayload()?.email_verified)return r.json({success:!1,payload:null,msg:"User not verified!"});let l=a.getPayload();r.json({success:!0,payload:l})}catch(t){l()({component:"/api/user/grab-google-user-from-token/main-catch-error",message:t.message,req:e}),r.json({success:!1,payload:null,msg:"User fetch Error"})}}let p=(0,o.M)(n,"default"),f=(0,o.M)(n,"config"),m=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/user/[user_id]/grab-google-user-from-token",pathname:"/api/user/[user_id]/grab-google-user-from-token",bundlePath:"",filename:""},userland:n})},77619:(e,r,t)=>{let n=t(29021),s=t(72835);e.exports=({key:e,database:r,table:t,user_id:i,media:o})=>{if(!e||!i)return null;try{let a=process.env.DSQL_API_KEYS_PATH;if(!a)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=s({encryptedString:e}),u=JSON.parse(l||""),c=n.existsSync(`${a}/${u.sign}`);if(String(u.user_id)!==String(i)||!c)return null;if(!u.target_database||o)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},48225:(e,r,t)=>{let n=t(29021),{IncomingMessage:s}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:s,req:i}){let o=new Date,a=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],r=i.headers["x-real-ip"],t=i.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||i.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2738,e.ids=[2738],e.modules={76154:e=>{e.exports=require("google-auth-library")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},96487:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>d,routeModule:()=>g});var n={};t.r(n),t.d(n,{default:()=>c});var i=t(89947),s=t(2706),a=t(96762),o=t(67619),l=t(56081);let{OAuth2Client:u}=t(76154);async function c(e,r){if("POST"!==e.method)return r.json({success:!1,payload:null,msg:"Failed!"});try{let t=e.headers.authorization,n=(0,l.A)({key:t,user_id:String(e.query.user_id)});if(!n?.user_id)throw Error("Api Credentials invalid!");if(!n.full_access||!n.sign)return r.json({success:!1,payload:null,msg:"Unauthorized"});let{token:i,clientId:s}=e.body,a=new u(s),o=await a.verifyIdToken({idToken:i,audience:s});if(!o?.getPayload()?.email_verified)return r.json({success:!1,payload:null,msg:"User not verified!"});let c=o.getPayload();r.json({success:!0,payload:c})}catch(t){(0,o.default)({component:"/api/user/grab-google-user-from-token/main-catch-error",message:t.message,req:e}),r.json({success:!1,payload:null,msg:"User fetch Error"})}}let d=(0,a.M)(n,"default"),f=(0,a.M)(n,"config"),g=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/user/[user_id]/grab-google-user-from-token",pathname:"/api/user/[user_id]/grab-google-user-from-token",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(29021),i=t.n(n),s=t(95969);let a=({key:e,database:r,table:t,user_id:n,media:a})=>{if(!e||!n)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,s.A)({encryptedString:e}),u=JSON.parse(l||""),c=i().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(n)||!c)return null;if(!u.target_database||a)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),i=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let a=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||n||r||s.socket.remoteAddress;if(!i)return null;return String(i)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(s+=` -URL: ${i.url}`),i?.body&&(s+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),a&&(s+=` -IP: ${a}`),s+=` -Date: ${o.toDateString()} -========================================`,n.existsSync("./.tmp/error.log")||n.writeFileSync("./.tmp/error.log","","utf-8");let l=n.readFileSync("./.tmp/error.log","utf-8");n.writeFileSync("./.tmp/error.log",s),n.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),s?.url&&(n+=` +URL: ${s.url}`),s?.body&&(n+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(n+=` +IP: ${o}`),n+=` +Date: ${a.toDateString()} +========================================`,i().existsSync("./.tmp/error.log")||i().writeFileSync("./.tmp/error.log","","utf-8");let l=i().readFileSync("./.tmp/error.log","utf-8");i().writeFileSync("./.tmp/error.log",n),i().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},72835:(e,r,t)=>{let{scryptSync:n,createDecipheriv:s}=t(55511),{Buffer:i}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let u=s("aes-192-cbc",n(o,a,l),i.alloc(16,0));try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=41620);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),i=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,a=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(s,a,o),u=i.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=96487);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js.nft.json index 2fda111..462b8b3 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/grab-google-user-from-token.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/agent-base/dist/src/index.js","../../../../../../node_modules/agent-base/dist/src/promisify.js","../../../../../../node_modules/agent-base/package.json","../../../../../../node_modules/arrify/index.js","../../../../../../node_modules/arrify/package.json","../../../../../../node_modules/base64-js/index.js","../../../../../../node_modules/base64-js/package.json","../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/buffer-equal-constant-time/index.js","../../../../../../node_modules/buffer-equal-constant-time/package.json","../../../../../../node_modules/debug/package.json","../../../../../../node_modules/debug/src/browser.js","../../../../../../node_modules/debug/src/common.js","../../../../../../node_modules/debug/src/index.js","../../../../../../node_modules/debug/src/node.js","../../../../../../node_modules/ecdsa-sig-formatter/package.json","../../../../../../node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js","../../../../../../node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js","../../../../../../node_modules/extend/index.js","../../../../../../node_modules/extend/package.json","../../../../../../node_modules/fast-text-encoding/package.json","../../../../../../node_modules/fast-text-encoding/text.min.js","../../../../../../node_modules/gaxios/build/src/common.js","../../../../../../node_modules/gaxios/build/src/gaxios.js","../../../../../../node_modules/gaxios/build/src/index.js","../../../../../../node_modules/gaxios/build/src/retry.js","../../../../../../node_modules/gaxios/package.json","../../../../../../node_modules/gcp-metadata/build/src/gcp-residency.js","../../../../../../node_modules/gcp-metadata/build/src/index.js","../../../../../../node_modules/gcp-metadata/package.json","../../../../../../node_modules/google-auth-library/build/src/auth/authclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/awsclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/awsrequestsigner.js","../../../../../../node_modules/google-auth-library/build/src/auth/baseexternalclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/computeclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/downscopedclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/envDetect.js","../../../../../../node_modules/google-auth-library/build/src/auth/executable-response.js","../../../../../../node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js","../../../../../../node_modules/google-auth-library/build/src/auth/externalclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/googleauth.js","../../../../../../node_modules/google-auth-library/build/src/auth/iam.js","../../../../../../node_modules/google-auth-library/build/src/auth/identitypoolclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/idtokenclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/impersonated.js","../../../../../../node_modules/google-auth-library/build/src/auth/jwtaccess.js","../../../../../../node_modules/google-auth-library/build/src/auth/jwtclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/loginticket.js","../../../../../../node_modules/google-auth-library/build/src/auth/oauth2client.js","../../../../../../node_modules/google-auth-library/build/src/auth/oauth2common.js","../../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js","../../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js","../../../../../../node_modules/google-auth-library/build/src/auth/refreshclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/stscredentials.js","../../../../../../node_modules/google-auth-library/build/src/crypto/browser/crypto.js","../../../../../../node_modules/google-auth-library/build/src/crypto/crypto.js","../../../../../../node_modules/google-auth-library/build/src/crypto/node/crypto.js","../../../../../../node_modules/google-auth-library/build/src/index.js","../../../../../../node_modules/google-auth-library/build/src/options.js","../../../../../../node_modules/google-auth-library/build/src/transporters.js","../../../../../../node_modules/google-auth-library/package.json","../../../../../../node_modules/google-p12-pem/build/src/index.js","../../../../../../node_modules/google-p12-pem/package.json","../../../../../../node_modules/gtoken/build/src/index.js","../../../../../../node_modules/gtoken/package.json","../../../../../../node_modules/https-proxy-agent/dist/agent.js","../../../../../../node_modules/https-proxy-agent/dist/index.js","../../../../../../node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../../../../node_modules/https-proxy-agent/package.json","../../../../../../node_modules/is-stream/index.js","../../../../../../node_modules/is-stream/package.json","../../../../../../node_modules/json-bigint/index.js","../../../../../../node_modules/json-bigint/lib/parse.js","../../../../../../node_modules/json-bigint/lib/stringify.js","../../../../../../node_modules/json-bigint/package.json","../../../../../../node_modules/jwa/index.js","../../../../../../node_modules/jwa/package.json","../../../../../../node_modules/jws/index.js","../../../../../../node_modules/jws/lib/data-stream.js","../../../../../../node_modules/jws/lib/sign-stream.js","../../../../../../node_modules/jws/lib/tostring.js","../../../../../../node_modules/jws/lib/verify-stream.js","../../../../../../node_modules/jws/package.json","../../../../../../node_modules/lru-cache/index.js","../../../../../../node_modules/lru-cache/package.json","../../../../../../node_modules/ms/index.js","../../../../../../node_modules/ms/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/node-fetch/lib/index.js","../../../../../../node_modules/node-fetch/package.json","../../../../../../node_modules/node-forge/lib/aes.js","../../../../../../node_modules/node-forge/lib/aesCipherSuites.js","../../../../../../node_modules/node-forge/lib/asn1-validator.js","../../../../../../node_modules/node-forge/lib/asn1.js","../../../../../../node_modules/node-forge/lib/baseN.js","../../../../../../node_modules/node-forge/lib/cipher.js","../../../../../../node_modules/node-forge/lib/cipherModes.js","../../../../../../node_modules/node-forge/lib/des.js","../../../../../../node_modules/node-forge/lib/ed25519.js","../../../../../../node_modules/node-forge/lib/forge.js","../../../../../../node_modules/node-forge/lib/hmac.js","../../../../../../node_modules/node-forge/lib/index.js","../../../../../../node_modules/node-forge/lib/jsbn.js","../../../../../../node_modules/node-forge/lib/kem.js","../../../../../../node_modules/node-forge/lib/log.js","../../../../../../node_modules/node-forge/lib/md.all.js","../../../../../../node_modules/node-forge/lib/md.js","../../../../../../node_modules/node-forge/lib/md5.js","../../../../../../node_modules/node-forge/lib/mgf.js","../../../../../../node_modules/node-forge/lib/mgf1.js","../../../../../../node_modules/node-forge/lib/oids.js","../../../../../../node_modules/node-forge/lib/pbe.js","../../../../../../node_modules/node-forge/lib/pbkdf2.js","../../../../../../node_modules/node-forge/lib/pem.js","../../../../../../node_modules/node-forge/lib/pkcs1.js","../../../../../../node_modules/node-forge/lib/pkcs12.js","../../../../../../node_modules/node-forge/lib/pkcs7.js","../../../../../../node_modules/node-forge/lib/pkcs7asn1.js","../../../../../../node_modules/node-forge/lib/pki.js","../../../../../../node_modules/node-forge/lib/prime.js","../../../../../../node_modules/node-forge/lib/prng.js","../../../../../../node_modules/node-forge/lib/pss.js","../../../../../../node_modules/node-forge/lib/random.js","../../../../../../node_modules/node-forge/lib/rc2.js","../../../../../../node_modules/node-forge/lib/rsa.js","../../../../../../node_modules/node-forge/lib/sha1.js","../../../../../../node_modules/node-forge/lib/sha256.js","../../../../../../node_modules/node-forge/lib/sha512.js","../../../../../../node_modules/node-forge/lib/ssh.js","../../../../../../node_modules/node-forge/lib/tls.js","../../../../../../node_modules/node-forge/lib/util.js","../../../../../../node_modules/node-forge/lib/x509.js","../../../../../../node_modules/node-forge/package.json","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/tr46/index.js","../../../../../../node_modules/tr46/lib/mappingTable.json","../../../../../../node_modules/tr46/package.json","../../../../../../node_modules/webidl-conversions/lib/index.js","../../../../../../node_modules/webidl-conversions/package.json","../../../../../../node_modules/whatwg-url/lib/URL-impl.js","../../../../../../node_modules/whatwg-url/lib/URL.js","../../../../../../node_modules/whatwg-url/lib/public-api.js","../../../../../../node_modules/whatwg-url/lib/url-state-machine.js","../../../../../../node_modules/whatwg-url/lib/utils.js","../../../../../../node_modules/whatwg-url/package.json","../../../../../../node_modules/yallist/iterator.js","../../../../../../node_modules/yallist/package.json","../../../../../../node_modules/yallist/yallist.js","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/agent-base/dist/src/index.js","../../../../../../node_modules/agent-base/dist/src/promisify.js","../../../../../../node_modules/agent-base/package.json","../../../../../../node_modules/arrify/index.js","../../../../../../node_modules/arrify/package.json","../../../../../../node_modules/base64-js/index.js","../../../../../../node_modules/base64-js/package.json","../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/buffer-equal-constant-time/index.js","../../../../../../node_modules/buffer-equal-constant-time/package.json","../../../../../../node_modules/debug/package.json","../../../../../../node_modules/debug/src/browser.js","../../../../../../node_modules/debug/src/common.js","../../../../../../node_modules/debug/src/index.js","../../../../../../node_modules/debug/src/node.js","../../../../../../node_modules/ecdsa-sig-formatter/package.json","../../../../../../node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js","../../../../../../node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js","../../../../../../node_modules/extend/index.js","../../../../../../node_modules/extend/package.json","../../../../../../node_modules/fast-text-encoding/package.json","../../../../../../node_modules/fast-text-encoding/text.min.js","../../../../../../node_modules/gaxios/build/src/common.js","../../../../../../node_modules/gaxios/build/src/gaxios.js","../../../../../../node_modules/gaxios/build/src/index.js","../../../../../../node_modules/gaxios/build/src/retry.js","../../../../../../node_modules/gaxios/package.json","../../../../../../node_modules/gcp-metadata/build/src/gcp-residency.js","../../../../../../node_modules/gcp-metadata/build/src/index.js","../../../../../../node_modules/gcp-metadata/package.json","../../../../../../node_modules/google-auth-library/build/src/auth/authclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/awsclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/awsrequestsigner.js","../../../../../../node_modules/google-auth-library/build/src/auth/baseexternalclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/computeclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/downscopedclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/envDetect.js","../../../../../../node_modules/google-auth-library/build/src/auth/executable-response.js","../../../../../../node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js","../../../../../../node_modules/google-auth-library/build/src/auth/externalclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/googleauth.js","../../../../../../node_modules/google-auth-library/build/src/auth/iam.js","../../../../../../node_modules/google-auth-library/build/src/auth/identitypoolclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/idtokenclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/impersonated.js","../../../../../../node_modules/google-auth-library/build/src/auth/jwtaccess.js","../../../../../../node_modules/google-auth-library/build/src/auth/jwtclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/loginticket.js","../../../../../../node_modules/google-auth-library/build/src/auth/oauth2client.js","../../../../../../node_modules/google-auth-library/build/src/auth/oauth2common.js","../../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js","../../../../../../node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js","../../../../../../node_modules/google-auth-library/build/src/auth/refreshclient.js","../../../../../../node_modules/google-auth-library/build/src/auth/stscredentials.js","../../../../../../node_modules/google-auth-library/build/src/crypto/browser/crypto.js","../../../../../../node_modules/google-auth-library/build/src/crypto/crypto.js","../../../../../../node_modules/google-auth-library/build/src/crypto/node/crypto.js","../../../../../../node_modules/google-auth-library/build/src/index.js","../../../../../../node_modules/google-auth-library/build/src/options.js","../../../../../../node_modules/google-auth-library/build/src/transporters.js","../../../../../../node_modules/google-auth-library/package.json","../../../../../../node_modules/google-p12-pem/build/src/index.js","../../../../../../node_modules/google-p12-pem/package.json","../../../../../../node_modules/gtoken/build/src/index.js","../../../../../../node_modules/gtoken/package.json","../../../../../../node_modules/https-proxy-agent/dist/agent.js","../../../../../../node_modules/https-proxy-agent/dist/index.js","../../../../../../node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../../../../node_modules/https-proxy-agent/package.json","../../../../../../node_modules/is-stream/index.js","../../../../../../node_modules/is-stream/package.json","../../../../../../node_modules/json-bigint/index.js","../../../../../../node_modules/json-bigint/lib/parse.js","../../../../../../node_modules/json-bigint/lib/stringify.js","../../../../../../node_modules/json-bigint/package.json","../../../../../../node_modules/jwa/index.js","../../../../../../node_modules/jwa/package.json","../../../../../../node_modules/jws/index.js","../../../../../../node_modules/jws/lib/data-stream.js","../../../../../../node_modules/jws/lib/sign-stream.js","../../../../../../node_modules/jws/lib/tostring.js","../../../../../../node_modules/jws/lib/verify-stream.js","../../../../../../node_modules/jws/package.json","../../../../../../node_modules/lru-cache/index.js","../../../../../../node_modules/lru-cache/package.json","../../../../../../node_modules/ms/index.js","../../../../../../node_modules/ms/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/node-fetch/lib/index.js","../../../../../../node_modules/node-fetch/package.json","../../../../../../node_modules/node-forge/lib/aes.js","../../../../../../node_modules/node-forge/lib/aesCipherSuites.js","../../../../../../node_modules/node-forge/lib/asn1-validator.js","../../../../../../node_modules/node-forge/lib/asn1.js","../../../../../../node_modules/node-forge/lib/baseN.js","../../../../../../node_modules/node-forge/lib/cipher.js","../../../../../../node_modules/node-forge/lib/cipherModes.js","../../../../../../node_modules/node-forge/lib/des.js","../../../../../../node_modules/node-forge/lib/ed25519.js","../../../../../../node_modules/node-forge/lib/forge.js","../../../../../../node_modules/node-forge/lib/hmac.js","../../../../../../node_modules/node-forge/lib/index.js","../../../../../../node_modules/node-forge/lib/jsbn.js","../../../../../../node_modules/node-forge/lib/kem.js","../../../../../../node_modules/node-forge/lib/log.js","../../../../../../node_modules/node-forge/lib/md.all.js","../../../../../../node_modules/node-forge/lib/md.js","../../../../../../node_modules/node-forge/lib/md5.js","../../../../../../node_modules/node-forge/lib/mgf.js","../../../../../../node_modules/node-forge/lib/mgf1.js","../../../../../../node_modules/node-forge/lib/oids.js","../../../../../../node_modules/node-forge/lib/pbe.js","../../../../../../node_modules/node-forge/lib/pbkdf2.js","../../../../../../node_modules/node-forge/lib/pem.js","../../../../../../node_modules/node-forge/lib/pkcs1.js","../../../../../../node_modules/node-forge/lib/pkcs12.js","../../../../../../node_modules/node-forge/lib/pkcs7.js","../../../../../../node_modules/node-forge/lib/pkcs7asn1.js","../../../../../../node_modules/node-forge/lib/pki.js","../../../../../../node_modules/node-forge/lib/prime.js","../../../../../../node_modules/node-forge/lib/prng.js","../../../../../../node_modules/node-forge/lib/pss.js","../../../../../../node_modules/node-forge/lib/random.js","../../../../../../node_modules/node-forge/lib/rc2.js","../../../../../../node_modules/node-forge/lib/rsa.js","../../../../../../node_modules/node-forge/lib/sha1.js","../../../../../../node_modules/node-forge/lib/sha256.js","../../../../../../node_modules/node-forge/lib/sha512.js","../../../../../../node_modules/node-forge/lib/ssh.js","../../../../../../node_modules/node-forge/lib/tls.js","../../../../../../node_modules/node-forge/lib/util.js","../../../../../../node_modules/node-forge/lib/x509.js","../../../../../../node_modules/node-forge/package.json","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/tr46/index.js","../../../../../../node_modules/tr46/lib/mappingTable.json","../../../../../../node_modules/tr46/package.json","../../../../../../node_modules/webidl-conversions/lib/index.js","../../../../../../node_modules/webidl-conversions/package.json","../../../../../../node_modules/whatwg-url/lib/URL-impl.js","../../../../../../node_modules/whatwg-url/lib/URL.js","../../../../../../node_modules/whatwg-url/lib/public-api.js","../../../../../../node_modules/whatwg-url/lib/url-state-machine.js","../../../../../../node_modules/whatwg-url/lib/utils.js","../../../../../../node_modules/whatwg-url/package.json","../../../../../../node_modules/yallist/iterator.js","../../../../../../node_modules/yallist/package.json","../../../../../../node_modules/yallist/yallist.js","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js index 00501cf..43b98e4 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=2726,e.ids=[2726],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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},81725:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>m,routeModule:()=>f});var s={};t.r(s),t.d(s,{default:()=>_});var a=t(89947),n=t(2706),o=t(96762),i=t(48225),l=t.n(i),c=t(77619),u=t.n(c),d=t(81681),p=t.n(d);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let{encryptionKey:t,payload:s,database:a,additionalFields:n,email_login:o,email_login_code:i,email_login_field:l,token:c,skipPassword:d}=e.body,_=e.headers.authorization,m=u()({key:_,database:a,user_id:String(e.query.user_id)});if(!m?.user_id)throw Error("Api Credentials invalid!");if(!m.full_access||!m.sign)return r.json({success:!1,msg:"Unauthorized"});let g=s.email,f=s.username,S=s.password,y=`datasquirel_user_${m.user_id}_${a}`,D=await p()({database:y,email:g,username:f,password:S,skipPassword:d,encryptionKey:t,additionalFields:n,email_login:o,email_login_code:i,email_login_field:l,token:c});r.json(D)}catch(t){l()({component:"/api/user/login-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Login Failed"})}}let m=(0,o.M)(s,"default"),g=(0,o.M)(s,"config"),f=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/user/[user_id]/login-user",pathname:"/api/user/[user_id]/login-user",bundlePath:"",filename:""},userland:s})},81681:(e,r,t)=>{let s=t(57638),a=t(14533);e.exports=async function({encryptionKey:e,email:r,username:t,password:n,database:o,additionalFields:i,email_login:l,email_login_code:c,email_login_field:u,token:d,skipPassword:p,social:_,useLocal:m}){if(r?.match(/ /)||t&&t?.match(/ /)||n&&n?.match(/ /))return{success:!1,msg:"Invalid Email/Password format"};let g=n?a({encryptionKey:e,password:n}):null,f=await s({queryString:"SELECT * FROM users WHERE email = ? OR username = ?",queryValuesArray:[r,t],database:o.replace(/[^a-z0-9_]/g,""),useLocal:m});if((!f||!f[0])&&!_)return{success:!1,payload:null,msg:"No user found"};let S=!1;if(f?.[0]&&!l&&p)S=!0;else if(f?.[0]&&!l)S=g===f[0].password;else if(f&&f[0]&&l&&c&&u){let e=f[0][u];if(!e)throw Error("No code Found!");let[r,t]=e.split("-");if(Date.now()-Number(t)>9e5)throw Error("Code Expired");S=r===c}if(!S)return{success:!1,msg:"Wrong password, no social login validity",payload:null};S&&l&&await s({queryString:`UPDATE users SET ${u} = '' WHERE email = ? OR username = ?`,queryValuesArray:[r,t],database:o.replace(/[^a-z0-9_]/g,""),useLocal:m});let y=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),D={id:f[0].id,first_name:f[0].first_name,last_name:f[0].last_name,username:f[0].username,email:f[0].email,phone:f[0].phone,social_id:f[0].social_id,image:f[0].image,image_thumbnail:f[0].image_thumbnail,verification_status:f[0].verification_status,social_login:f[0].social_login,social_platform:f[0].social_platform,csrf_k:y,more_data:f[0].more_user_data,logged_in_status:!0,date:Date.now()},E={success:!0,msg:"Login Successful",payload:D,userId:f[0].id,csrf:y};return i&&Array.isArray(i)&&i.length>0&&i.forEach(e=>{D[e]=f[0][e]}),E}},77619:(e,r,t)=>{let s=t(29021),a=t(72835);e.exports=({key:e,database:r,table:t,user_id:n,media:o})=>{if(!e||!n)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=a({encryptedString:e}),c=JSON.parse(l||""),u=s.existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(n)||!u)return null;if(!c.target_database||o)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},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)=>{let s=t(72835),a=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let n=0;n",r.message),e}}},48225:(e,r,t)=>{let s=t(29021),{IncomingMessage:a}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:a,req:n}){let o=new Date,i=(()=>{if(!n)return null;try{let e=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)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2726,e.ids=[2726],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},93052:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>g,routeModule:()=>p});var a={};t.r(a),t.d(a,{default:()=>f});var n=t(89947),s=t(2706),i=t(96762),o=t(67619),l=t(56081),u=t(30944),c=t(83919);async function d({encryptionKey:e,email:r,username:t,password:a,database:n,additionalFields:s,email_login:i,email_login_code:o,email_login_field:l,token:d,skipPassword:f,social:g,useLocal:m}){let p=n.replace(/[^a-z0-9_]/g,"");if(r?.match(/ /)||t&&t?.match(/ /)||a&&a?.match(/ /))return{success:!1,msg:"Invalid Email/Password format"};let _=a?(0,c.A)({encryptionKey:e,password:a}):null,y=await (0,u.A)({queryString:`SELECT * FROM ${p}.users WHERE email = ? OR username = ?`,queryValuesArray:[r,t],database:p,useLocal:m});if((!y||!y[0])&&!g)return{success:!1,payload:null,msg:"No user found"};let S=!1;if(y?.[0]&&!i&&f)S=!0;else if(y?.[0]&&!i)S=_===y[0].password;else if(y&&y[0]&&i&&o&&l){let e=y[0][l];if(!e)throw Error("No code Found!");let[r,t]=e.split("-");if(Date.now()-Number(t)>9e5)throw Error("Code Expired");S=r===o}if(!S)return{success:!1,msg:"Wrong password, no social login validity",payload:null};S&&i&&await (0,u.A)({queryString:`UPDATE ${p}.users SET ${l} = '' WHERE email = ? OR username = ?`,queryValuesArray:[r,t],database:p,useLocal:m});let E=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),h={id:y[0].id,first_name:y[0].first_name,last_name:y[0].last_name,username:y[0].username,email:y[0].email,phone:y[0].phone,social_id:y[0].social_id,image:y[0].image,image_thumbnail:y[0].image_thumbnail,verification_status:y[0].verification_status,social_login:y[0].social_login,social_platform:y[0].social_platform,csrf_k:E,more_data:y[0].more_user_data,logged_in_status:!0,date:Date.now()},A={success:!0,msg:"Login Successful",payload:h,userId:y[0].id,csrf:E};return s&&Array.isArray(s)&&s.length>0&&s.forEach(e=>{h[e]=y[0][e]}),A}async function f(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let{encryptionKey:t,payload:a,database:n,additionalFields:s,email_login:i,email_login_code:o,email_login_field:u,token:c,skipPassword:f}=e.body,g=e.headers.authorization,m=(0,l.A)({key:g,database:n,user_id:String(e.query.user_id)});if(!m?.user_id)throw Error("Api Credentials invalid!");if(!m.full_access||!m.sign)return r.json({success:!1,msg:"Unauthorized"});let p=a.email,_=a.username,y=a.password,S=`datasquirel_user_${m.user_id}_${n}`,E=await d({database:S,email:p,username:_,password:y,skipPassword:f,encryptionKey:t,additionalFields:s,email_login:i,email_login_code:o,email_login_field:u,token:c});r.json(E)}catch(t){(0,o.default)({component:"/api/user/login-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Login Failed"})}}let g=(0,i.M)(a,"default"),m=(0,i.M)(a,"config"),p=new n.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/user/[user_id]/login-user",pathname:"/api/user/[user_id]/login-user",bundlePath:"",filename:""},userland:a})},56081:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(29021),n=t.n(a),s=t(95969);let i=({key:e,database:r,table:t,user_id:a,media:i})=>{if(!e||!a)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,s.A)({encryptedString:e}),u=JSON.parse(l||""),c=n().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(a)||!c)return null;if(!u.target_database||i)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},43775:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);let n=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var a=t(29021),n=t.n(a);async function s({user:e,message:r,component:t,noMail:a,req:s}){let i=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||a||r||s.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(a+=` -URL: ${n.url}`),n?.body&&(a+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),i&&(a+=` -IP: ${i}`),a+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),s?.url&&(a+=` +URL: ${s.url}`),s?.body&&(a+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(a+=` +IP: ${o}`),a+=` +Date: ${i.toDateString()} +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",a),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),a=t(48225),n=t(51348),o=t(21339),i=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:l,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),p=c?i:d?n:o;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",database:t,queryString:e})}catch(e){a({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&l)try{let e=u;return await s({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),a({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:a}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=a("aes-192-cbc",s(o,i,l),n.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},14533:(e,r,t)=>{let{createHmac:s}=t(55511);e.exports=function({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=s("sha512",t);return a.update(e),a.digest("base64")}},51348:(e,r,t)=>{let s=t(9973),a=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function o(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let a=t(9973),n=t(21580),o=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),l(JSON.parse(JSON.stringify(e)))}function p(e){o.end(),l({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:n()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(d).catch(p):o.query(t).then(d).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),a=t(21580);async function n(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=81725);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(43775),n=t(67619),s=t(48786),i=t(37275),o=t(7971);async function l({queryString:e,queryValuesArray:r,database:t,tableSchema:l,useLocal:u}){let c;let d=!!u||!!t?.match(/^datasquirel$/),f=u?o.A:d?s.A:i.default;try{c=e&&r&&Array.isArray(r)&&r[0]?d?await f(e,r):await f({paradigm:"Full Access",queryString:e,queryValues:r}):d?await f(e):await f({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,n.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&l)try{let e=c;return await (0,a.A)({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,n.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(55511),n=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,a.scryptSync)(s,i,o),u=n.Buffer.alloc(16,0),c=(0,a.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},83919:(e,r,t)=>{t.d(r,{A:()=>n});var a=t(55511);function n({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let n=(0,a.createHmac)("sha512",t);return n.update(e),n.digest("base64")}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function a(e,r,t){try{if("string"==typeof r){let a=await e.query(n(r),t);return JSON.parse(JSON.stringify(a))}if("object"!=typeof r)return null;{let t=[];for(let a=0;as})},7971:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(9973),n=t.n(a),s=t(29021),i=t.n(s);async function o(...e){let r=n()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!i().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:i().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=93052);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js.nft.json index 1da0f9a..6402c47 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/login-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js index 210b000..f126db6 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=4458,e.ids=[4458],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},62553:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>g,routeModule:()=>S});var s={};t.r(s),t.d(s,{default:()=>p});var n=t(89947),a=t(2706),o=t(96762),i=t(48225),l=t.n(i),c=t(77619),u=t.n(c),d=t(29477),_=t.n(d);async function p(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let{existingUser:t,database:s,additionalFields:n}=e.body,a=e.headers.authorization,o=u()({key:a,database:s,user_id:String(e.query.user_id)});if(!o?.user_id)throw Error("Api Credentials invalid!");if(!o.full_access||!o.sign)return r.json({success:!1,msg:"Unauthorized"});let i=`datasquirel_user_${o.user_id}_${s}`.replace(/[^a-z0-9_]/g,""),l=await _()({database:i,existingUser:t,additionalFields:n});r.json(l)}catch(t){l()({component:"/api/user/reauth-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Login Failed"})}}let g=(0,o.M)(s,"default"),m=(0,o.M)(s,"config"),S=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/user/[user_id]/reauth-user",pathname:"/api/user/[user_id]/reauth-user",bundlePath:"",filename:""},userland:s})},29477:(e,r,t)=>{t(44900);let s=t(57638);t(21572),e.exports=async function({existingUser:e,database:r,additionalFields:t,useLocal:n}){let a=e?.id&&e.id.toString().match(/./)?await s({queryString:"SELECT * FROM users WHERE id=?",queryValuesArray:[e.id.toString()],database:r,useLocal:n}):null;if(!a||!a[0])return{success:!1,payload:null,msg:"No user found"};let o=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),i={id:a[0].id,first_name:a[0].first_name,last_name:a[0].last_name,username:a[0].username,email:a[0].email,phone:a[0].phone,social_id:a[0].social_id,image:a[0].image,image_thumbnail:a[0].image_thumbnail,verification_status:a[0].verification_status,social_login:a[0].social_login,social_platform:a[0].social_platform,csrf_k:o,more_data:a[0].more_user_data,logged_in_status:!0,date:Date.now()};return t&&Array.isArray(t)&&t.length>0&&t.forEach(e=>{i[e]=a[0][e]}),{success:!0,msg:"Login Successful",payload:i,csrf:o}}},77619:(e,r,t)=>{let s=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:o})=>{if(!e||!a)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=n({encryptedString:e}),c=JSON.parse(l||""),u=s.existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(a)||!u)return null;if(!c.target_database||o)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=4458,e.ids=[4458],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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},42276:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>g,routeModule:()=>_});var a={};t.r(a),t.d(a,{default:()=>d});var n=t(89947),s=t(2706),i=t(96762),o=t(67619),l=t(56081),u=t(30944);async function c({existingUser:e,database:r,additionalFields:t,useLocal:a}){let n=e?.id&&e.id.toString().match(/./)?await (0,u.A)({queryString:`SELECT * FROM ${r}.users WHERE id=?`,queryValuesArray:[e.id.toString()],database:r,useLocal:a}):null;if(!n||!n[0])return{success:!1,payload:null,msg:"No user found"};let s=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),i={id:n[0].id,first_name:n[0].first_name,last_name:n[0].last_name,username:n[0].username,email:n[0].email,phone:n[0].phone,social_id:n[0].social_id,image:n[0].image,image_thumbnail:n[0].image_thumbnail,verification_status:n[0].verification_status,social_login:n[0].social_login,social_platform:n[0].social_platform,csrf_k:s,more_data:n[0].more_user_data,logged_in_status:!0,date:Date.now()};return t&&Array.isArray(t)&&t.length>0&&t.forEach(e=>{i[e]=n[0][e]}),{success:!0,msg:"Login Successful",payload:i,csrf:s}}async function d(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let{existingUser:t,database:a,additionalFields:n}=e.body,s=e.headers.authorization,i=(0,l.A)({key:s,database:a,user_id:String(e.query.user_id)});if(!i?.user_id)throw Error("Api Credentials invalid!");if(!i.full_access||!i.sign)return r.json({success:!1,msg:"Unauthorized"});let o=`datasquirel_user_${i.user_id}_${a}`.replace(/[^a-z0-9_]/g,""),u=await c({database:o,existingUser:t,additionalFields:n});r.json(u)}catch(t){(0,o.default)({component:"/api/user/reauth-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Login Failed"})}}let g=(0,i.M)(a,"default"),f=(0,i.M)(a,"config"),_=new n.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/user/[user_id]/reauth-user",pathname:"/api/user/[user_id]/reauth-user",bundlePath:"",filename:""},userland:a})},56081:(e,r,t)=>{t.d(r,{A:()=>i});var a=t(29021),n=t.n(a),s=t(95969);let i=({key:e,database:r,table:t,user_id:a,media:i})=>{if(!e||!a)return null;try{let o=process.env.DSQL_API_KEYS_PATH;if(!o)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,s.A)({encryptedString:e}),u=JSON.parse(l||""),c=n().existsSync(`${o}/${u.sign}`);if(String(u.user_id)!==String(a)||!c)return null;if(!u.target_database||i)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},43775:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(95969);let n=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var a=t(29021),n=t.n(a);async function s({user:e,message:r,component:t,noMail:a,req:s}){let i=new Date,o=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||a||r||s.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== Error Message: ${r} -Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),s?.url&&(a+=` +URL: ${s.url}`),s?.body&&(a+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),o&&(a+=` +IP: ${o}`),a+=` +Date: ${i.toDateString()} +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let l=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",a),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),i=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:l,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),_=c?i:d?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await _(e,r):await _({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await _(e):await _({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&l)try{let e=u;return await s({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),l(JSON.parse(JSON.stringify(e)))}function _(e){o.end(),l({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(d).catch(_):o.query(t).then(d).catch(_)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=62553);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(43775),n=t(67619),s=t(48786),i=t(37275),o=t(7971);async function l({queryString:e,queryValuesArray:r,database:t,tableSchema:l,useLocal:u}){let c;let d=!!u||!!t?.match(/^datasquirel$/),g=u?o.A:d?s.A:i.default;try{c=e&&r&&Array.isArray(r)&&r[0]?d?await g(e,r):await g({paradigm:"Full Access",queryString:e,queryValues:r}):d?await g(e):await g({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,n.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&l)try{let e=c;return await (0,a.A)({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,n.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(55511),n=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,a.scryptSync)(s,i,o),u=n.Buffer.alloc(16,0),c=(0,a.createDecipheriv)("aes-192-cbc",l,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>a});async function a(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function a(e,r,t){try{if("string"==typeof r){let a=await e.query(n(r),t);return JSON.parse(JSON.stringify(a))}if("object"!=typeof r)return null;{let t=[];for(let a=0;as})},7971:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(9973),n=t.n(a),s=t(29021),i=t.n(s);async function o(...e){let r=n()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!i().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:i().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=42276);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js.nft.json index 18af634..6402c47 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/reauth-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../../node_modules/nodemailer/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js index 8dc12ff..1dd094c 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var e={};e.id=2860,e.ids=[2860],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},93919:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>S,routeModule:()=>g});var s={};t.r(s),t.d(s,{default:()=>_});var n=t(89947),a=t(2706),o=t(96762),i=t(48225),c=t.n(i),l=t(77619),u=t.n(l),p=t(40927),d=t.n(p);async function _(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});try{let{email:t,database:s,email_login_field:n,mail_domain:a,mail_password:o,mail_username:i,mail_port:c,sender:l,html:p}=e.body,_=e.headers.authorization,S=u()({key:_,database:s,user_id:String(e.query.user_id)});if(!S?.user_id)throw Error("Api Credentials invalid!");if(!S.full_access||!S.sign)return r.json({success:!1,msg:"Unauthorized"});let m=`datasquirel_user_${S.user_id}_${s}`.replace(/[^a-z0-9_]/g,""),g=await d()({database:m,email:t,email_login_field:n,html:p,mail_domain:a,mail_password:o,mail_port:c,mail_username:i,sender:l,response:r});r.json(g)}catch(t){c()({component:"/api/user/login-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Failed: "+t.message})}}let S=(0,o.M)(s,"default"),m=(0,o.M)(s,"config"),g=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/user/[user_id]/send-email-code",pathname:"/api/user/[user_id]/send-email-code",bundlePath:"",filename:""},userland:s})},40927:(e,r,t)=>{let s=t(57638),n=t(21572);t(81630);let a=t(31341),o=t(20503),i=t(43181);e.exports=async function({email:e,database:r,email_login_field:t,mail_domain:c,mail_port:l,sender:u,mail_username:p,mail_password:d,html:_,useLocal:S,response:m,extraCookies:g}){if(e?.match(/ /))return{success:!1,msg:"Invalid Email/Password format"};let f=Date.now(),E=[e],D=await s({queryString:"SELECT * FROM users WHERE email = ?",queryValuesArray:E,database:r,useLocal:S});if(!D||!D[0])return{success:!1,msg:"No user found"};if(!D?.[0]||!t)return{success:!1,msg:"Invalid Email/Password format"};{let E=function(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",r="";for(let t=0;t<8;t++)r+=e[Math.floor(Math.random()*e.length)];return r}(),D=n.createTransport({host:c||process.env.DSQL_MAIL_HOST,port:l||process.env.DSQL_MAIL_PORT||465,secure:!0,auth:{user:p||process.env.DSQL_MAIL_EMAIL,pass:d||process.env.DSQL_MAIL_PASSWORD}}),y={};y.from=`"Datasquirel SSO" <${u||"support@datasquirel.com"}>`,y.sender=u||"support@datasquirel.com",y.to=e,y.subject="One Time Login Code",y.html=_.replace(/{{code}}/,E);let h=await D.sendMail(y);if(!h?.accepted)throw Error("Mail not Sent!");let A=`UPDATE users SET ${t} = ? WHERE email = ?`,v=[E+`-${f}`,e];await s({queryString:A,queryValuesArray:v,database:r,useLocal:S});let O={success:!0,code:E,email:e,createdAt:f,msg:"Success"};if(m){let e=a().oneTimeCodeName,r=o({data:JSON.stringify(O)});if(!r)throw Error("apiSendEmailCode Error: Failed to encrypt payload");let t={name:e,value:r,sameSite:"Strict",path:"/",httpOnly:!0,secure:!0},s=i({cookies:g?[...g,t]:[t]});m.setHeader("Set-Cookie",s)}return O}}},77619:(e,r,t)=>{let s=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:o})=>{if(!e||!a)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let c=n({encryptedString:e}),l=JSON.parse(c||""),u=s.existsSync(`${i}/${l.sign}`);if(String(l.user_id)!==String(a)||!u)return null;if(!l.target_database||o)return l;if(!r&&l.target_database)return null;let p=l.target_database?.split(",").includes(String(r));if(p&&!l.target_table)return l;if(p&&!t&&l.target_table)return null;if(l.target_table?.split(",").includes(String(t)))return l;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},31341:e=>{e.exports=function(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let c=r;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:c+=n}}},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)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=2860,e.ids=[2860],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},78794:(e,r,t)=>{t.r(r),t.d(r,{config:()=>g,default:()=>S,routeModule:()=>y});var n={};t.r(n),t.d(n,{default:()=>m});var s=t(89947),a=t(2706),o=t(96762),i=t(67619),l=t(56081),c=t(30944),u=t(21572),d=t.n(u),p=t(89159),_=t(68829);async function f({email:e,database:r,email_login_field:t,mail_domain:n,mail_port:s,sender:a,mail_username:o,mail_password:i,html:l,useLocal:u,response:f,extraCookies:m}){if(e?.match(/ /))return{success:!1,msg:"Invalid Email/Password format"};let S=Date.now(),g=`SELECT * FROM ${r}.users WHERE email = ?`,y=[e],E=await (0,c.A)({queryString:g,queryValuesArray:y,database:r,useLocal:u});if(!E||!E[0])return{success:!1,msg:"No user found"};if(!E?.[0]||!t)return{success:!1,msg:"Invalid Email/Password format"};{let g=function(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",r="";for(let t=0;t<8;t++)r+=e[Math.floor(Math.random()*e.length)];return r}(),y=d().createTransport({host:n||process.env.DSQL_MAIL_HOST,port:s||(process.env.DSQL_MAIL_PORT?Number(process.env.DSQL_MAIL_PORT):465),secure:!0,auth:{user:o||process.env.DSQL_MAIL_EMAIL,pass:i||process.env.DSQL_MAIL_PASSWORD}}),E={};E.from=`"Datasquirel SSO" <${a||"support@datasquirel.com"}>`,E.sender=a||"support@datasquirel.com",E.to=e,E.subject="One Time Login Code",E.html=l.replace(/{{code}}/,g);let A=await y.sendMail(E);if(!A?.accepted)throw Error("Mail not Sent!");let D=`UPDATE ${r}.users SET ${t} = ? WHERE email = ?`,h=[g+`-${S}`,e];await (0,c.A)({queryString:D,queryValuesArray:h,database:r,useLocal:u});let v={success:!0,code:g,email:e,createdAt:S,msg:"Success"};if(f){let e=(0,p.A)().oneTimeCodeName,r=(0,_.default)({data:JSON.stringify(v)});if(!r)throw Error("apiSendEmailCode Error: Failed to encrypt payload");let t={name:e,value:r,sameSite:"Strict",path:"/",httpOnly:!0,secure:!0},n=function({cookies:e}){let r=[];for(let t=0;t{t.d(r,{A:()=>o});var n=t(29021),s=t.n(n),a=t(95969);let o=({key:e,database:r,table:t,user_id:n,media:o})=>{if(!e||!n)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=(0,a.A)({encryptedString:e}),c=JSON.parse(l||""),u=s().existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(n)||!u)return null;if(!c.target_database||o)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},89159:(e,r,t)=>{t.d(r,{A:()=>n});function n(e){let r=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;let i=r;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=n;let l=r;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(95969);let s=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function a({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},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=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} @@ -8,9 +8,9 @@ URL: ${a.url}`),a?.body&&(n+=` Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` IP: ${i}`),n+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let c=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,s().existsSync("./.tmp/error.log")||s().writeFileSync("./.tmp/error.log","","utf-8");let l=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",n),s().appendFileSync("./.tmp/error.log",` -${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),i=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:c,useLocal:l}){let u;let p=!!l||!!t?.match(/^datasquirel$/),d=l?i:p?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?p?await d(e,r):await d({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):p?await d(e):await d({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&c)try{let e=u;return await s({unparsedResults:e,tableSchema:c})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",s(o,i,c),a.alloc(16,0));try{let r=l.update(e,"hex","utf8");return r+=l.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=n("aes-192-cbc",s(o,i,c),a.alloc(16,0));try{let r=l.update(e,"utf8","hex");return r+=l.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((c,l)=>{let u=!!e?.match(/full.access|^fa$/i);try{function p(e){o.end(),c(JSON.parse(JSON.stringify(e)))}function d(e){o.end(),c({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(p).catch(d):o.query(t).then(p).catch(d)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),c({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},43181:e=>{e.exports=function({cookies:e}){let r=[];for(let t=0;t{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=93919);module.exports=t})(); \ No newline at end of file +${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(43775),s=t(67619),a=t(48786),o=t(37275),i=t(7971);async function l({queryString:e,queryValuesArray:r,database:t,tableSchema:l,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),p=c?i.A:d?a.A:o.default;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,s.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&l)try{let e=u;return await (0,n.A)({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,s.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511),s=t(79428);function a({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,n.scryptSync)(a,o,i),c=s.Buffer.alloc(16,0),u=(0,n.createDecipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"hex","utf8");return r+=u.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var n=t(55511),s=t(79428);function a({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let a=r||process.env.DSQL_ENCRYPTION_PASSWORD,o=t||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let l=(0,n.scryptSync)(a,o,i),c=s.Buffer.alloc(16,0),u=(0,n.createCipheriv)("aes-192-cbc",l,c);try{let r=u.update(e,"utf8","hex");return r+=u.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(s(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;na})},7971:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(9973),s=t.n(n),a=t(29021),o=t.n(a);async function i(...e){let r=s()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!o().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=78794);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js.nft.json index 18af634..e632473 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/send-email-code.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../../node_modules/nodemailer/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../../node_modules/nodemailer/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js b/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js index bde3875..61686ec 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=8288,e.ids=[8288],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},34453:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>f,routeModule:()=>y});var s={};t.r(s),t.d(s,{default:()=>S});var n=t(89947),a=t(2706),o=t(96762),i=t(48225),l=t.n(i),c=t(77619),u=t.n(c),d=t(42363),p=t.n(d),_=t(2258),g=t.n(_);async function S(e,r){if("POST"!==e.method)return r.json({success:!1,payload:null,msg:"Failed!"});try{let t=e.headers.authorization,{payload:s,database:n,updatedUserId:a}=e.body,o=u()({key:t,database:n,user_id:String(e.query.user_id)});if(!o?.user_id)throw Error("Api Credentials invalid!");if(!o.full_access||!o.sign)return r.json({success:!1,msg:"Unauthorized"});let i=`datasquirel_user_${o.user_id}_${n}`,l=g()({userId:o.user_id}),c=l?.find(e=>e.dbFullName===i),d=await p()({dbFullName:i,payload:s,updatedUserId:a,dbSchema:c});r.json(d)}catch(t){l()({component:"/api/user/update-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let f=(0,o.M)(s,"default"),m=(0,o.M)(s,"config"),y=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/user/[user_id]/update-user",pathname:"/api/user/[user_id]/update-user",bundlePath:"",filename:""},userland:s})},42363:(e,r,t)=>{let s=t(33364),n=t(20503),a=t(14533),o=t(57638);e.exports=async function({payload:e,dbFullName:r,updatedUserId:t,useLocal:i,dbSchema:l}){let c=await o({queryString:"SELECT * FROM users WHERE id = ?",queryValuesArray:[t],database:r,useLocal:i});if(!c?.[0])return{success:!1,msg:"User not found"};let u=(()=>{let r=Object.keys(e),t=(()=>{try{return l?.tables?.find(e=>"users"==e.tableName)}catch(e){return}})(),s={};return r.forEach(r=>{let a=t?.fields?.find(e=>e.fieldName==r);if(r?.match(/^date_|^id$|^uuid$/))return;let o=e[r];a?.encrypted&&(o=n({data:o})),s[r]=o}),s.password&&"string"==typeof s.password&&(s.password=a({password:s.password})),s})();return{success:!0,payload:await s({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:r,tableName:"users",identifierColumnName:"id",identifierValue:t,data:u,useLocal:i})}}},77619:(e,r,t)=>{let s=t(29021),n=t(72835);e.exports=({key:e,database:r,table:t,user_id:a,media:o})=>{if(!e||!a)return null;try{let i=process.env.DSQL_API_KEYS_PATH;if(!i)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let l=n({encryptedString:e}),c=JSON.parse(l||""),u=s.existsSync(`${i}/${c.sign}`);if(String(c.user_id)!==String(a)||!u)return null;if(!c.target_database||o)return c;if(!r&&c.target_database)return null;let d=c.target_database?.split(",").includes(String(r));if(d&&!c.target_table)return c;if(d&&!t&&c.target_table)return null;if(c.target_table?.split(",").includes(String(t)))return c;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},33364:(e,r,t)=>{let s=t(72583),n=t(16570),a=t(51348),o=t(21339),i=t(20503),l=t(44900);async function c({dbContext:e,paradigm:r,dbFullName:t,tableName:c,data:u,tableSchema:d,identifierColumnName:p,identifierValue:_,encryptionKey:g,encryptionSalt:S,useLocal:f}){if(!u||!Object.keys(u).length)return null;let m=!!f||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),y=f?l:m?a:o,h=Object.keys(u),D=[],E=[];for(let e=0;ee.fieldName===r):null,o=a&&a[0]?a[0]:null;if(null==t||void 0==t)continue;let l=/<[^>]+>/g;(o?.richText||String(t).match(l))&&(t=s(t,n)),o?.encrypted&&(t=i({data:t,encryptionKey:g,encryptionSalt:S})),"object"==typeof t&&(t=JSON.stringify(t)),o?.pattern&&!new RegExp(o.pattern,o.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),D.push(`\`${r}\`=?`),"number"==typeof t?E.push(String(t)):E.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}D.push(`date_updated='${Date()}'`),D.push(`date_updated_code='${Date.now()}'`);let b=`UPDATE ${c} SET ${D.join(",")} WHERE \`${p}\`=?`;return E.push(_),m?await y(b,E):await y({paradigm:r,database:t,queryString:b,queryValues:E})}e.exports=c},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},2258:(e,r,t)=>{let s=t(48225),n=t(29021),a=t(33873);e.exports=function({userId:e}){try{let r=a.resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(n.readFileSync(r,"utf-8"))}catch(e){return s({component:"grabUserSchemaData",message:e.message}),null}}},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},6061:(e,r,t)=>{let s=t(72835),n=t(30003);e.exports=async function({unparsedResults:e,tableSchema:r}){let t=[];try{for(let a=0;a",r.message),e}}},48225:(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=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=8288,e.ids=[8288],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},18757:(e,r,t)=>{t.r(r),t.d(r,{config:()=>_,default:()=>y,routeModule:()=>S});var n={};t.r(n),t.d(n,{default:()=>m});var a=t(89947),s=t(2706),i=t(96762),l=t(67619),o=t(56081),u=t(30802),c=t(68829),d=t(83919),p=t(30944);async function f({payload:e,dbFullName:r,updatedUserId:t,useLocal:n,dbSchema:a}){let s=`SELECT * FROM ${r}.users WHERE id = ?`,i=await (0,p.A)({queryString:s,queryValuesArray:[t],database:r,useLocal:n});if(!i?.[0])return{success:!1,msg:"User not found"};let l=(()=>{let r=Object.keys(e),t=(()=>{try{return a?.tables?.find(e=>"users"==e.tableName)}catch(e){return}})(),n={};return r.forEach(r=>{let a=t?.fields?.find(e=>e.fieldName==r);if(r?.match(/^date_|^id$|^uuid$/))return;let s=e[r];a?.encrypted&&(s=(0,c.default)({data:s})),n[r]=s}),n.password&&"string"==typeof n.password&&(n.password=(0,d.A)({password:n.password})),n})();return{success:!0,payload:await (0,u.A)({dbContext:"Dsql User",paradigm:"Full Access",dbFullName:r,tableName:"users",identifierColumnName:"id",identifierValue:t,data:l,useLocal:n})}}var g=t(4820);async function m(e,r){if("POST"!==e.method)return r.json({success:!1,payload:null,msg:"Failed!"});try{let t=e.headers.authorization,{payload:n,database:a,updatedUserId:s}=e.body,i=(0,o.A)({key:t,database:a,user_id:String(e.query.user_id)});if(!i?.user_id)throw Error("Api Credentials invalid!");if(!i.full_access||!i.sign)return r.json({success:!1,msg:"Unauthorized"});let l=`datasquirel_user_${i.user_id}_${a}`,u=(0,g.A)({userId:i.user_id}),c=u?.find(e=>e.dbFullName===l),d=await f({dbFullName:l,payload:n,updatedUserId:s,dbSchema:c});r.json(d)}catch(t){(0,l.default)({component:"/api/user/update-user/main-catch-error",message:t.message,user:{},req:e}),r.json({success:!1,msg:"Wrong Credentials"})}}let y=(0,i.M)(n,"default"),_=(0,i.M)(n,"config"),S=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/user/[user_id]/update-user",pathname:"/api/user/[user_id]/update-user",bundlePath:"",filename:""},userland:n})},56081:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(29021),a=t.n(n),s=t(95969);let i=({key:e,database:r,table:t,user_id:n,media:i})=>{if(!e||!n)return null;try{let l=process.env.DSQL_API_KEYS_PATH;if(!l)throw Error("process.env.DSQL_API_KEYS_PATH variable not found");let o=(0,s.A)({encryptedString:e}),u=JSON.parse(o||""),c=a().existsSync(`${l}/${u.sign}`);if(String(u.user_id)!==String(n)||!c)return null;if(!u.target_database||i)return u;if(!r&&u.target_database)return null;let d=u.target_database?.split(",").includes(String(r));if(d&&!u.target_table)return u;if(d&&!t&&u.target_table)return null;if(u.target_table?.split(",").includes(String(t)))return u;return null}catch(e){return console.log(`api-cred ERROR: ${e.message}`),{error:`api-cred ERROR: ${e.message}`}}}},30802:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(72583),a=t.n(n),s=t(92652),i=t(48786),l=t(37275),o=t(68829),u=t(7971);async function c({dbContext:e,paradigm:r,dbFullName:t,tableName:n,data:c,tableSchema:d,identifierColumnName:p,identifierValue:f,encryptionKey:g,encryptionSalt:m,useLocal:y}){if(!c||!Object.keys(c).length)return null;let _=!!y||!e?.match(/dsql.user/i)&&(!t||!!t.match(/^datasquirel$/)),S=y?u.A:_?i.A:l.default,h=Object.keys(c),E=[],A=[];for(let e=0;ee.fieldName===r):null,i=n&&n[0]?n[0]:null;if(null==t||void 0==t)continue;let l=/<[^>]+>/g;(i?.richText||String(t).match(l))&&(t=a()(t,s.A)),i?.encrypted&&(t=(0,o.default)({data:t,encryptionKey:g,encryptionSalt:m})),"object"==typeof t&&(t=JSON.stringify(t)),i?.pattern&&!new RegExp(i.pattern,i.patternFlags||"").test(t)&&(console.log("DSQL: Pattern not matched =>",t),t=""),"string"==typeof t&&t.match(/^null$/i)&&(t={toSqlString:function(){return"NULL"}}),"string"!=typeof t||t.match(/./i)||(t={toSqlString:function(){return"NULL"}}),E.push(`\`${r}\`=?`),"number"==typeof t?A.push(String(t)):A.push(t)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}E.push(`date_updated='${Date()}'`),E.push(`date_updated_code='${Date.now()}'`);let D=`UPDATE \`${t}\`.\`${n}\` SET ${E.join(",")} WHERE \`${p}\`=?`;return A.push(f),_?await S(D,A):await S({paradigm:r,queryString:D,queryValues:A})}},4820:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(67619),a=t(29021),s=t.n(a),i=t(33873),l=t.n(i);function o({userId:e}){try{let r=l().resolve(process.cwd(),`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${e}/main.json`);return JSON.parse(s().readFileSync(r,"utf-8"))}catch(e){return(0,n.default)({component:"grabUserSchemaData",message:e.message}),null}}},92652:(e,r,t)=>{t.d(r,{A:()=>n});let n={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},43775:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(95969);let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;async function s({unparsedResults:e,tableSchema:r}){let t=[];try{for(let s=0;s",r.message),e}}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(29021),a=t.n(n);async function s({user:e,message:r,component:t,noMail:n,req:s}){let i=new Date,l=(()=>{if(!s)return null;try{let e=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||n||r||s.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== Error Message: ${r} Component: ${t}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` -Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +User Email: ${e?.email}`),s?.url&&(n+=` +URL: ${s.url}`),s?.body&&(n+=` +Request Body: ${JSON.stringify(s.body,null,4)}`),l&&(n+=` +IP: ${l}`),n+=` +Date: ${i.toDateString()} +========================================`,a().existsSync("./.tmp/error.log")||a().writeFileSync("./.tmp/error.log","","utf-8");let o=a().readFileSync("./.tmp/error.log","utf-8");a().writeFileSync("./.tmp/error.log",n),a().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},57638:(e,r,t)=>{t(29021);let s=t(6061),n=t(48225),a=t(51348),o=t(21339),i=t(44900);e.exports=async function({queryString:e,queryValuesArray:r,database:t,tableSchema:l,useLocal:c}){let u;let d=!!c||!!t?.match(/^datasquirel$/),p=c?i:d?a:o;try{u=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",database:t,queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",database:t,queryString:e})}catch(e){n({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(u&&l)try{let e=u;return await s({unparsedResults:e,tableSchema:l})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),n({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(u)return u;else return null}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},20503:(e,r,t)=>{let{scryptSync:s,createCipheriv:n}=t(55511),{Buffer:a}=t(79428);e.exports=({data:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let o=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},14533:(e,r,t)=>{let{createHmac:s}=t(55511);e.exports=function({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let n=s("sha512",t);return n.update(e),n.digest("base64")}},51348:(e,r,t)=>{let s=t(9973),n=t(21580),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let r=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},21339:(e,r,t)=>{let s=t(29021);t(33873);let n=t(9973),a=t(21580),o=n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:a()}});e.exports=function({paradigm:e,database:r,queryString:t,queryValues:i}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){o.end(),l(JSON.parse(JSON.stringify(e)))}function p(e){o.end(),l({error:e.message,queryStringGenerated:t,queryValuesGenerated:i,sql:e.sql})}o=u?n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:r,ssl:a()}}):n({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:r,ssl:a()}}),i&&Array.isArray(i)&&i[0]?o.query(t,i).then(d).catch(p):o.query(t).then(d).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},44900:(e,r,t)=>{let s=t(9973),n=t(21580);async function a(...e){let r=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{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",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=34453);module.exports=t})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},30944:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(43775),a=t(67619),s=t(48786),i=t(37275),l=t(7971);async function o({queryString:e,queryValuesArray:r,database:t,tableSchema:o,useLocal:u}){let c;let d=!!u||!!t?.match(/^datasquirel$/),p=u?l.A:d?s.A:i.default;try{c=e&&r&&Array.isArray(r)&&r[0]?d?await p(e,r):await p({paradigm:"Full Access",queryString:e,queryValues:r}):d?await p(e):await p({paradigm:"Full Access",queryString:e})}catch(e){console.log(`varDatabaseDbHandler Error: ${e.message}`),(0,a.default)({component:"varDatabaseDbHandler/lines-29-32",message:e.message})}if(c&&o)try{let e=c;return await (0,n.A)({unparsedResults:e,tableSchema:o})}catch(e){return console.log("\x1b[31mvarDatabaseDbHandler ERROR\x1b[0m =>",t,e),(0,a.default)({component:"varDatabaseDbHandler/lines-52-53",message:e.message}),null}else if(c)return c;else return null}},95969:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(55511),a=t(79428);function s({encryptedString:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,n.scryptSync)(s,i,l),u=a.Buffer.alloc(16,0),c=(0,n.createDecipheriv)("aes-192-cbc",o,u);try{let r=c.update(e,"hex","utf8");return r+=c.final("utf8")}catch(r){return console.log("Error in decrypting =>",r.message),e}}},68829:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var n=t(55511),a=t(79428);function s({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let s=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!s?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let o=(0,n.scryptSync)(s,i,l),u=a.Buffer.alloc(16,0),c=(0,n.createCipheriv)("aes-192-cbc",o,u);try{let r=c.update(e,"utf8","hex");return r+=c.final("hex")}catch(r){return console.log("Error in encrypting =>",r.message),e}}},83919:(e,r,t)=>{t.d(r,{A:()=>a});var n=t(55511);function a({password:e,encryptionKey:r}){let t=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throw Error("Encryption key is invalid");let a=(0,n.createHmac)("sha512",t);return a.update(e),a.digest("base64")}},48786:(e,r,t)=>{t.d(r,{A:()=>n});async function n(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},37275:(e,r,t)=>{async function n(e,r,t){try{if("string"==typeof r){let n=await e.query(a(r),t);return JSON.parse(JSON.stringify(n))}if("object"!=typeof r)return null;{let t=[];for(let n=0;ns})},7971:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(9973),a=t.n(n),s=t(29021),i=t.n(s);async function l(...e){let r=a()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!i().existsSync(r)){console.log(`${r} does not exist`);return}return{ca:i().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let t=await r.query(...e);return await r.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=18757);module.exports=t})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js.nft.json b/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js.nft.json index e7cff71..5767a00 100644 --- a/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/user/[user_id]/update-user.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../jsonData/dbSchemas/users/user-1/main.json","../../../../../../jsonData/dbSchemas/users/user-2/main.json","../../../../../../node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/bignumber.js/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../../node_modules/deepmerge/package.json","../../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../../node_modules/dom-serializer/lib/index.js","../../../../../../node_modules/dom-serializer/package.json","../../../../../../node_modules/domelementtype/lib/index.js","../../../../../../node_modules/domelementtype/package.json","../../../../../../node_modules/domhandler/lib/index.js","../../../../../../node_modules/domhandler/lib/node.js","../../../../../../node_modules/domhandler/package.json","../../../../../../node_modules/domutils/lib/feeds.js","../../../../../../node_modules/domutils/lib/helpers.js","../../../../../../node_modules/domutils/lib/index.js","../../../../../../node_modules/domutils/lib/legacy.js","../../../../../../node_modules/domutils/lib/manipulation.js","../../../../../../node_modules/domutils/lib/querying.js","../../../../../../node_modules/domutils/lib/stringify.js","../../../../../../node_modules/domutils/lib/traversal.js","../../../../../../node_modules/domutils/package.json","../../../../../../node_modules/entities/lib/decode.js","../../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../../node_modules/entities/lib/encode.js","../../../../../../node_modules/entities/lib/escape.js","../../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../../node_modules/entities/lib/index.js","../../../../../../node_modules/entities/package.json","../../../../../../node_modules/escape-string-regexp/index.js","../../../../../../node_modules/escape-string-regexp/package.json","../../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../../node_modules/htmlparser2/lib/index.js","../../../../../../node_modules/htmlparser2/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../../node_modules/is-plain-object/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../../node_modules/nanoid/non-secure/package.json","../../../../../../node_modules/nanoid/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/parse-srcset/package.json","../../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../../node_modules/picocolors/package.json","../../../../../../node_modules/picocolors/picocolors.js","../../../../../../node_modules/postcss/lib/at-rule.js","../../../../../../node_modules/postcss/lib/comment.js","../../../../../../node_modules/postcss/lib/container.js","../../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../../node_modules/postcss/lib/declaration.js","../../../../../../node_modules/postcss/lib/document.js","../../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../../node_modules/postcss/lib/input.js","../../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../../node_modules/postcss/lib/list.js","../../../../../../node_modules/postcss/lib/map-generator.js","../../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../../node_modules/postcss/lib/node.js","../../../../../../node_modules/postcss/lib/parse.js","../../../../../../node_modules/postcss/lib/parser.js","../../../../../../node_modules/postcss/lib/postcss.js","../../../../../../node_modules/postcss/lib/previous-map.js","../../../../../../node_modules/postcss/lib/processor.js","../../../../../../node_modules/postcss/lib/result.js","../../../../../../node_modules/postcss/lib/root.js","../../../../../../node_modules/postcss/lib/rule.js","../../../../../../node_modules/postcss/lib/stringifier.js","../../../../../../node_modules/postcss/lib/stringify.js","../../../../../../node_modules/postcss/lib/symbols.js","../../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../../node_modules/postcss/lib/tokenize.js","../../../../../../node_modules/postcss/lib/warn-once.js","../../../../../../node_modules/postcss/lib/warning.js","../../../../../../node_modules/postcss/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/sanitize-html/index.js","../../../../../../node_modules/sanitize-html/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../../node_modules/source-map-js/lib/base64.js","../../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../../node_modules/source-map-js/lib/util.js","../../../../../../node_modules/source-map-js/package.json","../../../../../../node_modules/source-map-js/source-map.js","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js b/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js index ed85885..854d63d 100644 --- a/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js +++ b/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5122,e.ids=[5122],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,o){return o in t?t[o]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,o)):"function"==typeof t&&"default"===o?t:void 0}}})},22394:(e,t,o)=>{o.r(t),o.d(t,{config:()=>h,default:()=>g,routeModule:()=>P});var r={};o.r(r),o.d(r,{default:()=>f});var n=o(89947),s=o(2706),i=o(96762),u=o(33873),a=o.n(u);o(81630);let l=o(29021),{createHmac:d}=o(55511),c=process.env.DSQL_GITHUB_WEBHOOK_SECRET||"",p=e=>{console.log(e.headers);let t=d("sha256",c).update(JSON.stringify(e.body)).digest("hex");return console.log(t),`sha256=${t}`===e.headers["x-hub-signature-256"]};async function f(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});if(!p(e)){console.log("Authorization failed"),t.status(401).send("Unauthorized");return}let o=e.body;try{console.log("Request Recieved");let e=o.ref;if(!e?.match(/main/)){console.log("Not Main Branch"),t.json({success:!0});return}l.writeFileSync(a().resolve(process.cwd(),"./.dist","REDEPLOY_FLAG"),String(Date.now()),"utf-8"),console.log("Deploy Flag Triggered. Now Redeploying ..."),t.json({success:!0})}catch(e){console.log(e),t.json({msg:"Not Handled Yet"})}}let g=(0,i.M)(r,"default"),h=(0,i.M)(r,"config"),P=new n.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/webhooks/github-push",pathname:"/api/webhooks/github-push",bundlePath:"",filename:""},userland:r})},2706:(e,t)=>{var o;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return o}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(o||(o={}))},89947:(e,t,o)=>{e.exports=o(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var o=t(t.s=22394);module.exports=o})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5122,e.ids=[5122],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,o){return o in t?t[o]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,o)):"function"==typeof t&&"default"===o?t:void 0}}})},61660:(e,t,o)=>{o.r(t),o.d(t,{config:()=>h,default:()=>g,routeModule:()=>P});var r={};o.r(r),o.d(r,{default:()=>f});var n=o(89947),s=o(2706),i=o(96762),u=o(33873),a=o.n(u);o(81630);let l=o(29021),{createHmac:d}=o(55511),c=process.env.DSQL_GITHUB_WEBHOOK_SECRET||"",p=e=>{console.log(e.headers);let t=d("sha256",c).update(JSON.stringify(e.body)).digest("hex");return console.log(t),`sha256=${t}`===e.headers["x-hub-signature-256"]};async function f(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});if(!p(e)){console.log("Authorization failed"),t.status(401).send("Unauthorized");return}let o=e.body;try{console.log("Request Recieved");let e=o.ref;if(!e?.match(/main/)){console.log("Not Main Branch"),t.json({success:!0});return}l.writeFileSync(a().resolve(process.cwd(),"./.dist","REDEPLOY_FLAG"),String(Date.now()),"utf-8"),console.log("Deploy Flag Triggered. Now Redeploying ..."),t.json({success:!0})}catch(e){console.log(e),t.json({msg:"Not Handled Yet"})}}let g=(0,i.M)(r,"default"),h=(0,i.M)(r,"config"),P=new n.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/webhooks/github-push",pathname:"/api/webhooks/github-push",bundlePath:"",filename:""},userland:r})},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return o}});var o=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,o)=>{e.exports=o(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var o=t(t.s=61660);module.exports=o})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js.nft.json b/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js.nft.json index e270f1d..505a95f 100644 --- a/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js.nft.json +++ b/dsql-app/.local_dist/server/pages/api/webhooks/github-push.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-api-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-api-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/blog.html b/dsql-app/.local_dist/server/pages/blog.html index b35b9ce..fb927b2 100644 --- a/dsql-app/.local_dist/server/pages/blog.html +++ b/dsql-app/.local_dist/server/pages/blog.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/blog.js.nft.json b/dsql-app/.local_dist/server/pages/blog.js.nft.json index b0e24b8..4d801bf 100644 --- a/dsql-app/.local_dist/server/pages/blog.js.nft.json +++ b/dsql-app/.local_dist/server/pages/blog.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/contact.html b/dsql-app/.local_dist/server/pages/contact.html index b82adc4..be80699 100644 --- a/dsql-app/.local_dist/server/pages/contact.html +++ b/dsql-app/.local_dist/server/pages/contact.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/contact.js.nft.json b/dsql-app/.local_dist/server/pages/contact.js.nft.json index b0e24b8..4d801bf 100644 --- a/dsql-app/.local_dist/server/pages/contact.js.nft.json +++ b/dsql-app/.local_dist/server/pages/contact.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/create-account.js b/dsql-app/.local_dist/server/pages/create-account.js index 16d6c53..210bf26 100644 --- a/dsql-app/.local_dist/server/pages/create-account.js +++ b/dsql-app/.local_dist/server/pages/create-account.js @@ -1,16 +1 @@ -"use strict";(()=>{var e={};e.id=8810,e.ids=[3220,8810],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},90467:(e,t,r)=>{r.r(t),r.d(t,{config:()=>b,default:()=>y,getServerSideProps:()=>v,getStaticPaths:()=>D,getStaticProps:()=>x,reportWebVitals:()=>N,routeModule:()=>j,unstable_getServerProps:()=>O,unstable_getServerSideProps:()=>R,unstable_getStaticParams:()=>P,unstable_getStaticPaths:()=>A,unstable_getStaticProps:()=>L});var s={};r.r(s),r.d(s,{CreateAccountContext:()=>S,default:()=>h,getServerSideProps:()=>E});var a=r(63865),n=r(9455),i=r(30671),o=r(49407),l=r(89600),c=r(8732),u=r(82015),d=r.n(u),p=r(71457),_=r(87472),m=r(70045);function g(e){let{query:t,invitingUser:r}=d().useContext(S);return(0,c.jsxs)("section",{className:"flex-col items-center lg:items-center gap-20 p-0",children:[(0,c.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"}),(0,c.jsxs)("div",{className:"w-full lg:w-1/2 max-w-6xl gap-4 flex-col items-center px-4 py-10 bg-white dark:bg-slate-900 relative z-10",children:[r?.first_name&&(0,c.jsxs)("span",{className:"text-xs bg-emerald-100 rounded-full px-4 py-1 mb-4",children:["You have been invited by"," ",(0,c.jsxs)("b",{children:[r.first_name," ",r.last_name," (",r.email,")"]})," ","to manage an account. Please create an account to gain access."]}),(0,c.jsx)("h1",{className:"m-0 text-center text-2xl",children:"Create An Account"}),(0,c.jsx)(m.A,{query:t})]})]})}r(20048),r(26123),r(67216),r(63715);var f=r(55966);r(6505);let S=d().createContext({});function h(e){let t="Create Account | Datasquirel",r="Create a FREE account and start storing data.",s=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:t}),(0,c.jsx)("meta",{name:"description",content:r}),(0,c.jsx)(_.A,{pageTitle:t,pageDescription:r,pagePathname:"/"})]}),[a,n]=d().useState(null);return e.query?.invite?(0,c.jsx)(f.A,{}):(0,c.jsx)(p.A,{head:s,children:(0,c.jsx)(S.Provider,{value:{user:a,query:e.query,invitingUser:e.invitingUser},children:(0,c.jsx)("main",{children:(0,c.jsx)(g,{})})})})}async function E({req:e,res:t,query:r}){return{redirect:{destination:"/login",permanent:!1}}}let y=(0,i.M)(s,"default"),x=(0,i.M)(s,"getStaticProps"),D=(0,i.M)(s,"getStaticPaths"),v=(0,i.M)(s,"getServerSideProps"),b=(0,i.M)(s,"config"),N=(0,i.M)(s,"reportWebVitals"),L=(0,i.M)(s,"unstable_getStaticProps"),A=(0,i.M)(s,"unstable_getStaticPaths"),P=(0,i.M)(s,"unstable_getStaticParams"),O=(0,i.M)(s,"unstable_getServerProps"),R=(0,i.M)(s,"unstable_getServerSideProps"),j=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/create-account",pathname:"/create-account",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:s})},55966:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(8732);r(82015);var a=r(32415);function n(){return(0,s.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,s.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,s.jsx)(a.A,{width:"25px",position:"relative"})})]})})}},20048:(e,t,r)=>{r(81630);let s=r(67216),a=r(77463),n=r(29021),i=r(6505);async function o(e,t,r,o){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.[l]?.match(/./))return null;let u=a({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!n.existsSync(`${p}/${d.csrf_k}`))return null;if(0==d.verification_status&&!r){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},26123:(e,t,r)=>{let s=r(22373),a=r(67216),n=r(43290),i=r(88896);e.exports=async function({query:e,user:t,useLocal:r}){try{let s=r?i:a,{invite:o,database_access:l,priviledge:c,email:u}=e,d=[o,u],p=await s("SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",d);if(!p||!p[0])throw Error("No Invitation Found");let _=[o],m=await s("SELECT first_name,last_name,email FROM users WHERE id=?",_);if(m?.[0]){let e=await s("SELECT email FROM user_users WHERE user_id=? AND invited_user_id=? AND user_type='admin' AND email=?",[o,t.id,u]);if(e?.[0])console.log("User already added");else{n({dbFullName:"datasquirel",tableName:"user_users",data:{user_id:o,invited_user_id:t.id,database_access:l,first_name:t.first_name,last_name:t.last_name,phone:t.phone,email:t.email,username:t.username,user_type:"admin",user_priviledge:c,image:t.image,image_thumbnail:t.image_thumbnail},useLocal:r});let e=await s("SELECT db_tables_data FROM invitations WHERE inviting_user_id=? AND invited_user_email=?",[o,u]);if(await s("DELETE FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[o,t.id]),e&&e[0]){let s=e[0].db_tables_data.split("|");for(let e=0;e{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=r;let o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=s;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=a}}},43290:(e,t,r)=>{let s=r(72583),a=r(67942),n=r(19760);r(27825);let i=r(67216),o=r(1231),l=r(53219),c=r(88896);async function u({dbContext:e,paradigm:t,dbFullName:r,tableName:u,data:d,tableSchema:p,duplicateColumnName:_,duplicateColumnValue:m,update:g,encryptionKey:f,encryptionSalt:S,useLocal:h}){let E=!!h||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),y=h?c:E?i:o;if(d?.date_created_timestamp&&delete d.date_created_timestamp,d?.date_updated_timestamp&&delete d.date_updated_timestamp,d?.date_updated&&delete d.date_updated,d?.date_updated_code&&delete d.date_updated_code,d?.date_created&&delete d.date_created,d?.date_created_code&&delete d.date_created_code,_&&"string"==typeof _){let s=E?await y(`SELECT * FROM \`${u}\` WHERE \`${_}\`=?`,[m]):await y({paradigm:"Read Only",database:r,queryString:`SELECT * FROM \`${u}\` WHERE \`${_}\`=?`,queryValues:[m]});if(s?.[0]&&!g)return null;if(s&&s[0]&&g)return await n({dbContext:e,paradigm:t,dbFullName:r,tableName:u,data:d,tableSchema:p,encryptionKey:f,encryptionSalt:S,identifierColumnName:_,identifierValue:m||""})}let x=Object.keys(d),D=[],v=[];for(let e=0;ee.fieldName==t):null,i=n&&n[0]?n[0]:null;if(null==r||void 0==r||i?.dataType?.match(/int$/i)&&"string"==typeof r&&!r?.match(/./))continue;i?.encrypted&&(r=l({data:r,encryptionKey:f,encryptionSalt:S}),console.log("DSQL: Encrypted value =>",r));let o=/<[^>]+>/g;(i?.richText||String(r).match(o))&&(r=s(r,a)),i?.pattern&&!new RegExp(i.pattern,i.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),D.push("`"+t+"`"),"object"==typeof r&&(r=JSON.stringify(r)),"number"==typeof r?v.push(String(r)):v.push(r)}catch(e){console.log("DSQL: Error in parsing data keys =>",e.message);continue}d?.date_created||(D.push("`date_created`"),v.push(Date())),d?.date_created_code||(D.push("`date_created_code`"),v.push(Date.now())),d?.date_updated||(D.push("`date_updated`"),v.push(Date())),d?.date_updated_code||(D.push("`date_updated_code`"),v.push(Date.now()));let b=`INSERT INTO \`${u}\` (${D.join(",")}) VALUES (${v.map(()=>"?").join(",")})`;return E?await y(b,v):await y({paradigm:t,database:r,queryString:b,queryValues:v})}e.exports=u},19760:(e,t,r)=>{let s=r(72583),a=r(67942),n=r(67216),i=r(1231),o=r(53219),l=r(88896);async function c({dbContext:e,paradigm:t,dbFullName:r,tableName:c,data:u,tableSchema:d,identifierColumnName:p,identifierValue:_,encryptionKey:m,encryptionSalt:g,useLocal:f}){if(!u||!Object.keys(u).length)return null;let S=!!f||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),h=f?l:S?n:i,E=Object.keys(u),y=[],x=[];for(let e=0;ee.fieldName===t):null,i=n&&n[0]?n[0]:null;if(null==r||void 0==r)continue;let l=/<[^>]+>/g;(i?.richText||String(r).match(l))&&(r=s(r,a)),i?.encrypted&&(r=o({data:r,encryptionKey:m,encryptionSalt:g})),"object"==typeof r&&(r=JSON.stringify(r)),i?.pattern&&!new RegExp(i.pattern,i.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeof r&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeof r||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),y.push(`\`${t}\`=?`),"number"==typeof r?x.push(String(r)):x.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}y.push(`date_updated='${Date()}'`),y.push(`date_updated_code='${Date.now()}'`);let D=`UPDATE ${c} SET ${y.join(",")} WHERE \`${p}\`=?`;return x.push(_),S?await h(D,x):await h({paradigm:t,database:r,queryString:D,queryValues:x})}e.exports=c},67942:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}}},22373:(e,t,r)=>{let s=r(29021),{IncomingMessage:a}=r(81630);e.exports=async function({user:e,message:t,component:r,noMail:a,req:n}){let i=new Date,o=(()=>{if(!n)return null;try{let e=n.headers["x-forwarded-for"],t=n.headers["x-real-ip"],r=n.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],a=r||s||t||n.socket.remoteAddress;if(!a)return null;return String(a)}catch(e){return null}})();try{let a=`🚀 SERVER ERROR =========================== -Error Message: ${t} -Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(a+=` -User Id: ${e?.id} -User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),n?.url&&(a+=` -URL: ${n.url}`),n?.body&&(a+=` -Request Body: ${JSON.stringify(n.body,null,4)}`),o&&(a+=` -IP: ${o}`),a+=` -Date: ${i.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",a),s.appendFileSync("./.tmp/error.log",` - - - - -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},77463:(e,t,r)=>{let{scryptSync:s,createDecipheriv:a}=r(55511),{Buffer:n}=r(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=a("aes-192-cbc",s(i,o,l),n.alloc(16,0));try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},53219:(e,t,r)=>{let{scryptSync:s,createCipheriv:a}=r(55511),{Buffer:n}=r(79428);e.exports=({data:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encryption string is invalid"),e;let i=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Encryption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Encryption salt is invalid"),e;let c=a("aes-192-cbc",s(i,o,l),n.alloc(16,0));try{let t=c.update(e,"utf8","hex");return t+=c.final("hex")}catch(t){return console.log("Error in encrypting =>",t.message),e}}},67216:(e,t,r)=>{let s=r(9973),a=r(31976),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function i(...e){try{let t=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},1231:(e,t,r)=>{let s=r(29021);r(33873);let a=r(9973),n=r(31976),i=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,charset:"utf8mb4",ssl:n()}});e.exports=function({paradigm:e,database:t,queryString:r,queryValues:o}){try{return new Promise((l,c)=>{let u=!!e?.match(/full.access|^fa$/i);try{function d(e){i.end(),l(JSON.parse(JSON.stringify(e)))}function p(e){i.end(),l({error:e.message,queryStringGenerated:r,queryValuesGenerated:o,sql:e.sql})}i=u?a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,database:t,ssl:n()}}):a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,database:t,ssl:n()}}),o&&Array.isArray(o)&&o[0]?i.query(r,o).then(d).catch(p):i.query(r).then(d).catch(p)}catch(e){s.appendFileSync("./.tmp/dbErrorLogs.txt",e.message+"\n"+Date()+"\n\n\n","utf8"),l({error:e.message})}})}catch(e){return{success:!1,error:e.message}}}},88896:(e,t,r)=>{let s=r(9973),a=r(31976);async function n(...e){let t=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}e.exports=n},31976:(e,t,r)=>{let s=r(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!s.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,r)=>{r.r(t),r.d(t,{default:()=>n});var s=r(8732);r(82015);var a=r(20883);function n(e){return(0,s.jsxs)(a.Html,{lang:"en",children:[(0,s.jsxs)(a.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(a.Main,{}),(0,s.jsx)(a.NextScript,{})]})]})}},9455:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},72583:e=>{e.exports=require("sanitize-html")},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")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,2414,45],()=>r(90467));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=8810,e.ids=[3220,8810],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},94212:(e,t,r)=>{r.r(t),r.d(t,{config:()=>C,default:()=>N,getServerSideProps:()=>L,getStaticPaths:()=>O,getStaticProps:()=>w,reportWebVitals:()=>q,routeModule:()=>k,unstable_getServerProps:()=>R,unstable_getServerSideProps:()=>T,unstable_getStaticParams:()=>Q,unstable_getStaticPaths:()=>M,unstable_getStaticProps:()=>I});var s={};r.r(s),r.d(s,{CreateAccountContext:()=>P,default:()=>A,getServerSideProps:()=>D});var n=r(63865),a=r(9455),o=r(30671),i=r(5583),c=r(19796),l=r(8732),u=r(82015),p=r.n(u),d=r(1013),m=r(91258),g=r(57660);function f(){let{query:e,invitingUser:t}=p().useContext(P);return(0,l.jsxs)("section",{className:"flex-col items-center lg:items-center gap-20 p-0",children:[(0,l.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"}),(0,l.jsxs)("div",{className:"w-full lg:w-1/2 max-w-6xl gap-4 flex-col items-center px-4 py-10 bg-white dark:bg-slate-900 relative z-10",children:[t?.first_name&&(0,l.jsxs)("span",{className:"text-xs bg-emerald-100 rounded-full px-4 py-1 mb-4",children:["You have been invited by"," ",(0,l.jsxs)("b",{children:[t.first_name," ",t.last_name," (",t.email,")"]})," ","to manage an account. Please create an account to gain access."]}),(0,l.jsx)("h1",{className:"m-0 text-center text-2xl",children:"Create An Account"}),(0,l.jsx)(g.A,{query:e})]})]})}r(92702),r(77047);var h=r(71934);let x=require("sanitize-html");var _=r.n(x);let S={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}};var y=r(43651),j=r(55511),v=r(79428),b=r(16175);r(46169);var E=r(32572);r(41939);let P=p().createContext({});function A(e){let t="Create Account | Datasquirel",r="Create a FREE account and start storing data.",s=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:t}),(0,l.jsx)("meta",{name:"description",content:r}),(0,l.jsx)(m.A,{pageTitle:t,pageDescription:r,pagePathname:"/"})]}),[n,a]=p().useState(null);return e.query?.invite?(0,l.jsx)(E.A,{}):(0,l.jsx)(d.A,{head:s,children:(0,l.jsx)(P.Provider,{value:{user:n,query:e.query,invitingUser:e.invitingUser},children:(0,l.jsx)("main",{children:(0,l.jsx)(f,{})})})})}async function D({req:e,res:t,query:r}){return{redirect:{destination:"/login",permanent:!1}}}let N=(0,o.M)(s,"default"),w=(0,o.M)(s,"getStaticProps"),O=(0,o.M)(s,"getStaticPaths"),L=(0,o.M)(s,"getServerSideProps"),C=(0,o.M)(s,"config"),q=(0,o.M)(s,"reportWebVitals"),I=(0,o.M)(s,"unstable_getStaticProps"),M=(0,o.M)(s,"unstable_getStaticPaths"),Q=(0,o.M)(s,"unstable_getStaticParams"),R=(0,o.M)(s,"unstable_getServerProps"),T=(0,o.M)(s,"unstable_getServerSideProps"),k=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/create-account",pathname:"/create-account",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:s})},10621:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(8732);function n({message:e}){return(0,s.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:e})]})}r(82015)},32572:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(8732);r(82015);var n=r(16757);function a(){return(0,s.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,s.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,s.jsx)(n.A,{width:"25px",position:"relative"})})]})})}},91258:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(8732),n=r(82015),a=r.n(n);function o({pageTitle:e,pageDescription:t,pagePathname:r,aceEditor:n}){return(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:title",content:e}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{itemProp:"name",content:e}),(0,s.jsx)("meta",{itemProp:"description",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:e}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),n&&(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},92702:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var s=r(71934),n=r(71205),a=r(29021),o=r.n(a),i=r(41939);async function c(e,t,r){let{keyCookieName:a,csrfCookieName:c}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let l=(0,n.A)({encryptedString:e.cookies[a]});if(!l)return null;let u=JSON.parse(l);if(!u.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!o().existsSync(`${p}/${u.csrf_k}`))return null;if(0==u.verification_status&&!r){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},41939:(e,t,r)=>{r.d(t,{A:()=>s});function s(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let c=t;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:c+=n}}},71205:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(55511),n=r(79428);function a({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,s.scryptSync)(a,o,i),l=n.Buffer.alloc(16,0),u=(0,s.createDecipheriv)("aes-192-cbc",c,l);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,r)=>{r.d(t,{A:()=>s});async function s(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},43651:(e,t,r)=>{async function s(e,t,r){try{if("string"==typeof t){let s=await e.query(n(t),r);return JSON.parse(JSON.stringify(s))}if("object"!=typeof t)return null;{let r=[];for(let s=0;sa})},16175:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(9973),n=r.n(s),a=r(29021),o=r.n(a);async function i(...e){let t=n()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!o().existsSync(t)){console.log(`${t} does not exist`);return}return{ca:o().readFileSync(`${e}/ca-cert.pem`),rejectUnauthorized:!1}}()},onConnect:()=>{console.log("Connection Successful!")},onConnectError:e=>{console.log("Connection Error",e.message)},onError:e=>{console.log("Client Error",e.message)}});console.log("Querying ...");try{let r=await t.query(...e);return await t.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}}},5583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(8732);r(82015);var n=r(20883);function a(){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,8760],()=>r(94212));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/create-account.js.nft.json b/dsql-app/.local_dist/server/pages/create-account.js.nft.json index 05ecd8f..8bb9b08 100644 --- a/dsql-app/.local_dist/server/pages/create-account.js.nft.json +++ b/dsql-app/.local_dist/server/pages/create-account.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/deepmerge/dist/cjs.js","../../../node_modules/deepmerge/package.json","../../../node_modules/dom-serializer/lib/foreignNames.js","../../../node_modules/dom-serializer/lib/index.js","../../../node_modules/dom-serializer/package.json","../../../node_modules/domelementtype/lib/index.js","../../../node_modules/domelementtype/package.json","../../../node_modules/domhandler/lib/index.js","../../../node_modules/domhandler/lib/node.js","../../../node_modules/domhandler/package.json","../../../node_modules/domutils/lib/feeds.js","../../../node_modules/domutils/lib/helpers.js","../../../node_modules/domutils/lib/index.js","../../../node_modules/domutils/lib/legacy.js","../../../node_modules/domutils/lib/manipulation.js","../../../node_modules/domutils/lib/querying.js","../../../node_modules/domutils/lib/stringify.js","../../../node_modules/domutils/lib/traversal.js","../../../node_modules/domutils/package.json","../../../node_modules/entities/lib/decode.js","../../../node_modules/entities/lib/decode_codepoint.js","../../../node_modules/entities/lib/encode.js","../../../node_modules/entities/lib/escape.js","../../../node_modules/entities/lib/generated/decode-data-html.js","../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../node_modules/entities/lib/generated/encode-html.js","../../../node_modules/entities/lib/index.js","../../../node_modules/entities/package.json","../../../node_modules/escape-string-regexp/index.js","../../../node_modules/escape-string-regexp/package.json","../../../node_modules/htmlparser2/lib/Parser.js","../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../node_modules/htmlparser2/lib/index.js","../../../node_modules/htmlparser2/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../node_modules/is-plain-object/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/nanoid/non-secure/index.cjs","../../../node_modules/nanoid/non-secure/package.json","../../../node_modules/nanoid/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/parse-srcset/package.json","../../../node_modules/parse-srcset/src/parse-srcset.js","../../../node_modules/picocolors/package.json","../../../node_modules/picocolors/picocolors.js","../../../node_modules/postcss/lib/at-rule.js","../../../node_modules/postcss/lib/comment.js","../../../node_modules/postcss/lib/container.js","../../../node_modules/postcss/lib/css-syntax-error.js","../../../node_modules/postcss/lib/declaration.js","../../../node_modules/postcss/lib/document.js","../../../node_modules/postcss/lib/fromJSON.js","../../../node_modules/postcss/lib/input.js","../../../node_modules/postcss/lib/lazy-result.js","../../../node_modules/postcss/lib/list.js","../../../node_modules/postcss/lib/map-generator.js","../../../node_modules/postcss/lib/no-work-result.js","../../../node_modules/postcss/lib/node.js","../../../node_modules/postcss/lib/parse.js","../../../node_modules/postcss/lib/parser.js","../../../node_modules/postcss/lib/postcss.js","../../../node_modules/postcss/lib/previous-map.js","../../../node_modules/postcss/lib/processor.js","../../../node_modules/postcss/lib/result.js","../../../node_modules/postcss/lib/root.js","../../../node_modules/postcss/lib/rule.js","../../../node_modules/postcss/lib/stringifier.js","../../../node_modules/postcss/lib/stringify.js","../../../node_modules/postcss/lib/symbols.js","../../../node_modules/postcss/lib/terminal-highlight.js","../../../node_modules/postcss/lib/tokenize.js","../../../node_modules/postcss/lib/warn-once.js","../../../node_modules/postcss/lib/warning.js","../../../node_modules/postcss/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/sanitize-html/index.js","../../../node_modules/sanitize-html/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/source-map-js/lib/array-set.js","../../../node_modules/source-map-js/lib/base64-vlq.js","../../../node_modules/source-map-js/lib/base64.js","../../../node_modules/source-map-js/lib/binary-search.js","../../../node_modules/source-map-js/lib/mapping-list.js","../../../node_modules/source-map-js/lib/quick-sort.js","../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../node_modules/source-map-js/lib/source-map-generator.js","../../../node_modules/source-map-js/lib/source-node.js","../../../node_modules/source-map-js/lib/util.js","../../../node_modules/source-map-js/package.json","../../../node_modules/source-map-js/source-map.js","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/bignumber.js/bignumber.js","../../../node_modules/bignumber.js/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/deepmerge/dist/cjs.js","../../../node_modules/deepmerge/package.json","../../../node_modules/dom-serializer/lib/foreignNames.js","../../../node_modules/dom-serializer/lib/index.js","../../../node_modules/dom-serializer/package.json","../../../node_modules/domelementtype/lib/index.js","../../../node_modules/domelementtype/package.json","../../../node_modules/domhandler/lib/index.js","../../../node_modules/domhandler/lib/node.js","../../../node_modules/domhandler/package.json","../../../node_modules/domutils/lib/feeds.js","../../../node_modules/domutils/lib/helpers.js","../../../node_modules/domutils/lib/index.js","../../../node_modules/domutils/lib/legacy.js","../../../node_modules/domutils/lib/manipulation.js","../../../node_modules/domutils/lib/querying.js","../../../node_modules/domutils/lib/stringify.js","../../../node_modules/domutils/lib/traversal.js","../../../node_modules/domutils/package.json","../../../node_modules/entities/lib/decode.js","../../../node_modules/entities/lib/decode_codepoint.js","../../../node_modules/entities/lib/encode.js","../../../node_modules/entities/lib/escape.js","../../../node_modules/entities/lib/generated/decode-data-html.js","../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../node_modules/entities/lib/generated/encode-html.js","../../../node_modules/entities/lib/index.js","../../../node_modules/entities/package.json","../../../node_modules/escape-string-regexp/index.js","../../../node_modules/escape-string-regexp/package.json","../../../node_modules/htmlparser2/lib/Parser.js","../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../node_modules/htmlparser2/lib/index.js","../../../node_modules/htmlparser2/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../node_modules/is-plain-object/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/package.json","../../../node_modules/nanoid/non-secure/index.cjs","../../../node_modules/nanoid/non-secure/package.json","../../../node_modules/nanoid/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/parse-srcset/package.json","../../../node_modules/parse-srcset/src/parse-srcset.js","../../../node_modules/picocolors/package.json","../../../node_modules/picocolors/picocolors.js","../../../node_modules/postcss/lib/at-rule.js","../../../node_modules/postcss/lib/comment.js","../../../node_modules/postcss/lib/container.js","../../../node_modules/postcss/lib/css-syntax-error.js","../../../node_modules/postcss/lib/declaration.js","../../../node_modules/postcss/lib/document.js","../../../node_modules/postcss/lib/fromJSON.js","../../../node_modules/postcss/lib/input.js","../../../node_modules/postcss/lib/lazy-result.js","../../../node_modules/postcss/lib/list.js","../../../node_modules/postcss/lib/map-generator.js","../../../node_modules/postcss/lib/no-work-result.js","../../../node_modules/postcss/lib/node.js","../../../node_modules/postcss/lib/parse.js","../../../node_modules/postcss/lib/parser.js","../../../node_modules/postcss/lib/postcss.js","../../../node_modules/postcss/lib/previous-map.js","../../../node_modules/postcss/lib/processor.js","../../../node_modules/postcss/lib/result.js","../../../node_modules/postcss/lib/root.js","../../../node_modules/postcss/lib/rule.js","../../../node_modules/postcss/lib/stringifier.js","../../../node_modules/postcss/lib/stringify.js","../../../node_modules/postcss/lib/symbols.js","../../../node_modules/postcss/lib/terminal-highlight.js","../../../node_modules/postcss/lib/tokenize.js","../../../node_modules/postcss/lib/warn-once.js","../../../node_modules/postcss/lib/warning.js","../../../node_modules/postcss/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/safe-buffer/index.js","../../../node_modules/safe-buffer/package.json","../../../node_modules/sanitize-html/index.js","../../../node_modules/sanitize-html/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/source-map-js/lib/array-set.js","../../../node_modules/source-map-js/lib/base64-vlq.js","../../../node_modules/source-map-js/lib/base64.js","../../../node_modules/source-map-js/lib/binary-search.js","../../../node_modules/source-map-js/lib/mapping-list.js","../../../node_modules/source-map-js/lib/quick-sort.js","../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../node_modules/source-map-js/lib/source-map-generator.js","../../../node_modules/source-map-js/lib/source-node.js","../../../node_modules/source-map-js/lib/util.js","../../../node_modules/source-map-js/package.json","../../../node_modules/source-map-js/source-map.js","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs.js b/dsql-app/.local_dist/server/pages/docs.js index 16e01f8..369b253 100644 --- a/dsql-app/.local_dist/server/pages/docs.js +++ b/dsql-app/.local_dist/server/pages/docs.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7797,e.ids=[3220,7797],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},66360:(e,t,s)=>{s.r(t),s.d(t,{config:()=>w,default:()=>b,getServerSideProps:()=>A,getStaticPaths:()=>y,getStaticProps:()=>v,reportWebVitals:()=>N,routeModule:()=>I,unstable_getServerProps:()=>k,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>M,unstable_getStaticProps:()=>_});var r={};s.r(r),s.d(r,{default:()=>P,getServerSideProps:()=>S});var a=s(63865),n=s(9455),i=s(30671),l=s(49407),o=s(89600),c=s(8732),m=s(82015),u=s.n(m),d=s(71457),p=s(87472);s(6845);var x=s(91479);function g(e){return(0,c.jsxs)("section",{className:"py-14",children:[(0,c.jsx)("div",{className:"w-full gap-10 justify-between flex-col lg:flex-row relative z-10",children:(0,c.jsxs)("div",{className:"flex-col items-center lg:items-start max-w-lg text-center lg:text-left",style:{minWidth:"45%"},children:[(0,c.jsx)("h1",{className:"text-2xl m-0 leading-tight",children:"Documentation"}),(0,c.jsx)("span",{className:"font-normal",children:"Learn the ins and outs of datasquirel."})]})}),(0,c.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}var f=s(58526);function h({title:e,description:t,url:s}){return(0,c.jsxs)("a",{href:s,className:"card",children:[(0,c.jsxs)("div",{className:"flex-col items-start",children:[(0,c.jsx)("span",{className:"text-2xl font-semibold",children:e}),(0,c.jsx)("span",{className:"max-w-md text-slate-600",children:t})]}),(0,c.jsx)(f.A,{size:20})]})}function j(e){return(0,c.jsx)("section",{className:"py-14",children:(0,c.jsxs)("div",{className:"grid grid-cols-1 sl:grid-cols-2 gap-4 w-full items-stretch",children:[(0,c.jsx)(h,{title:"Quick Start Guide",description:"Get Started.",url:"/docs/quick-start"}),(0,c.jsx)(h,{title:"GUI Reference",description:"Learn how to complete basic data tasks from your dashboard",url:"/docs/gui-reference"}),(0,c.jsx)(h,{title:"API Reference",description:"Interact with your database from a backend server using REST API",url:"/docs/api-reference"})]})})}function P({pages:e,targetPage:t}){let s=`${t.title} | Datasquirel docs`,r=t.description,a=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:s}),(0,c.jsx)("meta",{name:"description",content:r}),(0,c.jsx)(p.A,{pageTitle:s,pageDescription:r,pagePathname:"/"})]}),[n,i]=u().useState(null);return(0,c.jsx)(d.A,{head:a,user:n,children:(0,c.jsxs)("div",{className:"items-stretch w-full gap-0 flex-col-reverse lg:flex-row",children:[(0,c.jsx)(x.A,{pages:e}),(0,c.jsxs)("main",{children:[(0,c.jsx)(g,{}),(0,c.jsx)(j,{})]})]})})}async function S({query:e}){return{redirect:{destination:"/docs/getting-started",permanent:!1}}}let b=(0,i.M)(r,"default"),v=(0,i.M)(r,"getStaticProps"),y=(0,i.M)(r,"getStaticPaths"),A=(0,i.M)(r,"getServerSideProps"),w=(0,i.M)(r,"config"),N=(0,i.M)(r,"reportWebVitals"),_=(0,i.M)(r,"unstable_getStaticProps"),M=(0,i.M)(r,"unstable_getStaticPaths"),q=(0,i.M)(r,"unstable_getStaticParams"),k=(0,i.M)(r,"unstable_getServerProps"),E=(0,i.M)(r,"unstable_getServerSideProps"),I=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/docs",pathname:"/docs",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:r})},91479:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(8732);function a({pages:e}){if(!e||!e[0])return null;let t=e?.filter(e=>1==e.level);return(0,r.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,r.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,r.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function t(s,a){return s.map((s,n)=>{let i=`${a}/${s.slug}`,l=e.filter(e=>2==e.level&&e.parent_id==s.id);return(0,r.jsxs)("li",{children:[(0,r.jsx)("a",{href:i,className:s?.level==1?"font-semibold":"text-slate-600",children:s.title}),l&&l[0]&&(0,r.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:t(l,i)})]},n)})}(t,"/docs")})]})}s(82015)},6845:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(63715);function a({setUser:e}){let t=localStorage.getItem("user");if(t)try{e(JSON.parse(t));return}catch(t){e({});return}(0,r.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let s=t.user?t.user:{};e(s),localStorage.setItem("user",JSON.stringify(s))}).catch(e=>{console.log(e)})}},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var r=s(8732);s(82015);var a=s(20883);function n(e){return(0,r.jsxs)(a.Html,{lang:"en",children:[(0,r.jsxs)(a.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(a.Main,{}),(0,r.jsx)(a.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600],()=>s(66360));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7797,e.ids=[3220,7797],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},77354:(e,t,s)=>{s.r(t),s.d(t,{config:()=>w,default:()=>S,getServerSideProps:()=>A,getStaticPaths:()=>v,getStaticProps:()=>b,reportWebVitals:()=>q,routeModule:()=>G,unstable_getServerProps:()=>k,unstable_getServerSideProps:()=>I,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>N,unstable_getStaticProps:()=>M});var r={};s.r(r),s.d(r,{default:()=>P,getServerSideProps:()=>y});var a=s(63865),n=s(9455),i=s(30671),l=s(5583),o=s(19796),c=s(8732),m=s(82015),u=s.n(m),d=s(1013),p=s(91258);s(82271);var x=s(24093);function g(){return(0,c.jsxs)("section",{className:"py-14",children:[(0,c.jsx)("div",{className:"w-full gap-10 justify-between flex-col lg:flex-row relative z-10",children:(0,c.jsxs)("div",{className:"flex-col items-center lg:items-start max-w-lg text-center lg:text-left",style:{minWidth:"45%"},children:[(0,c.jsx)("h1",{className:"text-2xl m-0 leading-tight",children:"Documentation"}),(0,c.jsx)("span",{className:"font-normal",children:"Learn the ins and outs of datasquirel."})]})}),(0,c.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}var h=s(58526);function f({title:e,description:t,url:s}){return(0,c.jsxs)("a",{href:s,className:"card",children:[(0,c.jsxs)("div",{className:"flex-col items-start",children:[(0,c.jsx)("span",{className:"text-2xl font-semibold",children:e}),(0,c.jsx)("span",{className:"max-w-md text-slate-600",children:t})]}),(0,c.jsx)(h.A,{size:20})]})}function j(){return(0,c.jsx)("section",{className:"py-14",children:(0,c.jsxs)("div",{className:"grid grid-cols-1 sl:grid-cols-2 gap-4 w-full items-stretch",children:[(0,c.jsx)(f,{title:"Quick Start Guide",description:"Get Started.",url:"/docs/quick-start"}),(0,c.jsx)(f,{title:"GUI Reference",description:"Learn how to complete basic data tasks from your dashboard",url:"/docs/gui-reference"}),(0,c.jsx)(f,{title:"API Reference",description:"Interact with your database from a backend server using REST API",url:"/docs/api-reference"})]})})}function P({pages:e,targetPage:t}){let s=`${t.title} | Datasquirel docs`,r=t.description,a=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:s}),(0,c.jsx)("meta",{name:"description",content:r}),(0,c.jsx)(p.A,{pageTitle:s,pageDescription:r,pagePathname:"/"})]}),[n,i]=u().useState(null);return(0,c.jsx)(d.A,{head:a,user:n,children:(0,c.jsxs)("div",{className:"items-stretch w-full gap-0 flex-col-reverse lg:flex-row",children:[(0,c.jsx)(x.A,{pages:e}),(0,c.jsxs)("main",{children:[(0,c.jsx)(g,{}),(0,c.jsx)(j,{})]})]})})}async function y(){return{redirect:{destination:"/docs/getting-started",permanent:!1}}}let S=(0,i.M)(r,"default"),b=(0,i.M)(r,"getStaticProps"),v=(0,i.M)(r,"getStaticPaths"),A=(0,i.M)(r,"getServerSideProps"),w=(0,i.M)(r,"config"),q=(0,i.M)(r,"reportWebVitals"),M=(0,i.M)(r,"unstable_getStaticProps"),N=(0,i.M)(r,"unstable_getStaticPaths"),_=(0,i.M)(r,"unstable_getStaticParams"),k=(0,i.M)(r,"unstable_getServerProps"),I=(0,i.M)(r,"unstable_getServerSideProps"),G=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/docs",pathname:"/docs",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:r})},91258:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(8732),a=s(82015),n=s.n(a);function i({pageTitle:e,pageDescription:t,pagePathname:s,aceEditor:a}){return(0,r.jsxs)(n().Fragment,{children:[(0,r.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+s}),(0,r.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{property:"og:title",content:e}),(0,r.jsx)("meta",{property:"og:description",content:t}),(0,r.jsx)("meta",{itemProp:"name",content:e}),(0,r.jsx)("meta",{itemProp:"description",content:t}),(0,r.jsx)("meta",{name:"twitter:title",content:e}),(0,r.jsx)("meta",{name:"twitter:description",content:t}),a&&(0,r.jsxs)(n().Fragment,{children:[(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},24093:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(8732);function a({pages:e}){if(!e||!e[0])return null;let t=e?.filter(e=>1==e.level);return(0,r.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,r.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,r.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function t(s,a){return s.map((s,n)=>{let i=`${a}/${s.slug}`,l=e.filter(e=>2==e.level&&e.parent_id==s.id);return(0,r.jsxs)("li",{children:[(0,r.jsx)("a",{href:i,className:s?.level==1?"font-semibold":"text-slate-600",children:s.title}),l&&l[0]&&(0,r.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:t(l,i)})]},n)})}(t,"/docs")})]})}s(82015)},82271:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(46169);function a({setUser:e}){let t=localStorage.getItem("user");if(t)try{e(JSON.parse(t));return}catch(t){e({});return}(0,r.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let s=t.user?t.user:{};e(s),localStorage.setItem("user",JSON.stringify(s))}).catch(e=>{console.log(e)})}},5583:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var r=s(8732);s(82015);var a=s(20883);function n(){return(0,r.jsxs)(a.Html,{lang:"en",children:[(0,r.jsxs)(a.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(a.Main,{}),(0,r.jsx)(a.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796],()=>s(77354));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs.js.nft.json b/dsql-app/.local_dist/server/pages/docs.js.nft.json index 04e7761..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/docs.js.nft.json +++ b/dsql-app/.local_dist/server/pages/docs.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/[page].js b/dsql-app/.local_dist/server/pages/docs/[page].js index f9df297..7cc3628 100644 --- a/dsql-app/.local_dist/server/pages/docs/[page].js +++ b/dsql-app/.local_dist/server/pages/docs/[page].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5151,e.ids=[5151],e.modules={46692:(e,t,r)=>{r.r(t),r.d(t,{config:()=>f,default:()=>v,getServerSideProps:()=>_,getStaticPaths:()=>M,getStaticProps:()=>b,reportWebVitals:()=>x,routeModule:()=>C,unstable_getServerProps:()=>R,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>E,unstable_getStaticProps:()=>h});var a={};r.r(a),r.d(a,{default:()=>S,getStaticPaths:()=>m,getStaticProps:()=>P});var s=r(63865),i=r(9455),o=r(30671),u=r(49407),l=r(89600),n=r(8732),p=r(82015),g=r.n(p);r(71457),r(87472),r(6845),r(91479),r(84895);var c=r(69436),d=r.n(c);function S({pages:e,targetPage:t}){return(0,n.jsx)(g().Fragment,{})}async function P({params:e}){let t=await d()("SELECT id, title, slug, level, parent_id FROM docs_pages ORDER BY page_order ASC"),r=await d()("SELECT title, slug, description, content FROM docs_pages WHERE slug = ?",[e?.page]);return{props:{user:null,pages:t,targetPage:r[0]?r[0]:{}}}}async function m(){try{return{paths:(await d()("SELECT id, title, slug, level, parent_id FROM docs_pages WHERE level = 1")).map(e=>({params:{page:e.slug}})),fallback:!1}}catch(e){return console.log("Error =>",e.message),{paths:[],fallback:!1}}}let v=(0,o.M)(a,"default"),b=(0,o.M)(a,"getStaticProps"),M=(0,o.M)(a,"getStaticPaths"),_=(0,o.M)(a,"getServerSideProps"),f=(0,o.M)(a,"config"),x=(0,o.M)(a,"reportWebVitals"),h=(0,o.M)(a,"unstable_getStaticProps"),E=(0,o.M)(a,"unstable_getStaticPaths"),q=(0,o.M)(a,"unstable_getStaticParams"),R=(0,o.M)(a,"unstable_getServerProps"),w=(0,o.M)(a,"unstable_getServerSideProps"),C=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/docs/[page]",pathname:"/docs/[page]",bundlePath:"",filename:""},components:{App:l.default,Document:u.default},userland:a})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9600,5674],()=>r(46692));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5151,e.ids=[5151],e.modules={59527:(e,t,r)=>{r.r(t),r.d(t,{config:()=>v,default:()=>m,getServerSideProps:()=>f,getStaticPaths:()=>b,getStaticProps:()=>x,reportWebVitals:()=>M,routeModule:()=>R,unstable_getServerProps:()=>E,unstable_getServerSideProps:()=>A,unstable_getStaticParams:()=>h,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>q});var a={};r.r(a),r.d(a,{default:()=>g,getStaticPaths:()=>P,getStaticProps:()=>S});var s=r(63865),i=r(9455),u=r(30671),o=r(5583),n=r(19796),l=r(8732),p=r(82015),d=r.n(p);r(1013),r(91258),r(82271),r(24093),r(69237);var c=r(47410);function g({pages:e,targetPage:t}){return(0,l.jsx)(d().Fragment,{})}async function S({params:e}){let t=await (0,c.A)("SELECT id, title, slug, level, parent_id FROM docs_pages ORDER BY page_order ASC"),r=await (0,c.A)("SELECT title, slug, description, content FROM docs_pages WHERE slug = ?",[e?.page]);return{props:{user:null,pages:t,targetPage:r[0]?r[0]:{}}}}async function P(){return{paths:[],fallback:!1}}r(28187),r(9973);let m=(0,u.M)(a,"default"),x=(0,u.M)(a,"getStaticProps"),b=(0,u.M)(a,"getStaticPaths"),f=(0,u.M)(a,"getServerSideProps"),v=(0,u.M)(a,"config"),M=(0,u.M)(a,"reportWebVitals"),q=(0,u.M)(a,"unstable_getStaticProps"),_=(0,u.M)(a,"unstable_getStaticPaths"),h=(0,u.M)(a,"unstable_getStaticParams"),E=(0,u.M)(a,"unstable_getServerProps"),A=(0,u.M)(a,"unstable_getServerSideProps"),R=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/docs/[page]",pathname:"/docs/[page]",bundlePath:"",filename:""},components:{App:n.default,Document:o.default},userland:a})},28187:e=>{e.exports=require("@moduletrace/datasquirel")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,7713],()=>r(59527));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/[page].js.nft.json b/dsql-app/.local_dist/server/pages/docs/[page].js.nft.json index b998a4f..ae5629b 100644 --- a/dsql-app/.local_dist/server/pages/docs/[page].js.nft.json +++ b/dsql-app/.local_dist/server/pages/docs/[page].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../node_modules/@moduletrace/datasquirel/dist/index.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/query/get.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/query/post.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/social-login/githubLogin.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/social-login/handleSocialDb.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/social-login/loginSocialUser.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-create-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-delete-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-get-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-login.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-reauth-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-send-email-code.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-update-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/social/api-github-login.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/social/api-google-login.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/addAdminUserOnLogin.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/addMariadbUser.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/addUsersTableToDb.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/auth/write-auth-files.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/cookies/get-auth-cookie-names.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/addDbEntry.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/deleteDbEntry.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/runQuery.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/updateDbEntry.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/defaultFieldsRegexp.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/fullAccessDbHandler.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/grabNewUsersTableSchema.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/grabSchemaFieldsFromData.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/grabUserSchemaData.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/handleNodemailer.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/html/sanitizeHtmlOptions.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/httpRequest.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/httpsRequest.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/parseDbResults.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/serverError.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/setUserSchemaData.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/updateUsersTableSchema.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/varDatabaseDbHandler.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/varReadOnlyDatabaseDbHandler.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/encrypt.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/hashPassword.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/sql/sql-delete-generator.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/sql/sql-generator.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/sql/sql-insert-generator.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/createDbFromSchema.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/createTable.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/dbHandler.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/generateColumnDescription.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/noDatabaseDbHandler.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/supplementTable.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/updateTable.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/varDatabaseDbHandler.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/DB_HANDLER.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/DSQL_USER_DB_HANDLER.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/LOCAL_DB_HANDLER.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/NO_DB_HANDLER.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/grabDbSSL.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/parseCookies.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/camelJoinedtoCamelSpace.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/db/conn-db-handler.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/grab-host-names.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/trim-sql.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/add-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/delete-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/get-token.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/get-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/login-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/logout-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/reauth-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/send-email-code.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/social/github-auth.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/social/google-auth.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/update-user.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/user-auth.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/validate-temp-email-code.js","../../../../node_modules/@moduletrace/datasquirel/dist/users/validate-token.js","../../../../node_modules/@moduletrace/datasquirel/dist/utils/delete-file.js","../../../../node_modules/@moduletrace/datasquirel/dist/utils/get-schema.js","../../../../node_modules/@moduletrace/datasquirel/dist/utils/get.js","../../../../node_modules/@moduletrace/datasquirel/dist/utils/post.js","../../../../node_modules/@moduletrace/datasquirel/dist/utils/upload-file.js","../../../../node_modules/@moduletrace/datasquirel/dist/utils/upload-image.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/bignumber.js/bignumber.js","../../../../node_modules/bignumber.js/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/deepmerge/dist/cjs.js","../../../../node_modules/deepmerge/package.json","../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../node_modules/dom-serializer/lib/index.js","../../../../node_modules/dom-serializer/package.json","../../../../node_modules/domelementtype/lib/index.js","../../../../node_modules/domelementtype/package.json","../../../../node_modules/domhandler/lib/index.js","../../../../node_modules/domhandler/lib/node.js","../../../../node_modules/domhandler/package.json","../../../../node_modules/domutils/lib/feeds.js","../../../../node_modules/domutils/lib/helpers.js","../../../../node_modules/domutils/lib/index.js","../../../../node_modules/domutils/lib/legacy.js","../../../../node_modules/domutils/lib/manipulation.js","../../../../node_modules/domutils/lib/querying.js","../../../../node_modules/domutils/lib/stringify.js","../../../../node_modules/domutils/lib/traversal.js","../../../../node_modules/domutils/package.json","../../../../node_modules/entities/lib/decode.js","../../../../node_modules/entities/lib/decode_codepoint.js","../../../../node_modules/entities/lib/encode.js","../../../../node_modules/entities/lib/escape.js","../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../node_modules/entities/lib/generated/encode-html.js","../../../../node_modules/entities/lib/index.js","../../../../node_modules/entities/package.json","../../../../node_modules/escape-string-regexp/index.js","../../../../node_modules/escape-string-regexp/package.json","../../../../node_modules/generate-password/main.js","../../../../node_modules/generate-password/package.json","../../../../node_modules/generate-password/src/generate.js","../../../../node_modules/htmlparser2/lib/Parser.js","../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../node_modules/htmlparser2/lib/index.js","../../../../node_modules/htmlparser2/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../node_modules/is-plain-object/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/package.json","../../../../node_modules/nanoid/non-secure/index.cjs","../../../../node_modules/nanoid/non-secure/package.json","../../../../node_modules/nanoid/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../node_modules/nodemailer/lib/base64/index.js","../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../node_modules/nodemailer/lib/qp/index.js","../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../node_modules/nodemailer/lib/shared/index.js","../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../node_modules/nodemailer/package.json","../../../../node_modules/parse-srcset/package.json","../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../node_modules/picocolors/package.json","../../../../node_modules/picocolors/picocolors.js","../../../../node_modules/postcss/lib/at-rule.js","../../../../node_modules/postcss/lib/comment.js","../../../../node_modules/postcss/lib/container.js","../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../node_modules/postcss/lib/declaration.js","../../../../node_modules/postcss/lib/document.js","../../../../node_modules/postcss/lib/fromJSON.js","../../../../node_modules/postcss/lib/input.js","../../../../node_modules/postcss/lib/lazy-result.js","../../../../node_modules/postcss/lib/list.js","../../../../node_modules/postcss/lib/map-generator.js","../../../../node_modules/postcss/lib/no-work-result.js","../../../../node_modules/postcss/lib/node.js","../../../../node_modules/postcss/lib/parse.js","../../../../node_modules/postcss/lib/parser.js","../../../../node_modules/postcss/lib/postcss.js","../../../../node_modules/postcss/lib/previous-map.js","../../../../node_modules/postcss/lib/processor.js","../../../../node_modules/postcss/lib/result.js","../../../../node_modules/postcss/lib/root.js","../../../../node_modules/postcss/lib/rule.js","../../../../node_modules/postcss/lib/stringifier.js","../../../../node_modules/postcss/lib/stringify.js","../../../../node_modules/postcss/lib/symbols.js","../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../node_modules/postcss/lib/tokenize.js","../../../../node_modules/postcss/lib/warn-once.js","../../../../node_modules/postcss/lib/warning.js","../../../../node_modules/postcss/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/safe-buffer/index.js","../../../../node_modules/safe-buffer/package.json","../../../../node_modules/sanitize-html/index.js","../../../../node_modules/sanitize-html/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/source-map-js/lib/array-set.js","../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../node_modules/source-map-js/lib/base64.js","../../../../node_modules/source-map-js/lib/binary-search.js","../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../node_modules/source-map-js/lib/source-node.js","../../../../node_modules/source-map-js/lib/util.js","../../../../node_modules/source-map-js/package.json","../../../../node_modules/source-map-js/source-map.js","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js b/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js index 0b122a4..5ee423e 100644 --- a/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js +++ b/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=1980,e.ids=[1980],e.modules={14126:(e,t,r)=>{r.r(t),r.d(t,{config:()=>v,default:()=>S,getServerSideProps:()=>b,getStaticPaths:()=>P,getStaticProps:()=>f,reportWebVitals:()=>_,routeModule:()=>q,unstable_getServerProps:()=>x,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>M,unstable_getStaticPaths:()=>m,unstable_getStaticProps:()=>h});var a={};r.r(a),r.d(a,{default:()=>g,getStaticPaths:()=>d,getStaticProps:()=>c});var s=r(63865),i=r(9455),l=r(30671),u=r(49407),p=r(89600);r(8732),r(82015),r(71457),r(87472),r(6845),r(91479),r(84895);var n=r(69436),o=r.n(n);function g({pages:e,targetPage:t}){return null}async function c({params:e}){let t=e?.["sub-page"],r=await o()("SELECT id, title, slug, level, parent_id FROM docs_pages ORDER BY page_order ASC"),a=r?.filter(t=>t.slug===e?.page&&1==t.level);if(!a)return{redirect:{destination:"/docs",permanent:!1}};let s=await o()("SELECT title, slug, description, content FROM docs_pages WHERE slug = ? AND level = ? AND parent_id = ?",[t,2,a[0]?.id]);return{props:{user:null,pages:r,targetPage:s?.[0]?s[0]:{}}}}async function d(){try{let e=await o()("SELECT id, title, slug, level, parent_id FROM docs_pages"),t=e?.filter(e=>2==parseInt(e?.level)),r=[],a=e?.filter(e=>e?.level==1);if(!a?.[0])return{paths:[],fallback:!1};return a.forEach(e=>{let a=t?.filter(t=>t.parent_id==e?.id);a?.forEach(t=>{r.push({params:{page:e.slug,"sub-page":t.slug}})})}),{paths:r,fallback:!1}}catch(e){return console.log("Error =>",e.message),{paths:[],fallback:!1}}}let S=(0,l.M)(a,"default"),f=(0,l.M)(a,"getStaticProps"),P=(0,l.M)(a,"getStaticPaths"),b=(0,l.M)(a,"getServerSideProps"),v=(0,l.M)(a,"config"),_=(0,l.M)(a,"reportWebVitals"),h=(0,l.M)(a,"unstable_getStaticProps"),m=(0,l.M)(a,"unstable_getStaticPaths"),M=(0,l.M)(a,"unstable_getStaticParams"),x=(0,l.M)(a,"unstable_getServerProps"),E=(0,l.M)(a,"unstable_getServerSideProps"),q=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/docs/[page]/[sub-page]",pathname:"/docs/[page]/[sub-page]",bundlePath:"",filename:""},components:{App:p.default,Document:u.default},userland:a})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9600,5674],()=>r(14126));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=1980,e.ids=[1980],e.modules={29262:(e,t,r)=>{r.r(t),r.d(t,{config:()=>f,default:()=>g,getServerSideProps:()=>b,getStaticPaths:()=>P,getStaticProps:()=>S,reportWebVitals:()=>m,routeModule:()=>h,unstable_getServerProps:()=>_,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>M,unstable_getStaticPaths:()=>x,unstable_getStaticProps:()=>v});var a={};r.r(a),r.d(a,{default:()=>p,getStaticPaths:()=>c,getStaticProps:()=>d});var s=r(63865),i=r(9455),u=r(30671),l=r(5583),o=r(19796);r(8732),r(82015),r(1013),r(91258),r(82271),r(24093),r(69237);var n=r(47410);function p({pages:e,targetPage:t}){return null}async function d({params:e}){let t=e?.["sub-page"],r=await (0,n.A)("SELECT id, title, slug, level, parent_id FROM docs_pages ORDER BY page_order ASC"),a=r?.filter(t=>t.slug===e?.page&&1==t.level);if(!a)return{redirect:{destination:"/docs",permanent:!1}};let s=await (0,n.A)("SELECT title, slug, description, content FROM docs_pages WHERE slug = ? AND level = ? AND parent_id = ?",[t,2,a[0]?.id]);return{props:{user:null,pages:r,targetPage:s?.[0]?s[0]:{}}}}async function c(){return{paths:[],fallback:!1}}r(9973),r(28187);let g=(0,u.M)(a,"default"),S=(0,u.M)(a,"getStaticProps"),P=(0,u.M)(a,"getStaticPaths"),b=(0,u.M)(a,"getServerSideProps"),f=(0,u.M)(a,"config"),m=(0,u.M)(a,"reportWebVitals"),v=(0,u.M)(a,"unstable_getStaticProps"),x=(0,u.M)(a,"unstable_getStaticPaths"),M=(0,u.M)(a,"unstable_getStaticParams"),_=(0,u.M)(a,"unstable_getServerProps"),q=(0,u.M)(a,"unstable_getServerSideProps"),h=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/docs/[page]/[sub-page]",pathname:"/docs/[page]/[sub-page]",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:a})},28187:e=>{e.exports=require("@moduletrace/datasquirel")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,7713],()=>r(29262));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js.nft.json b/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js.nft.json index 21d1675..b80c696 100644 --- a/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js.nft.json +++ b/dsql-app/.local_dist/server/pages/docs/[page]/[sub-page].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/github/getAccessToken.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/google/getAccessToken.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/auth/logout.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/index.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputFileToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/imageInputToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/media/inputFileToBase64.js","../../../../../node_modules/@moduletrace/datasquirel/dist/client/utils/parseClientCookies.js","../../../../../node_modules/@moduletrace/datasquirel/dist/index.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/query/get.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/query/post.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/social-login/githubLogin.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/social-login/handleSocialDb.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/social-login/loginSocialUser.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-create-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-delete-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-get-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-login.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-reauth-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-send-email-code.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/api-update-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/social/api-github-login.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/api/users/social/api-google-login.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/addAdminUserOnLogin.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/addMariadbUser.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/addUsersTableToDb.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/auth/write-auth-files.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/cookies/get-auth-cookie-names.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/addDbEntry.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/deleteDbEntry.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/runQuery.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/db/updateDbEntry.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/defaultFieldsRegexp.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/fullAccessDbHandler.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/grabNewUsersTableSchema.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/grabSchemaFieldsFromData.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/grabUserSchemaData.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/handleNodemailer.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/html/sanitizeHtmlOptions.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/httpRequest.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/httpsRequest.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/parseDbResults.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/serverError.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/setUserSchemaData.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/updateUsersTableSchema.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/varDatabaseDbHandler.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/backend/varReadOnlyDatabaseDbHandler.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/encrypt.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/hashPassword.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/sql/sql-delete-generator.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/sql/sql-generator.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/functions/dsql/sql/sql-insert-generator.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/createDbFromSchema.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/createTable.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/dbHandler.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/generateColumnDescription.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/noDatabaseDbHandler.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/supplementTable.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/updateTable.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/shell/utils/varDatabaseDbHandler.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/DB_HANDLER.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/DSQL_USER_DB_HANDLER.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/LOCAL_DB_HANDLER.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/global-db/NO_DB_HANDLER.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/grabDbSSL.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/backend/parseCookies.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/camelJoinedtoCamelSpace.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/db/conn-db-handler.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/ejson.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/grab-host-names.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/numberfy.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-cookies.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/serialize-query.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/slugify.js","../../../../../node_modules/@moduletrace/datasquirel/dist/package-shared/utils/trim-sql.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/add-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/delete-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/get-token.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/get-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/login-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/logout-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/reauth-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/send-email-code.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/social/github-auth.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/social/google-auth.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/update-user.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/user-auth.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/validate-temp-email-code.js","../../../../../node_modules/@moduletrace/datasquirel/dist/users/validate-token.js","../../../../../node_modules/@moduletrace/datasquirel/dist/utils/delete-file.js","../../../../../node_modules/@moduletrace/datasquirel/dist/utils/get-schema.js","../../../../../node_modules/@moduletrace/datasquirel/dist/utils/get.js","../../../../../node_modules/@moduletrace/datasquirel/dist/utils/post.js","../../../../../node_modules/@moduletrace/datasquirel/dist/utils/upload-file.js","../../../../../node_modules/@moduletrace/datasquirel/dist/utils/upload-image.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/bignumber.js/bignumber.js","../../../../../node_modules/bignumber.js/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/deepmerge/dist/cjs.js","../../../../../node_modules/deepmerge/package.json","../../../../../node_modules/dom-serializer/lib/foreignNames.js","../../../../../node_modules/dom-serializer/lib/index.js","../../../../../node_modules/dom-serializer/package.json","../../../../../node_modules/domelementtype/lib/index.js","../../../../../node_modules/domelementtype/package.json","../../../../../node_modules/domhandler/lib/index.js","../../../../../node_modules/domhandler/lib/node.js","../../../../../node_modules/domhandler/package.json","../../../../../node_modules/domutils/lib/feeds.js","../../../../../node_modules/domutils/lib/helpers.js","../../../../../node_modules/domutils/lib/index.js","../../../../../node_modules/domutils/lib/legacy.js","../../../../../node_modules/domutils/lib/manipulation.js","../../../../../node_modules/domutils/lib/querying.js","../../../../../node_modules/domutils/lib/stringify.js","../../../../../node_modules/domutils/lib/traversal.js","../../../../../node_modules/domutils/package.json","../../../../../node_modules/entities/lib/decode.js","../../../../../node_modules/entities/lib/decode_codepoint.js","../../../../../node_modules/entities/lib/encode.js","../../../../../node_modules/entities/lib/escape.js","../../../../../node_modules/entities/lib/generated/decode-data-html.js","../../../../../node_modules/entities/lib/generated/decode-data-xml.js","../../../../../node_modules/entities/lib/generated/encode-html.js","../../../../../node_modules/entities/lib/index.js","../../../../../node_modules/entities/package.json","../../../../../node_modules/escape-string-regexp/index.js","../../../../../node_modules/escape-string-regexp/package.json","../../../../../node_modules/generate-password/main.js","../../../../../node_modules/generate-password/package.json","../../../../../node_modules/generate-password/src/generate.js","../../../../../node_modules/htmlparser2/lib/Parser.js","../../../../../node_modules/htmlparser2/lib/Tokenizer.js","../../../../../node_modules/htmlparser2/lib/index.js","../../../../../node_modules/htmlparser2/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/is-plain-object/dist/is-plain-object.js","../../../../../node_modules/is-plain-object/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/package.json","../../../../../node_modules/nanoid/non-secure/index.cjs","../../../../../node_modules/nanoid/non-secure/package.json","../../../../../node_modules/nanoid/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/nodemailer/lib/addressparser/index.js","../../../../../node_modules/nodemailer/lib/base64/index.js","../../../../../node_modules/nodemailer/lib/dkim/index.js","../../../../../node_modules/nodemailer/lib/dkim/message-parser.js","../../../../../node_modules/nodemailer/lib/dkim/relaxed-body.js","../../../../../node_modules/nodemailer/lib/dkim/sign.js","../../../../../node_modules/nodemailer/lib/fetch/cookies.js","../../../../../node_modules/nodemailer/lib/fetch/index.js","../../../../../node_modules/nodemailer/lib/json-transport/index.js","../../../../../node_modules/nodemailer/lib/mail-composer/index.js","../../../../../node_modules/nodemailer/lib/mailer/index.js","../../../../../node_modules/nodemailer/lib/mailer/mail-message.js","../../../../../node_modules/nodemailer/lib/mime-funcs/index.js","../../../../../node_modules/nodemailer/lib/mime-funcs/mime-types.js","../../../../../node_modules/nodemailer/lib/mime-node/index.js","../../../../../node_modules/nodemailer/lib/mime-node/last-newline.js","../../../../../node_modules/nodemailer/lib/mime-node/le-unix.js","../../../../../node_modules/nodemailer/lib/mime-node/le-windows.js","../../../../../node_modules/nodemailer/lib/nodemailer.js","../../../../../node_modules/nodemailer/lib/punycode/index.js","../../../../../node_modules/nodemailer/lib/qp/index.js","../../../../../node_modules/nodemailer/lib/sendmail-transport/index.js","../../../../../node_modules/nodemailer/lib/ses-transport/index.js","../../../../../node_modules/nodemailer/lib/shared/index.js","../../../../../node_modules/nodemailer/lib/smtp-connection/data-stream.js","../../../../../node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js","../../../../../node_modules/nodemailer/lib/smtp-connection/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/index.js","../../../../../node_modules/nodemailer/lib/smtp-pool/pool-resource.js","../../../../../node_modules/nodemailer/lib/smtp-transport/index.js","../../../../../node_modules/nodemailer/lib/stream-transport/index.js","../../../../../node_modules/nodemailer/lib/well-known/index.js","../../../../../node_modules/nodemailer/lib/well-known/services.json","../../../../../node_modules/nodemailer/lib/xoauth2/index.js","../../../../../node_modules/nodemailer/package.json","../../../../../node_modules/parse-srcset/package.json","../../../../../node_modules/parse-srcset/src/parse-srcset.js","../../../../../node_modules/picocolors/package.json","../../../../../node_modules/picocolors/picocolors.js","../../../../../node_modules/postcss/lib/at-rule.js","../../../../../node_modules/postcss/lib/comment.js","../../../../../node_modules/postcss/lib/container.js","../../../../../node_modules/postcss/lib/css-syntax-error.js","../../../../../node_modules/postcss/lib/declaration.js","../../../../../node_modules/postcss/lib/document.js","../../../../../node_modules/postcss/lib/fromJSON.js","../../../../../node_modules/postcss/lib/input.js","../../../../../node_modules/postcss/lib/lazy-result.js","../../../../../node_modules/postcss/lib/list.js","../../../../../node_modules/postcss/lib/map-generator.js","../../../../../node_modules/postcss/lib/no-work-result.js","../../../../../node_modules/postcss/lib/node.js","../../../../../node_modules/postcss/lib/parse.js","../../../../../node_modules/postcss/lib/parser.js","../../../../../node_modules/postcss/lib/postcss.js","../../../../../node_modules/postcss/lib/previous-map.js","../../../../../node_modules/postcss/lib/processor.js","../../../../../node_modules/postcss/lib/result.js","../../../../../node_modules/postcss/lib/root.js","../../../../../node_modules/postcss/lib/rule.js","../../../../../node_modules/postcss/lib/stringifier.js","../../../../../node_modules/postcss/lib/stringify.js","../../../../../node_modules/postcss/lib/symbols.js","../../../../../node_modules/postcss/lib/terminal-highlight.js","../../../../../node_modules/postcss/lib/tokenize.js","../../../../../node_modules/postcss/lib/warn-once.js","../../../../../node_modules/postcss/lib/warning.js","../../../../../node_modules/postcss/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/safe-buffer/index.js","../../../../../node_modules/safe-buffer/package.json","../../../../../node_modules/sanitize-html/index.js","../../../../../node_modules/sanitize-html/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/source-map-js/lib/array-set.js","../../../../../node_modules/source-map-js/lib/base64-vlq.js","../../../../../node_modules/source-map-js/lib/base64.js","../../../../../node_modules/source-map-js/lib/binary-search.js","../../../../../node_modules/source-map-js/lib/mapping-list.js","../../../../../node_modules/source-map-js/lib/quick-sort.js","../../../../../node_modules/source-map-js/lib/source-map-consumer.js","../../../../../node_modules/source-map-js/lib/source-map-generator.js","../../../../../node_modules/source-map-js/lib/source-node.js","../../../../../node_modules/source-map-js/lib/util.js","../../../../../node_modules/source-map-js/package.json","../../../../../node_modules/source-map-js/source-map.js","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/api-reference.html b/dsql-app/.local_dist/server/pages/docs/api-reference.html deleted file mode 100644 index 6e56fed..0000000 --- a/dsql-app/.local_dist/server/pages/docs/api-reference.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/api-reference.json b/dsql-app/.local_dist/server/pages/docs/api-reference.json deleted file mode 100644 index 3a0ba99..0000000 --- a/dsql-app/.local_dist/server/pages/docs/api-reference.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"API Reference","slug":"api-reference","description":"

Access data from external sources. Datasquirel is platform-agnostic so all you need is a HTTP request with the right credentials. Our NPM module abstracts this aspect for ease of use when using node.

","content":"

Overview

All data stored in your databases can be accessed through our integrated API. There are two sets of API keys, each with different scope. If you want to just fetch data use the Read Only API key. If you want to have full access to every aspect of your account, use the Full Access API key. Learn how to add API keys here.


Getting started

After you have your API keys, you can start making calls using our API integration. We have an NPM module for node projects, but you only need a HTTPS client to make the calls.

npm install datasquirel


Fetching Data using the get method

The get method only retrieves data. It cannot be used to write or update data. It was created to be the fastest way to access your data, that explains the key length. You can get data using the npm module or via any HTTP request.

  • Using CURL:

    CURL  \n    https://datasquirel.com/api/query/get?db=db_name&query=SELECT+*+FROM+table_name \n-H \n    \"Authorization:READ_ONLY_API_KEY\";Content-Type:application/json
  • Using node module

    const datasquirel = require(\"datasquirel\");\n\ndatasquirel\n    .get({\n        db: \"test\",\n        key: process.env.DATASQUIREL_READ_ONLY_KEY,\n        query: \"SELECT title, slug, body FROM blog_posts\",\n    })\n    .then((response) => {\n        console.log(response);\n    });

The response from this method returns a JSON payload with two fields: success: which could be either true or false, and payload: which is an array of values when the operation is successfull, or anything from null to a string to an object with an error message. This is a sample of a successful response object:

{\n    success: true,\n    payload: [\n        {\n            id: 1,\n            title: \"Hello World\",\n            slug: \"hello-world\",\n            body: \"This is a test blog post.\",\n        },\n    ],\n}

A failed response could return any of three results:

  • A null payload.

    {\n    success: false,\n    payload: null\n}

  • An error string payload

    {\n    success: false,\n    payload: \"ERROR: no such table as 'blog_posts'\"\n}
  • An object payload containing an error field

    {\n    success: false,\n    payload: { error: \"MYSQL ERROR: syntax error in your sql\" }\n}

In each case, the success key refurns a value of false , meaning the query failed.


Using the post method

The post method contains the full spectrum of CRUD operations. And it works *only with the Full Access API key. The read only API key will not work for post methods.

  • Using CURL
    CURL --json\n    '{ \n        \"database\": \"social_network\",\n        \"query\": \"UPDATE users SET name = 'John' WHERE id = 1\"\n    }'\n    https://datasquirel.com/api/query/post \n-H \n    \"Authorization:FULL_ACCESS_API_KEY\"`

  • Using our npm module

    const datasquirel = require(\"datasquirel\");\n\ndatasquirel\n    .post({\n        database: \"social_network\",\n        key: process.env.FULL_ACCESS_API_KEY,\n        query: \"UPDATE users SET name = 'John' WHERE id = 1\",\n    })\n    .then((response) => {\n        console.log(response);\n    });

The process yeilds simalar results, but with a slight difference: for operations like insert and update, the success field yeilds true while the payload field yeilds an object containing fields like 

{\n    success: true,\n    payload: {\n        serverStatus: 37,\n        affectedRows: 1,\n    }\n}

The post method can also take an object as the query instead of a string. Example:

const datasquirel = require(\"datasquirel\");\n\ndatasquirel\n    .post({\n        database: \"social_network\",\n        key: process.env.FULL_ACCESS_API_KEY,\n        query: {\n            action: \"update\",\n            table: \"users\",\n            data: {\n                name: \"John\",\n            },\n            identifierColumnName: \"id\",\n            identifierValue: 1,\n        },\n    })\n    .then((response) => {\n        console.log(response);\n    });

This yields the exact same result as before. Learn more about the post method here.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/api-reference/get.html b/dsql-app/.local_dist/server/pages/docs/api-reference/get.html deleted file mode 100644 index 2f8616b..0000000 --- a/dsql-app/.local_dist/server/pages/docs/api-reference/get.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/api-reference/get.json b/dsql-app/.local_dist/server/pages/docs/api-reference/get.json deleted file mode 100644 index 519215e..0000000 --- a/dsql-app/.local_dist/server/pages/docs/api-reference/get.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Get","slug":"get","description":"

Fetch data from your database quickly and securely.

","content":"

Overview

The get method only retrieves data. It cannot be used to write or update data. It was created to be the fastest way to access your data, that explains the key length. You can get data using the npm module or via any HTTP request.

Using CURL

CURL  \n    https://datasquirel.com/api/query/get?db=db_name&query=SELECT+*+FROM+table_name \n-H \n    \"Authorization:READ_ONLY_API_KEY\";Content-Type:application/json


Using node module

const datasquirel = require(\"datasquirel\");\n\ndatasquirel\n    .get({\n        db: \"test\",\n        key: process.env.DATASQUIREL_READ_ONLY_KEY,\n        query: \"SELECT title, slug, body FROM blog_posts\",\n    })\n    .then((response) => {\n        console.log(response);\n    });


The response

The response from this method returns a JSON payload with two fields: success: which could be either true or false, and payload: which is an array of values when the operation is successfull, or anything from null to a string to an object with an error message. This is a sample of a successful response object:

{\n    success: true,\n    payload: [\n        {\n            id: 1,\n            title: \"Hello World\",\n            slug: \"hello-world\",\n            body: \"This is a test blog post.\",\n        },\n    ],\n}

A failed response could return any of three results:

  • A null payload.

    {\n    success: false,\n    payload: null\n}
  • An error string payload

    {\n    success: false,\n    payload: \"ERROR: no such table as 'blog_posts'\"\n}
  • An object payload containing an error field

    {\n    success: false,\n    payload: { error: \"MYSQL ERROR: syntax error in your sql\" }\n}

In each case, the success key refurns a value of false , meaning the query failed.


"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/api-reference/post.html b/dsql-app/.local_dist/server/pages/docs/api-reference/post.html deleted file mode 100644 index 2a8b3ad..0000000 --- a/dsql-app/.local_dist/server/pages/docs/api-reference/post.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/api-reference/post.json b/dsql-app/.local_dist/server/pages/docs/api-reference/post.json deleted file mode 100644 index 31a75cc..0000000 --- a/dsql-app/.local_dist/server/pages/docs/api-reference/post.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Post","slug":"post","description":"

Full CRUD operations on your database using our feature-rich API integration.

","content":"

Overview

The post  method expands on the get method. It adds the ability to insert, update, and delete data, as well as add and delete images from your static files directories.

The post method contains the full spectrum of CRUD operations. And it works *only with the Full Access API key. The read only API key will not work for post methods.

Using CURL

CURL --json\n    '{ \n        \"database\": \"social_network\",\n        \"query\": \"UPDATE users SET name = 'John' WHERE id = 1\"\n    }'\n    https://datasquirel.com/api/query/post \n-H \n    \"Authorization:FULL_ACCESS_API_KEY\"`


Using our npm module

const datasquirel = require(\"datasquirel\");\n\ndatasquirel\n    .post({\n        database: \"social_network\",\n        key: process.env.FULL_ACCESS_API_KEY,\n        query: \"UPDATE users SET name = 'John' WHERE id = 1\",\n    })\n    .then((response) => {\n        console.log(response);\n    });


The Response

The process yeilds simalar results, but with a slight difference: for operations like insert and update, the success field yeilds true while the payload field yeilds an object containing fields like 

{\n    success: true,\n    payload: {\n        serverStatus: 37,\n        affectedRows: 1,\n    }\n}


Post with object query

The post method can also take an object as the query instead of a string. Example:

const datasquirel = require(\"datasquirel\");\n\ndatasquirel\n    .post({\n        database: \"social_network\",\n        key: process.env.FULL_ACCESS_API_KEY,\n        query: {\n            action: \"update\",\n            table: \"users\",\n            data: {\n                name: \"John\",\n            },\n            identifierColumnName: \"id\",\n            identifierValue: 1,\n        },\n    })\n    .then((response) => {\n        console.log(response);\n    });

This yields the exact same result as before.


Adding media

In addition to the full CRUD operations the post method offers, you can also add media to your static files directory. This uses the same post method, but with sligtly different parameters. Also, the media you send *must be in base64 format. You can use our npm client module to convert images and documents to base64 format.

Using our node module

const datasquirel = require(\"datasquirel\");\n\ndatasquirel.media\n    .uploadImage({\n        key: process.env.DATASQUIREL_FULL_ACCESS_API_KEY,\n        payload: {\n            imageData: \"--------- LONG BASE64 STRING ---------\",\n            imageName: \"sunflower\",\n            folder: \"flowers\", // Optional\n            mimeType: \"jpeg\", // Optional\n            thumbnailSize: 300, // Optional\n        },\n    })\n    .then((response) => {\n        console.log(response);\n    });
"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/database-reference.html b/dsql-app/.local_dist/server/pages/docs/database-reference.html deleted file mode 100644 index 1b7218b..0000000 --- a/dsql-app/.local_dist/server/pages/docs/database-reference.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/database-reference.json b/dsql-app/.local_dist/server/pages/docs/database-reference.json deleted file mode 100644 index f3dfe62..0000000 --- a/dsql-app/.local_dist/server/pages/docs/database-reference.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Database Reference","slug":"database-reference","description":"

Understanding SQL and its syntax.

","content":"

Overview

SQL (Sequential Query Language) is the industry-standard, battle-tested database querying language used to interact with relational databases. While datasquirel aims to abstract much of it, knowing the basics is still very important to get the full power of datasquirel management system.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/database-reference/data-types.html b/dsql-app/.local_dist/server/pages/docs/database-reference/data-types.html deleted file mode 100644 index 969908b..0000000 --- a/dsql-app/.local_dist/server/pages/docs/database-reference/data-types.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/database-reference/data-types.json b/dsql-app/.local_dist/server/pages/docs/database-reference/data-types.json deleted file mode 100644 index 2874617..0000000 --- a/dsql-app/.local_dist/server/pages/docs/database-reference/data-types.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Data types","slug":"data-types","description":"

Relational database data types

","content":"

VARCHAR

The varchar datatype is probably the most commonly used datatype. It's basically text and numbers that max out at 255 characters. Varchar type is usually annoted in the form VARCHAR(20) .

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/database-reference/querying-data.html b/dsql-app/.local_dist/server/pages/docs/database-reference/querying-data.html deleted file mode 100644 index 31bb239..0000000 --- a/dsql-app/.local_dist/server/pages/docs/database-reference/querying-data.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/database-reference/querying-data.json b/dsql-app/.local_dist/server/pages/docs/database-reference/querying-data.json deleted file mode 100644 index e4fcdfe..0000000 --- a/dsql-app/.local_dist/server/pages/docs/database-reference/querying-data.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Querying Data","slug":"querying-data","description":"

Using SQL to query data from your database

","content":"

Overview

Querying data will eventually be the most common thing you do with your datasquirel account. So it's important to know some essential querying syntax, our node module abstraction will not give you the same level of control as direct sql querying.

SELECT Keyword

SELECT * FROM blog_posts

The select keyword is the most basic and used keyword. In the example above, we're selecting every row(or entry) from the table blog_posts . The \"*\" sign stands for \"all columns\". To dial down to specific columns, you can replace the \"*\" symbol with the column(s) you want to select. Example:

SELECT title, body FROM blog_posts

This query only targets the title and body columns(or fields) in the blog_posts table.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/getting-started.html b/dsql-app/.local_dist/server/pages/docs/getting-started.html deleted file mode 100644 index e011375..0000000 --- a/dsql-app/.local_dist/server/pages/docs/getting-started.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/getting-started.json b/dsql-app/.local_dist/server/pages/docs/getting-started.json deleted file mode 100644 index dd4fcf3..0000000 --- a/dsql-app/.local_dist/server/pages/docs/getting-started.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Getting Started","slug":"getting-started","description":"

Introduction to datasquirel. Read the quick-start guide to get started with a new account.

","content":"

Overview

Datasquirel is an SQL-based data management system that aims to manage SQL databases with the lowest level of opinionation. Datasquirel consists of 2 main parts:

  1. A full-fledged SQL server that runs multiple isolated databases for different users, interfacing with an online Graphical user interface and a REST API integration.
  2. An all-purpose static files server using NGINX to serve static files on demand. Files uploaded to datasquirel static file server are public by default, but the can be made private, in which case they can only be accessed via secure encrypted credentials.

GUI Reference

SQL through your bowser
Learn More

Datasquirel's Graphical User Interface aims to narrow down the the complexities of SQL to a simple user interface with columns, rows, and entries.

API Reference

SQL over the cloud using REST
Learn More

Datasquirel's API reference uses our NPM module datasquirel. This can be installed via npm:

npm install datasquirel

Learn more by reading the api documentation


Key Concepts

SQL

SQL stands for \"Sequential Query language\". This is the standard language for relational databases like MySQL and Postgres. Datasquirel uses MySQL and is compatible with all known SQL syntax.

Database

A database in datasquirel is an isolated MySQL database running on our MySQL servers. A database consists of tables, which in turn consists of columns, rows, and entries. Each database can be exported at anytime, and also populated using a .sql dump file at any time.

CRUD

CRUD stands for Create, Read, Update, Delete. This is the basic spectrum of the capabilities of any database, and it is useful for managing data.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/gui-reference.html b/dsql-app/.local_dist/server/pages/docs/gui-reference.html deleted file mode 100644 index 129a870..0000000 --- a/dsql-app/.local_dist/server/pages/docs/gui-reference.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/gui-reference.json b/dsql-app/.local_dist/server/pages/docs/gui-reference.json deleted file mode 100644 index 39462e3..0000000 --- a/dsql-app/.local_dist/server/pages/docs/gui-reference.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"GUI Reference","slug":"gui-reference","description":"

Datasquirel Graphic User Interface provides a way to manage database instances from your browser

","content":"

A lot can be done using our web interface. Everyhing going on you admin dashboard is essentially running SQL queries on your isolated database, and saving and retrieving static files. Our integrated SQL shell for each database takes this concept to the next level. Giving you the ability to run SQL queries directly via your browser. To get started using our GUI, follow these steps:

1. Create Account

Create a free account here


2. Create Database

Navigate to your Dashboard or Databases page. Click the \"Add Database\" button to add a new database.

On the next screen that appears, fill in the form and add a database image if you wish. Click on \"Create Database\" to add the new database

Creating a new database takes you to the database page. This page allows you to import a pre-existing database using an SQL export file, or create a new table inside the newly-formed database. More operations for your database can be found in the database dropdown on the top left, or the \"more\" dropdown on the top right.

3. Add a table

Databases consists of Tables: each with fields(or columns) and entries(or rows). Select a database from your database list to access the single database pages. Click on \"Add Table\" and fill in the new table form.

On each table form you have access to the table fields(or column titles). Each field contains a few options:

  • Field Name: Name of field(or column title)
  • Data Type: type of data to be stored on that field: See All Datatypes
  • Required: Choose whether the field must have a value or not
  • Default Value: Default value of field in the case no value is entered.
  • More: The \"More\" button contains options for encryption and foreign keys

After these fields are filled, click \"Add Field\". Add as much field as you need. These fields serve as column titles for your table.

After creating a table you now have access to the tables list.


4. Add an Entry

Select the newly created Table and on the designated table page click on \"Add New Table Entry\"

Fill in the required fields and click on \"Add Entry\". Congrats, you have now created your first datasquirel data entry, you can now access this data from any platform using your api key.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/gui-reference/getting-started.html b/dsql-app/.local_dist/server/pages/docs/gui-reference/getting-started.html deleted file mode 100644 index dfaf9b3..0000000 --- a/dsql-app/.local_dist/server/pages/docs/gui-reference/getting-started.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/gui-reference/getting-started.json b/dsql-app/.local_dist/server/pages/docs/gui-reference/getting-started.json deleted file mode 100644 index cf91b6f..0000000 --- a/dsql-app/.local_dist/server/pages/docs/gui-reference/getting-started.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Getting Started","slug":"getting-started","description":"

Get started creating databases and making entries.

","content":"

Overview

Datasquirel GUI is focused on the process of creating databases, defining and adding tables, and adding entries to these tables. We will go through these steps here.


1. Create Account

Create a free account here


2. Create Database

Navigate to your Dashboard or Databases page. Click the \"Add Database\" button to add a new database.

On the next screen that appears, fill in the form and add a database image if you wish. Click on \"Create Database\" to add the new database

Creating a new database takes you to the database page. This page allows you to import a pre-existing database using an SQL export file, or create a new table inside the newly-formed database. More operations for your database can be found in the database dropdown on the top left, or the \"more\" dropdown on the top right.

3. Add a table

Databases consists of Tables: each with fields(or columns) and entries(or rows). Select a database from your database list to access the single database pages. Click on \"Add Table\" and fill in the new table form.

On each table form you have access to the table fields(or column titles). Each field contains a few options:

  • Field Name: Name of field(or column title)
  • Data Type: type of data to be stored on that field: See All Datatypes
  • Required: Choose whether the field must have a value or not
  • Default Value: Default value of field in the case no value is entered.
  • More: The \"More\" button contains options for encryption and foreign keys

After these fields are filled, click \"Add Field\". Add as much field as you need. These fields serve as column titles for your table.

After creating a table you now have access to the tables list.


4. Add an Entry

Select the newly created Table and on the designated table page click on \"Add New Table Entry\"

Fill in the required fields and click on \"Add Entry\". Congrats, you have now created your first datasquirel data entry, you can now access this data from any platform using your api key.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/gui-reference/upload-media.html b/dsql-app/.local_dist/server/pages/docs/gui-reference/upload-media.html deleted file mode 100644 index ed558fe..0000000 --- a/dsql-app/.local_dist/server/pages/docs/gui-reference/upload-media.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/gui-reference/upload-media.json b/dsql-app/.local_dist/server/pages/docs/gui-reference/upload-media.json deleted file mode 100644 index fa20385..0000000 --- a/dsql-app/.local_dist/server/pages/docs/gui-reference/upload-media.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Upload Media","slug":"upload-media","description":"

Datasquirel comes baked with an integrated static file directory. This makes it easy to upload public and private files and access it from anywhere.

","content":"

Overview

Media management is a bigger problem than it sounds at first. Images tend to get out of hand when adding them to web projects: your images need to be well optimized for fast loading, easily accessible, and maintain clarity so that your website doesn't look like it's from the 80's. Datasquirel does this all for you in a few clicks.

Adding Media

Every datasquirel account is created with two directories for media storage: one is public, and the other is private. To start adding media, follow these steps:

1. Navigate to \"Media\" from your dashboard

If you created a database already, with an image for this database, your media folder will be pre-populated with a folder named after your database (test  in this case), and it will contain the image you uploaded when you created the database. 

2. Select Media files

To add a new media, click on Add Media button. This will open a modal for you to choose which type of media you want to add.

There are two options available at this time: Images, and Files. Image uploads only allow the image types listed in the description, the same applies with files. Click on the desired type and select the files you want to upload. You can upload multiple files at the same time.

3. Edit selected files and upload files

The next modal gives you the option to further change attributes of the images before uploading. These attributes include the image name, and privacy. Private images can only be accessed via out API using your Read Only or Full Access API keys.

After you're set, click on \"Upload Media\". This process uploads selected media to their respective directories. But that's not all, each media is compressed automatically, using a max width of 1800px, and each media comes with an automatically generated thumbnail. So For each image you upload, you have two images. The thumbnail image contains a suffix _thumbnail added to the original image's name.

After images have been uploaded, you can now copy the link for *public images and share anywhere, you can also copy the thumbnail link. NOTE, you cannot share private images publicly, private images don't have a public URL, they can only be accessed through OUR API with valid credentials.


Adding Folders

Adding folders help to better organize media. We currently have 2 depths of folder structure. So you can create a folder, and a sub-folder. To create a folder, simply navigate to your Media admin page and click \"Add Folder\".

Add a folder name and click \"Add New Folder\". Your new folder is now ready to go. Click on the new folder and you can upload images and files to that folder.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/quick-start.html b/dsql-app/.local_dist/server/pages/docs/quick-start.html deleted file mode 100644 index 2e51056..0000000 --- a/dsql-app/.local_dist/server/pages/docs/quick-start.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/docs/quick-start.json b/dsql-app/.local_dist/server/pages/docs/quick-start.json deleted file mode 100644 index a8ed6b9..0000000 --- a/dsql-app/.local_dist/server/pages/docs/quick-start.json +++ /dev/null @@ -1 +0,0 @@ -{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Quick Start","slug":"quick-start","description":"

Start saving and retrieving data now. Set up and start deploying in minutes.

","content":"

Starting up your Datasquirel instance

To get started with datasquirel you need an account online. The datasquirel npm module will hit this account via out API integration using your API credentials. Without an account, you cannout query any data on our API. Follow these steps to create an account:

1. Create Account

Create a free account here


2. Create Database

Navigate to your Dashboard or Databases page. Click the \"Add Database\" button to add a new database.

On the next screen that appears, fill in the form and add a database image if you wish. Click on \"Create Database\" to add the new database

Creating a new database takes you to the database page. This page allows you to import a pre-existing database using an SQL export file, or create a new table inside the newly-formed database. More operations for your database can be found in the database dropdown on the top left, or the \"more\" dropdown on the top right.

3. Add a table

Databases consists of Tables: each with fields(or columns) and entries(or rows). Select a database from your database list to access the single database pages. Click on \"Add Table\" and fill in the new table form.

On each table form you have access to the table fields(or column titles). Each field contains a few options:

  • Field Name: Name of field(or column title)
  • Data Type: type of data to be stored on that field: See All Datatypes
  • Required: Choose whether the field must have a value or not
  • Default Value: Default value of field in the case no value is entered.
  • More: The \"More\" button contains options for encryption and foreign keys

After these fields are filled, click \"Add Field\". Add as much field as you need. These fields serve as column titles for your table.

After creating a table you now have access to the tables list.


4. Add an Entry

Select the newly created Table and on the designated table page click on \"Add New Table Entry\"

Fill in the required fields and click on \"Add Entry\". Congrats, you have now created your first datasquirel data entry, you can now access this data from any platform using your api key.


Fetching Data

to start fetching data from your datasquirel account, you need to go through 3 steps:

1. Create an API key

Your api key is your gateway to all your data. There are two sets of API keys available for use: Read Only API keys, and Full Access API keys. They function as their names sound: Read only API keys only read data, Full Access API keys can read, write, delete, update, and also add media to your media storage directory.

To create an API key, follow these steps:

  • Login to your admin dashboard and navigate to \"API keys\" page

  • Click on \"Add API key\" and fill in the form. Give your API key a name and select which the scope you wich to cover with the key (\"Read Only\" for just reading data, \"Full Access\" for reading and writing data).

  • Once your API key is created, copy the API key by clicking \"Copy API key\". Keep this key safe and secured.


2. Use your API key to make a request

After creating your API key, then comes the backend section.

  • First add the datasquirel package via NPM

    npm install datasquirel
  • Next import the datasquirel module into your project, choose the database you will be querying, add your API key, and then run the query.

    const datasquirel = require(\"datasquirel\");\n\ndatasquirel\n    .get({\n        db: \"test\",\n        key: process.env.DATASQUIREL_READ_ONLY_KEY,\n        query: \"SELECT title, slug, body FROM blog_posts\",\n    })\n    .then((response) => {\n        console.log(response);\n    });

Read our API Reference for more.

"}},"__N_SSG":true} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/email-verification.js b/dsql-app/.local_dist/server/pages/email-verification.js index c6f3ff6..b5d9a6c 100644 --- a/dsql-app/.local_dist/server/pages/email-verification.js +++ b/dsql-app/.local_dist/server/pages/email-verification.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=6712,e.ids=[3220,6712],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},71956:(e,t,r)=>{r.r(t),r.d(t,{config:()=>O,default:()=>D,getServerSideProps:()=>N,getStaticPaths:()=>A,getStaticProps:()=>b,reportWebVitals:()=>k,routeModule:()=>$,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>M,unstable_getStaticParams:()=>w,unstable_getStaticPaths:()=>R,unstable_getStaticProps:()=>L});var s={};r.r(s),r.d(s,{default:()=>j,getServerSideProps:()=>P});var n=r(63865),i=r(9455),a=r(30671),o=r(49407),l=r(89600),c=r(8732),u=r(82015),d=r.n(u);r(27912);var p=r(20048),m=r.n(p),f=r(32415),g=r(63715),S=r(77463),x=r.n(S),_=r(71457),h=r(22373),y=r.n(h),E=r(67216),v=r.n(E);function j({user:e,verified:t}){let[r,s]=d().useState(!1),[n,i]=d().useState(null);return t?(0,c.jsx)(_.A,{head:(0,c.jsxs)(d().Fragment,{children:[(0,c.jsx)("title",{children:"Verify Email Address"}),(0,c.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:e,children:(0,c.jsx)("main",{className:"flex items-center justify-center w-full p-8",children:(0,c.jsx)("div",{className:"login-block gap-2",children:(0,c.jsxs)("div",{className:"flex items-center gap-4",children:[(0,c.jsx)("img",{src:"/images/checkmark.svg",alt:"check-mark",width:30}),(0,c.jsx)("span",{className:"text-xl",children:"Email Verification Successfull!"})]})})})}):(0,c.jsx)(d().Fragment,{children:(0,c.jsx)(_.A,{head:(0,c.jsxs)(d().Fragment,{children:[(0,c.jsx)("title",{children:"Verify Email Address"}),(0,c.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:e,children:(0,c.jsx)("main",{className:"flex flex-col items-center p-8 justify-center w-full",children:(0,c.jsxs)("div",{className:"login-block gap-2 flex-col max-w-lg",children:[n&&(0,c.jsx)("div",{className:n.class+" w-full rounded py-2 px-4 flex justify-center",children:n.msg}),r&&(0,c.jsx)(f.A,{position:"absolute"}),(0,c.jsx)("h1",{className:"text-2xl m-0 ",children:"Verify Email Address"}),(0,c.jsx)("span",{children:"Please click the button below to send verification link"}),(0,c.jsx)("button",{className:"w-full",onClick:function(e){e.preventDefault(),s(!0),(0,g.A)("/api/sendEmailVerificationLink").then(e=>{s(!1),e.success&&i({msg:"Email Sent. Please check mailbox",class:"bg-emerald-100"})})},children:(0,c.jsx)("span",{children:"Send Verification Link"})}),(0,c.jsx)("button",{className:"w-full outlined",onClick:e=>{window.history.back()},children:(0,c.jsx)("span",{children:"Go Back"})})]})})})})}async function P({req:e,res:t,query:r}){let s;let n=!1;try{s=await m()(e,t);let i=r?.token;if(i){let e=x()({encryptedString:i.toString()});if(e)try{s=JSON.parse(e)}catch(e){y()({component:"email-verification/index-page-component/getServerSideProps/line-255",message:e.message,user:{}}),s=null,i=null}}if(!s)return{redirect:{destination:"/logout",permanent:!1}};if(s.verification_status?.toString().match(/^[1-5]$/))return{redirect:{destination:"/admin",permanent:!1}};let a=await v()(`SELECT id FROM users WHERE verification_status > 0 AND id='${s.id}'`);if(a&&a[0])return{redirect:{destination:"/admin",permanent:!1}};if(s?.dateCode){let e=s.dateCode;Date.now()-parseInt(e)>18e5?(s=null,i=null):(await v()(`UPDATE users SET verification_status='1' WHERE id='${s.id}'`),n=!0)}}catch(e){return y()({component:"email-verification/index-page-component/getServerSideProps/main-catch-error",message:e.message,user:{}}),{redirect:{destination:"/logout",permanent:!1}}}return{props:{user:s,verified:n}}}let D=(0,a.M)(s,"default"),b=(0,a.M)(s,"getStaticProps"),A=(0,a.M)(s,"getStaticPaths"),N=(0,a.M)(s,"getServerSideProps"),O=(0,a.M)(s,"config"),k=(0,a.M)(s,"reportWebVitals"),L=(0,a.M)(s,"unstable_getStaticProps"),R=(0,a.M)(s,"unstable_getStaticPaths"),w=(0,a.M)(s,"unstable_getStaticParams"),I=(0,a.M)(s,"unstable_getServerProps"),M=(0,a.M)(s,"unstable_getServerSideProps"),$=new n.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/email-verification",pathname:"/email-verification",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:s})},20048:(e,t,r)=>{r(81630);let s=r(67216),n=r(77463),i=r(29021),a=r(6505);async function o(e,t,r,o){let{keyCookieName:l,csrfCookieName:c}=a();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!i.existsSync(`${p}/${d.csrf_k}`))return null;if(0==d.verification_status&&!r){let e=await s(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},6505:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=t;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=r;let o=t;e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),o+=s;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),{keyCookieName:a,csrfCookieName:o,oneTimeCodeName:l+=n}}},22373:(e,t,r)=>{let s=r(29021),{IncomingMessage:n}=r(81630);e.exports=async function({user:e,message:t,component:r,noMail:n,req:i}){let a=new Date,o=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],t=i.headers["x-real-ip"],r=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=r||s||t||i.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=6712,e.ids=[3220,6712],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},70852:(e,t,r)=>{r.r(t),r.d(t,{config:()=>A,default:()=>E,getServerSideProps:()=>P,getStaticPaths:()=>j,getStaticProps:()=>v,reportWebVitals:()=>b,routeModule:()=>I,unstable_getServerProps:()=>O,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>k,unstable_getStaticPaths:()=>D,unstable_getStaticProps:()=>N});var s={};r.r(s),r.d(s,{default:()=>_,getServerSideProps:()=>y});var n=r(63865),i=r(9455),a=r(30671),l=r(5583),o=r(19796),c=r(8732),u=r(82015),d=r.n(u),m=r(92702),p=r(16757),f=r(46169),g=r(71205),h=r(1013),S=r(77047),x=r(71934);function _({user:e,verified:t}){let[r,s]=d().useState(!1),[n,i]=d().useState(null);return t?(0,c.jsx)(h.A,{head:(0,c.jsxs)(d().Fragment,{children:[(0,c.jsx)("title",{children:"Verify Email Address"}),(0,c.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:e,children:(0,c.jsx)("main",{className:"flex items-center justify-center w-full p-8",children:(0,c.jsx)("div",{className:"login-block gap-2",children:(0,c.jsxs)("div",{className:"flex items-center gap-4",children:[(0,c.jsx)("img",{src:"/images/checkmark.svg",alt:"check-mark",width:30}),(0,c.jsx)("span",{className:"text-xl",children:"Email Verification Successfull!"})]})})})}):(0,c.jsx)(d().Fragment,{children:(0,c.jsx)(h.A,{head:(0,c.jsxs)(d().Fragment,{children:[(0,c.jsx)("title",{children:"Verify Email Address"}),(0,c.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:e,children:(0,c.jsx)("main",{className:"flex flex-col items-center p-8 justify-center w-full",children:(0,c.jsxs)("div",{className:"login-block gap-2 flex-col max-w-lg",children:[n&&(0,c.jsx)("div",{className:n.class+" w-full rounded py-2 px-4 flex justify-center",children:n.msg}),r&&(0,c.jsx)(p.A,{position:"absolute"}),(0,c.jsx)("h1",{className:"text-2xl m-0 ",children:"Verify Email Address"}),(0,c.jsx)("span",{children:"Please click the button below to send verification link"}),(0,c.jsx)("button",{className:"w-full",onClick:function(e){e.preventDefault(),s(!0),(0,f.A)("/api/sendEmailVerificationLink").then(e=>{s(!1),e.success&&i({msg:"Email Sent. Please check mailbox",class:"bg-emerald-100"})})},children:(0,c.jsx)("span",{children:"Send Verification Link"})}),(0,c.jsx)("button",{className:"w-full outlined",onClick:e=>{window.history.back()},children:(0,c.jsx)("span",{children:"Go Back"})})]})})})})}async function y({req:e,res:t,query:r}){let s;let n=!1;try{s=await (0,m.default)(e,t);let i=r?.token;if(i){let e=(0,g.A)({encryptedString:i.toString()});if(e)try{s=JSON.parse(e)}catch(e){(0,S.A)({component:"email-verification/index-page-component/getServerSideProps/line-255",message:e.message,user:{}}),s=null,i=null}}if(!s)return{redirect:{destination:"/logout",permanent:!1}};if(s.verification_status?.toString().match(/^[1-5]$/))return{redirect:{destination:"/admin",permanent:!1}};let a=await (0,x.A)(`SELECT id FROM users WHERE verification_status > 0 AND id='${s.id}'`);if(a&&a[0])return{redirect:{destination:"/admin",permanent:!1}};if(s?.dateCode){let e=s.dateCode;Date.now()-parseInt(e)>18e5?(s=null,i=null):(await (0,x.A)(`UPDATE users SET verification_status='1' WHERE id='${s.id}'`),n=!0)}}catch(e){return(0,S.A)({component:"email-verification/index-page-component/getServerSideProps/main-catch-error",message:e.message,user:{}}),{redirect:{destination:"/logout",permanent:!1}}}return{props:{user:s,verified:n}}}let E=(0,a.M)(s,"default"),v=(0,a.M)(s,"getStaticProps"),j=(0,a.M)(s,"getStaticPaths"),P=(0,a.M)(s,"getServerSideProps"),A=(0,a.M)(s,"config"),b=(0,a.M)(s,"reportWebVitals"),N=(0,a.M)(s,"unstable_getStaticProps"),D=(0,a.M)(s,"unstable_getStaticPaths"),k=(0,a.M)(s,"unstable_getStaticParams"),O=(0,a.M)(s,"unstable_getServerProps"),w=(0,a.M)(s,"unstable_getServerSideProps"),I=new n.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/email-verification",pathname:"/email-verification",bundlePath:"",filename:""},components:{App:o.default,Document:l.default},userland:s})},92702:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var s=r(71934),n=r(71205),i=r(29021),a=r.n(i),l=r(41939);async function o(e,t,r){let{keyCookieName:i,csrfCookieName:o}=(0,l.A)();if(!e.cookies?.[i]?.match(/./))return null;let c=(0,n.A)({encryptedString:e.cookies[i]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!a().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!r){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},41939:(e,t,r)=>{r.d(t,{A:()=>s});function s(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",i=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=t;e?.userId&&(a+=`user_${e.userId}_`),i&&(a+=`${i}_`),a+=r;let l=t;e?.userId&&(l+=`user_${e.userId}_`),i&&(l+=`${i}_`),l+=s;let o=t;return e?.userId&&(o+=`user_${e.userId}_`),i&&(o+=`${i}_`),{keyCookieName:a,csrfCookieName:l,oneTimeCodeName:o+=n}}},77047:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(29021),n=r.n(s);async function i({user:e,message:t,component:r,noMail:s,req:i}){let a=new Date,l=(()=>{if(!i)return null;try{let e=i.headers["x-forwarded-for"],t=i.headers["x-real-ip"],r=i.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=r||s||t||i.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== Error Message: ${t} -Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),i?.url&&(n+=` -URL: ${i.url}`),i?.body&&(n+=` -Request Body: ${JSON.stringify(i.body,null,4)}`),o&&(n+=` -IP: ${o}`),n+=` +User Email: ${e?.email}`),i?.url&&(s+=` +URL: ${i.url}`),i?.body&&(s+=` +Request Body: ${JSON.stringify(i.body,null,4)}`),l&&(s+=` +IP: ${l}`),s+=` Date: ${a.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let o=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},77463:(e,t,r)=>{let{scryptSync:s,createDecipheriv:n}=r(55511),{Buffer:i}=r(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(a,o,l),i.alloc(16,0));try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},67216:(e,t,r)=>{let s=r(9973),n=r(31976),i=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let t=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},31976:(e,t,r)=>{let s=r(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!s.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var s=r(8732);r(82015);var n=r(20883);function i(e){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600],()=>r(71956));module.exports=s})(); \ No newline at end of file +${o}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},71205:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(55511),n=r(79428);function i({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=t||process.env.DSQL_ENCRYPTION_PASSWORD,a=r||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!a?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let o=(0,s.scryptSync)(i,a,l),c=n.Buffer.alloc(16,0),u=(0,s.createDecipheriv)("aes-192-cbc",o,c);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,r)=>{r.d(t,{A:()=>s});async function s(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},5583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var s=r(8732);r(82015);var n=r(20883);function i(){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796],()=>r(70852));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/email-verification.js.nft.json b/dsql-app/.local_dist/server/pages/email-verification.js.nft.json index 679446f..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/email-verification.js.nft.json +++ b/dsql-app/.local_dist/server/pages/email-verification.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/index.html b/dsql-app/.local_dist/server/pages/index.html index 7a96065..8692985 100644 --- a/dsql-app/.local_dist/server/pages/index.html +++ b/dsql-app/.local_dist/server/pages/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/index.js.nft.json b/dsql-app/.local_dist/server/pages/index.js.nft.json index 04e7761..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/index.js.nft.json +++ b/dsql-app/.local_dist/server/pages/index.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/login.js b/dsql-app/.local_dist/server/pages/login.js index f1ee009..201dcfa 100644 --- a/dsql-app/.local_dist/server/pages/login.js +++ b/dsql-app/.local_dist/server/pages/login.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=676,e.ids=[676,3220],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},12037:(e,t,s)=>{s.r(t),s.d(t,{config:()=>O,default:()=>N,getServerSideProps:()=>L,getStaticPaths:()=>A,getStaticProps:()=>D,reportWebVitals:()=>I,routeModule:()=>k,unstable_getServerProps:()=>T,unstable_getServerSideProps:()=>Q,unstable_getStaticParams:()=>R,unstable_getStaticPaths:()=>M,unstable_getStaticProps:()=>q});var r={};s.r(r),s.d(r,{default:()=>w,getServerSideProps:()=>E});var n=s(63865),a=s(9455),i=s(30671),o=s(49407),l=s(89600),c=s(8732),u=s(82015),d=s.n(u),p=s(27912),m=s.n(p),x=s(76601),f=s(63715);async function g({e,setAlert:t,setLoading:s,query:r}){e.preventDefault(),s(!0);let n=e.target["email-or-username-input"],a=e.target.password;if(n?.value===""&&a?.value===""){n.classList.add("warning"),a.classList.add("warning"),t("No Email or Password Provided"),s(!1);return}if(a?.value===""){t(!1),a.classList.add("warning"),t(!0),s(!1);return}n.classList.remove("warning"),a.classList.remove("warning"),t(!1);let i={email:n.value,password:a.value,query:r};(0,f.A)("/api/loginUser",{method:"post",body:i}).then(async e=>{console.log(e),e.user&&e.user.auth?(localStorage.setItem("userid",e.user.userid),localStorage.setItem("csrf",e.user.csrf_k),localStorage.setItem("user",JSON.stringify(e.userPayload)),(0,x.A)().then(()=>{window.location.reload()})):(t(e.msg),s(!1))})}var h=s(32415),_=s(72414);let v=d().createContext({});function S({user:e,query:t}){let[s,r]=(0,u.useState)(null),[n,a]=(0,u.useState)(!1);return(0,c.jsxs)(v.Provider,{value:{loading:n,setLoading:a,alert:s,setAlert:r,user:e},children:[(0,c.jsx)(_.A,{user:e,userType:"admin",setLoading:a}),(0,c.jsxs)("div",{className:"w-full justify-center relative",children:[(0,c.jsx)("span",{className:"bg-white dark:bg-slate-800 px-3 relative z-10",children:"OR"}),(0,c.jsx)("hr",{className:"absolute"})]}),(0,c.jsxs)("div",{className:"w-full flex-col items-stretch gap-4",children:[n&&(0,c.jsx)(h.A,{}),s&&(0,c.jsx)("div",{className:"p-2 justify-center text-sm border border-solid border-orange-400 rounded bg-orange-50",children:s}),(0,c.jsxs)("form",{className:"flex flex-col gap-2 w-full",onSubmit:e=>{g({e,setAlert:r,setLoading:a,query:t})},children:[(0,c.jsx)("input",{type:"text",name:"email-or-username-input",id:"email-or-username-input",placeholder:"Email or username",defaultValue:t?.email?t.email:"",required:!0,onInput:e=>{s&&r(!1)}}),(0,c.jsx)("input",{type:"password",name:"password",id:"password-input",placeholder:"Password",required:!0,onInput:e=>{s&&r(!1)}}),(0,c.jsx)("button",{type:"submit",children:"Login"})]}),(0,c.jsx)("div",{className:"flex flex-col items-center w-full mb-2",children:(0,c.jsx)("a",{href:"/send-password-reset-link",className:"text-secondary font-semibold",children:"Forgot Password?"})}),(0,c.jsxs)("div",{className:"flex items-center gap-2 justify-center w-full mb-2 flex-wrap",children:[(0,c.jsx)("span",{children:"Dont have an account yet?"}),(0,c.jsx)("a",{href:"/create-account",className:"text-secondary font-semibold",children:"Register Now"})]}),(0,c.jsxs)("div",{className:"justify-center text-sm text-secondary",children:[(0,c.jsx)("a",{href:"/terms",className:"text-secondary",children:"Terms and Conditions"}),(0,c.jsx)("a",{href:"/privacy",className:"text-secondary",children:"Privacy Policy"})]})]})]})}var j=s(20048),y=s.n(j),P=s(93353),b=s(55966);function w(e){return e.query.invite&&e.user?(0,c.jsx)(b.A,{}):(0,c.jsxs)(d().Fragment,{children:[(0,c.jsxs)(m(),{children:[(0,c.jsx)("title",{children:"Login to your account"}),(0,c.jsx)("meta",{name:"description",content:"Login to your account"})]}),(0,c.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,c.jsxs)("div",{className:"card col items-center no-hover max-w-md w-full bg-white p-4 sm:p-6 overflow-auto minimal-scrollbars",style:{maxHeight:"calc(100vh - 40px)"},children:[(0,c.jsx)(P.A,{}),(0,c.jsx)("hr",{}),(0,c.jsx)("h3",{className:"m-0 text-lg font-semibold",children:"Login to your account"}),(0,c.jsx)(S,{user:e.user,query:e.query})]})})]})}async function E({req:e,res:t,query:s}){let r=await y()(e,t);return r?{redirect:{destination:"/admin",permanent:!1}}:{props:{user:r,query:s}}}let N=(0,i.M)(r,"default"),D=(0,i.M)(r,"getStaticProps"),A=(0,i.M)(r,"getStaticPaths"),L=(0,i.M)(r,"getServerSideProps"),O=(0,i.M)(r,"config"),I=(0,i.M)(r,"reportWebVitals"),q=(0,i.M)(r,"unstable_getStaticProps"),M=(0,i.M)(r,"unstable_getStaticPaths"),R=(0,i.M)(r,"unstable_getStaticParams"),T=(0,i.M)(r,"unstable_getServerProps"),Q=(0,i.M)(r,"unstable_getServerSideProps"),k=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/login",pathname:"/login",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:r})},55966:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(8732);s(82015);var n=s(32415);function a(){return(0,r.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,r.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,r.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,r.jsx)(n.A,{width:"25px",position:"relative"})})]})})}},20048:(e,t,s)=>{s(81630);let r=s(67216),n=s(77463),a=s(29021),i=s(6505);async function o(e,t,s,o){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a.existsSync(`${p}/${d.csrf_k}`))return null;if(0==d.verification_status&&!s){let e=await r(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},6505:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=n}}},77463:(e,t,s)=>{let{scryptSync:r,createDecipheriv:n}=s(55511),{Buffer:a}=s(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",r(i,o,l),a.alloc(16,0));try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},67216:(e,t,s)=>{let r=s(9973),n=s(31976),a=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},31976:(e,t,s)=>{let r=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!r.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(8732);s(82015);var n=s(20883);function a(e){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600,2414],()=>s(12037));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=676,e.ids=[676,3220],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},45581:(e,t,s)=>{s.r(t),s.d(t,{config:()=>D,default:()=>E,getServerSideProps:()=>L,getStaticPaths:()=>A,getStaticProps:()=>N,reportWebVitals:()=>I,routeModule:()=>T,unstable_getServerProps:()=>k,unstable_getServerSideProps:()=>C,unstable_getStaticParams:()=>M,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>O});var r={};s.r(r),s.d(r,{default:()=>b,getServerSideProps:()=>w});var a=s(63865),n=s(9455),i=s(30671),o=s(5583),l=s(19796),c=s(8732),u=s(82015),d=s.n(u),m=s(27912),p=s.n(m),f=s(45731),g=s(46169);async function x({e,setAlert:t,setLoading:s,query:r}){e.preventDefault(),s(!0);let a=e.target["email-or-username-input"],n=e.target.password;if(a?.value===""&&n?.value===""){a.classList.add("warning"),n.classList.add("warning"),t("No Email or Password Provided"),s(!1);return}if(n?.value===""){t(!1),n.classList.add("warning"),t(!0),s(!1);return}a.classList.remove("warning"),n.classList.remove("warning"),t(!1);let i={email:a.value,password:n.value,query:r};(0,g.A)("/api/loginUser",{method:"post",body:i}).then(async e=>{console.log(e),e.user&&e.user.auth?(localStorage.setItem("userid",e.user.userid),localStorage.setItem("csrf",e.user.csrf_k),localStorage.setItem("user",JSON.stringify(e.userPayload)),(0,f.A)().then(()=>{window.location.reload()})):(t(e.msg),s(!1))})}var h=s(16757),y=s(5406);let v=d().createContext({});function _({user:e,query:t}){let[s,r]=(0,u.useState)(!1),[a,n]=(0,u.useState)(!1);return(0,c.jsxs)(v.Provider,{value:{loading:a,setLoading:n,alert:s,setAlert:r,user:e},children:[(0,c.jsx)(y.A,{user:e,userType:"admin",setLoading:n}),(0,c.jsxs)("div",{className:"w-full justify-center relative",children:[(0,c.jsx)("span",{className:"bg-white dark:bg-slate-800 px-3 relative z-10",children:"OR"}),(0,c.jsx)("hr",{className:"absolute"})]}),(0,c.jsxs)("div",{className:"w-full flex-col items-stretch gap-4",children:[a&&(0,c.jsx)(h.A,{}),s&&(0,c.jsx)("div",{className:"p-2 justify-center text-sm border border-solid border-orange-400 rounded bg-orange-50",children:s}),(0,c.jsxs)("form",{className:"flex flex-col gap-2 w-full",onSubmit:e=>{x({e,setAlert:r,setLoading:n,query:t})},children:[(0,c.jsx)("input",{type:"text",name:"email-or-username-input",id:"email-or-username-input",placeholder:"Email or username",defaultValue:t?.email?t.email:"",required:!0,onInput:e=>{s&&r(!1)}}),(0,c.jsx)("input",{type:"password",name:"password",id:"password-input",placeholder:"Password",required:!0,onInput:e=>{s&&r(!1)}}),(0,c.jsx)("button",{type:"submit",children:"Login"})]}),(0,c.jsx)("div",{className:"flex flex-col items-center w-full mb-2",children:(0,c.jsx)("a",{href:"/send-password-reset-link",className:"text-secondary font-semibold",children:"Forgot Password?"})}),(0,c.jsxs)("div",{className:"flex items-center gap-2 justify-center w-full mb-2 flex-wrap",children:[(0,c.jsx)("span",{children:"Dont have an account yet?"}),(0,c.jsx)("a",{href:"/create-account",className:"text-secondary font-semibold",children:"Register Now"})]}),(0,c.jsxs)("div",{className:"justify-center text-sm text-secondary",children:[(0,c.jsx)("a",{href:"/terms",className:"text-secondary",children:"Terms and Conditions"}),(0,c.jsx)("a",{href:"/privacy",className:"text-secondary",children:"Privacy Policy"})]})]})]})}var j=s(92702),S=s(50139),P=s(32572);function b(e){return e.query.invite&&e.user?(0,c.jsx)(P.A,{}):(0,c.jsxs)(d().Fragment,{children:[(0,c.jsxs)(p(),{children:[(0,c.jsx)("title",{children:"Login to your account"}),(0,c.jsx)("meta",{name:"description",content:"Login to your account"})]}),(0,c.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,c.jsxs)("div",{className:"card col items-center no-hover max-w-md w-full bg-white p-4 sm:p-6 overflow-auto minimal-scrollbars",style:{maxHeight:"calc(100vh - 40px)"},children:[(0,c.jsx)(S.A,{}),(0,c.jsx)("hr",{}),(0,c.jsx)("h3",{className:"m-0 text-lg font-semibold",children:"Login to your account"}),(0,c.jsx)(_,{user:e.user,query:e.query})]})})]})}async function w({req:e,res:t,query:s}){let r=await (0,j.default)(e,t);return r?{redirect:{destination:"/admin",permanent:!1}}:{props:{user:r,query:s}}}let E=(0,i.M)(r,"default"),N=(0,i.M)(r,"getStaticProps"),A=(0,i.M)(r,"getStaticPaths"),L=(0,i.M)(r,"getServerSideProps"),D=(0,i.M)(r,"config"),I=(0,i.M)(r,"reportWebVitals"),O=(0,i.M)(r,"unstable_getStaticProps"),q=(0,i.M)(r,"unstable_getStaticPaths"),M=(0,i.M)(r,"unstable_getStaticParams"),k=(0,i.M)(r,"unstable_getServerProps"),C=(0,i.M)(r,"unstable_getServerSideProps"),T=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/login",pathname:"/login",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:r})},32572:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(8732);s(82015);var a=s(16757);function n(){return(0,r.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,r.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,r.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,r.jsx)(a.A,{width:"25px",position:"relative"})})]})})}},5406:(e,t,s)=>{function r({user:e,userType:t,setLoading:s}){return null}s.d(t,{A:()=>r}),s(8732),s(82015),s(46169),s(45731)},92702:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var r=s(71934),a=s(71205),n=s(29021),i=s.n(n),o=s(41939);async function l(e,t,s){let{keyCookieName:n,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[n]?.match(/./))return null;let c=(0,a.A)({encryptedString:e.cookies[n]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!s){let e=await (0,r.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},45731:(e,t,s)=>{s.d(t,{A:()=>r});async function r(){try{let e=await caches.keys();e[0]&&await Promise.all(e.map(e=>caches.delete(e)))}catch(e){console.log("Error in clearing cache =>",e.message)}}},41939:(e,t,s)=>{s.d(t,{A:()=>r});function r(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=r;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=a}}},71205:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(55511),a=s(79428);function n({encryptedString:e,encryptionKey:t,encryptionSalt:s}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,r.scryptSync)(n,i,o),c=a.Buffer.alloc(16,0),u=(0,r.createDecipheriv)("aes-192-cbc",l,c);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,s)=>{s.d(t,{A:()=>r});async function r(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},5583:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var r=s(8732);s(82015);var a=s(20883);function n(){return(0,r.jsxs)(a.Html,{lang:"en",children:[(0,r.jsxs)(a.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(a.Main,{}),(0,r.jsx)(a.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796],()=>s(45581));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/login.js.nft.json b/dsql-app/.local_dist/server/pages/login.js.nft.json index 679446f..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/login.js.nft.json +++ b/dsql-app/.local_dist/server/pages/login.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/logout.js b/dsql-app/.local_dist/server/pages/logout.js index e5736ad..97c5fdd 100644 --- a/dsql-app/.local_dist/server/pages/logout.js +++ b/dsql-app/.local_dist/server/pages/logout.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=7122,e.ids=[3220,7122],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},9247:(e,t,s)=>{s.r(t),s.d(t,{config:()=>b,default:()=>E,getServerSideProps:()=>D,getStaticPaths:()=>j,getStaticProps:()=>y,reportWebVitals:()=>A,routeModule:()=>q,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>M,unstable_getStaticParams:()=>N,unstable_getStaticPaths:()=>O,unstable_getStaticProps:()=>L});var r={};s.r(r),s.d(r,{default:()=>P,getServerSideProps:()=>v});var n=s(63865),o=s(9455),a=s(30671),i=s(49407),c=s(89600),l=s(8732),u=s(82015),p=s.n(u),m=s(27912),d=s.n(m),g=s(29021),_=s.n(g);s(63715),s(76601);var f=s(32415),S=s(6505),h=s.n(S);let x=s(20048);function P({user:e,query:t}){let s=(0,l.jsxs)(p().Fragment,{children:[(0,l.jsx)("title",{children:"Loging Out | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Login you out"}),(0,l.jsx)("script",{src:"https://accounts.google.com/gsi/client"}),(0,l.jsx)("script",{src:"https://connect.facebook.net/en_US/sdk.js",crossOrigin:"anonymous"})]});return(0,l.jsxs)(p().Fragment,{children:[(0,l.jsx)(d(),{children:s}),(0,l.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,l.jsxs)("div",{className:"card max-w-md flex-col items-center bg-white p-6 rounded border border-slate-200 border-solid",children:[(0,l.jsxs)("a",{href:"/",className:"flex items-center gap-2",children:[(0,l.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37}),(0,l.jsx)("span",{className:"font-bold text-2xl",children:"Datasquirel"})]}),(0,l.jsx)("h3",{className:"text-lg m-0 mt-4 text-slate-400",children:"Logging out"}),(0,l.jsx)(f.A,{position:"relative",width:"20px"})]})})]})}async function v({req:e,res:t,query:s}){let r=await x(e,t);if(r){console.log(r.csrf_k);try{let e=process.env.DSQL_USER_LOGIN_KEYS_PATH,t=`${e}/${r.csrf_k}`;console.log("allowedAuthKeyPath",t),_().unlinkSync(t)}catch(e){console.log(`Logout API error: ${e.message}`)}}let{keyCookieName:n,csrfCookieName:o}=h()();return t.setHeader("Set-Cookie",[`${n}=none;max-age=0`,`${o}=null;max-age=0`]),{props:{user:r,logged_out:!0,query:s}}}let E=(0,a.M)(r,"default"),y=(0,a.M)(r,"getStaticProps"),j=(0,a.M)(r,"getStaticPaths"),D=(0,a.M)(r,"getServerSideProps"),b=(0,a.M)(r,"config"),A=(0,a.M)(r,"reportWebVitals"),L=(0,a.M)(r,"unstable_getStaticProps"),O=(0,a.M)(r,"unstable_getStaticPaths"),N=(0,a.M)(r,"unstable_getStaticParams"),I=(0,a.M)(r,"unstable_getServerProps"),M=(0,a.M)(r,"unstable_getServerSideProps"),q=new n.PagesRouteModule({definition:{kind:o.A.PAGES,page:"/logout",pathname:"/logout",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:r})},20048:(e,t,s)=>{s(81630);let r=s(67216),n=s(77463),o=s(29021),a=s(6505);async function i(e,t,s,i){let{keyCookieName:c,csrfCookieName:l}=a();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let m=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!m)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!o.existsSync(`${m}/${p.csrf_k}`))return null;if(0==p.verification_status&&!s){let e=await r(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=i},76601:(e,t,s)=>{s.d(t,{A:()=>r});async function r(){try{let e=await caches.keys();e[0]&&await Promise.all(e.map(e=>caches.delete(e)))}catch(e){console.log("Error in clearing cache =>",e.message)}}},6505:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",o=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=t;e?.userId&&(a+=`user_${e.userId}_`),o&&(a+=`${o}_`),a+=s;let i=t;e?.userId&&(i+=`user_${e.userId}_`),o&&(i+=`${o}_`),i+=r;let c=t;return e?.userId&&(c+=`user_${e.userId}_`),o&&(c+=`${o}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:c+=n}}},77463:(e,t,s)=>{let{scryptSync:r,createDecipheriv:n}=s(55511),{Buffer:o}=s(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",r(a,i,c),o.alloc(16,0));try{let t=l.update(e,"hex","utf8");return t+=l.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},67216:(e,t,s)=>{let r=s(9973),n=s(31976),o=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function a(...e){try{let t=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},31976:(e,t,s)=>{let r=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!r.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o});var r=s(8732);s(82015);var n=s(20883);function o(e){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600],()=>s(9247));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=7122,e.ids=[3220,7122],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},92192:(e,t,r)=>{r.r(t),r.d(t,{config:()=>A,default:()=>y,getServerSideProps:()=>v,getStaticPaths:()=>E,getStaticProps:()=>j,reportWebVitals:()=>b,routeModule:()=>M,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>L,unstable_getStaticParams:()=>O,unstable_getStaticPaths:()=>D,unstable_getStaticProps:()=>N});var s={};r.r(s),r.d(s,{default:()=>S,getServerSideProps:()=>P});var n=r(63865),a=r(9455),o=r(30671),i=r(5583),c=r(19796),l=r(8732),u=r(82015),p=r.n(u),d=r(27912),m=r.n(d),g=r(29021),f=r.n(g);r(46169),r(45731);var _=r(16757),h=r(41939);let x=r(92702);function S({user:e,query:t}){let r=(0,l.jsxs)(p().Fragment,{children:[(0,l.jsx)("title",{children:"Loging Out | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Login you out"}),(0,l.jsx)("script",{src:"https://accounts.google.com/gsi/client"}),(0,l.jsx)("script",{src:"https://connect.facebook.net/en_US/sdk.js",crossOrigin:"anonymous"})]});return(0,l.jsxs)(p().Fragment,{children:[(0,l.jsx)(m(),{children:r}),(0,l.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,l.jsxs)("div",{className:"card max-w-md flex-col items-center bg-white p-6 rounded border border-slate-200 border-solid",children:[(0,l.jsxs)("a",{href:"/",className:"flex items-center gap-2",children:[(0,l.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37}),(0,l.jsx)("span",{className:"font-bold text-2xl",children:"Datasquirel"})]}),(0,l.jsx)("h3",{className:"text-lg m-0 mt-4 text-slate-400",children:"Logging out"}),(0,l.jsx)(_.A,{position:"relative",width:"20px"})]})})]})}async function P({req:e,res:t,query:r}){let s=await x(e,t);if(s){console.log(s.csrf_k);try{let e=process.env.DSQL_USER_LOGIN_KEYS_PATH,t=`${e}/${s.csrf_k}`;console.log("allowedAuthKeyPath",t),f().unlinkSync(t)}catch(e){console.log(`Logout API error: ${e.message}`)}}let{keyCookieName:n,csrfCookieName:a}=(0,h.A)();return t.setHeader("Set-Cookie",[`${n}=none;max-age=0`,`${a}=null;max-age=0`]),{props:{user:s,logged_out:!0,query:r}}}let y=(0,o.M)(s,"default"),j=(0,o.M)(s,"getStaticProps"),E=(0,o.M)(s,"getStaticPaths"),v=(0,o.M)(s,"getServerSideProps"),A=(0,o.M)(s,"config"),b=(0,o.M)(s,"reportWebVitals"),N=(0,o.M)(s,"unstable_getStaticProps"),D=(0,o.M)(s,"unstable_getStaticPaths"),O=(0,o.M)(s,"unstable_getStaticParams"),I=(0,o.M)(s,"unstable_getServerProps"),L=(0,o.M)(s,"unstable_getServerSideProps"),M=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/logout",pathname:"/logout",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:s})},92702:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var s=r(71934),n=r(71205),a=r(29021),o=r.n(a),i=r(41939);async function c(e,t,r){let{keyCookieName:a,csrfCookieName:c}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let l=(0,n.A)({encryptedString:e.cookies[a]});if(!l)return null;let u=JSON.parse(l);if(!u.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!o().existsSync(`${p}/${u.csrf_k}`))return null;if(0==u.verification_status&&!r){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},45731:(e,t,r)=>{r.d(t,{A:()=>s});async function s(){try{let e=await caches.keys();e[0]&&await Promise.all(e.map(e=>caches.delete(e)))}catch(e){console.log("Error in clearing cache =>",e.message)}}},41939:(e,t,r)=>{r.d(t,{A:()=>s});function s(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let c=t;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:c+=n}}},71205:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(55511),n=r(79428);function a({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,s.scryptSync)(a,o,i),l=n.Buffer.alloc(16,0),u=(0,s.createDecipheriv)("aes-192-cbc",c,l);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,r)=>{r.d(t,{A:()=>s});async function s(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},5583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(8732);r(82015);var n=r(20883);function a(){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796],()=>r(92192));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/logout.js.nft.json b/dsql-app/.local_dist/server/pages/logout.js.nft.json index 679446f..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/logout.js.nft.json +++ b/dsql-app/.local_dist/server/pages/logout.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/privacy.html b/dsql-app/.local_dist/server/pages/privacy.html index b024637..beb1ced 100644 --- a/dsql-app/.local_dist/server/pages/privacy.html +++ b/dsql-app/.local_dist/server/pages/privacy.html @@ -1 +1 @@ -Privacy Policy | Datasquirel

Privacy Policy

Privacy Policy for Datasquirel
Dotted image background

At datasquirel.com, accessible from https://datasquirel.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by datasquirel.com and how we use it.

If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.

This Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in datasquirel.com. This policy is not applicable to any information collected offline or via channels other than this website.

Consent

By using our website, you hereby consent to our Privacy Policy and agree to its terms.

Information we collect

The personal information that you are asked to provide, and the reasons why you are asked to provide it, will be made clear to you at the point we ask you to provide your personal information.

If you contact us directly, we may receive additional information about you such as your name, email address, phone number, the contents of the message and/or attachments you may send us, and any other information you may choose to provide.

When you register for an Account, we may ask for your contact information, including items such as name, company name, address, email address, and telephone number.

How we use your information

We use the information we collect in various ways, including to:

  • Provide, operate, and maintain our website
  • Improve, personalize, and expand our website
  • Understand and analyze how you use our website
  • Develop new products, services, features, and functionality
  • Communicate with you, either directly or through one of our partners, including for customer service, to provide you with updates and other information relating to the website, and for marketing and promotional purposes
  • Send you emails
  • Find and prevent fraud

Log Files

datasquirel.com follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users' movement on the website, and gathering demographic information.

Cookies and Web Beacons

Like any other website, datasquirel.com uses 'cookies'. These cookies are used to store information including visitors' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users' experience by customizing our web page content based on visitors' browser type and/or other information.

Advertising Partners Privacy Policies

You may consult this list to find the Privacy Policy for each of the advertising partners of datasquirel.com.

Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on datasquirel.com, which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.

Note that datasquirel.com has no access to or control over these cookies that are used by third-party advertisers.

Third Party Privacy Policies

datasquirel.com's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options.

You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers' respective websites.

CCPA Privacy Rights (Do Not Sell My Personal Information)

Under the CCPA, among other rights, California consumers have the right to:

Request that a business that collects a consumer's personal data disclose the categories and specific pieces of personal data that a business has collected about consumers.

Request that a business delete any personal data about the consumer that a business has collected.

Request that a business that sells a consumer's personal data, not sell the consumer's personal data.

If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.

GDPR Data Protection Rights

We would like to make sure you are fully aware of all of your data protection rights. Every user is entitled to the following:

The right to access – You have the right to request copies of your personal data. We may charge you a small fee for this service.

The right to rectification – You have the right to request that we correct any information you believe is inaccurate. You also have the right to request that we complete the information you believe is incomplete.

The right to erasure – You have the right to request that we erase your personal data, under certain conditions.

The right to restrict processing – You have the right to request that we restrict the processing of your personal data, under certain conditions.

The right to object to processing – You have the right to object to our processing of your personal data, under certain conditions.

The right to data portability – You have the right to request that we transfer the data that we have collected to another organization, or directly to you, under certain conditions.

If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.

Children's Information

Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.

datasquirel.com does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.

\ No newline at end of file +Privacy Policy | Datasquirel

Privacy Policy

Privacy Policy for Datasquirel
Dotted image background

At datasquirel.com, accessible from https://datasquirel.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by datasquirel.com and how we use it.

If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.

This Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in datasquirel.com. This policy is not applicable to any information collected offline or via channels other than this website.

Consent

By using our website, you hereby consent to our Privacy Policy and agree to its terms.

Information we collect

The personal information that you are asked to provide, and the reasons why you are asked to provide it, will be made clear to you at the point we ask you to provide your personal information.

If you contact us directly, we may receive additional information about you such as your name, email address, phone number, the contents of the message and/or attachments you may send us, and any other information you may choose to provide.

When you register for an Account, we may ask for your contact information, including items such as name, company name, address, email address, and telephone number.

How we use your information

We use the information we collect in various ways, including to:

  • Provide, operate, and maintain our website
  • Improve, personalize, and expand our website
  • Understand and analyze how you use our website
  • Develop new products, services, features, and functionality
  • Communicate with you, either directly or through one of our partners, including for customer service, to provide you with updates and other information relating to the website, and for marketing and promotional purposes
  • Send you emails
  • Find and prevent fraud

Log Files

datasquirel.com follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users' movement on the website, and gathering demographic information.

Cookies and Web Beacons

Like any other website, datasquirel.com uses 'cookies'. These cookies are used to store information including visitors' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users' experience by customizing our web page content based on visitors' browser type and/or other information.

Advertising Partners Privacy Policies

You may consult this list to find the Privacy Policy for each of the advertising partners of datasquirel.com.

Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on datasquirel.com, which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.

Note that datasquirel.com has no access to or control over these cookies that are used by third-party advertisers.

Third Party Privacy Policies

datasquirel.com's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options.

You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers' respective websites.

CCPA Privacy Rights (Do Not Sell My Personal Information)

Under the CCPA, among other rights, California consumers have the right to:

Request that a business that collects a consumer's personal data disclose the categories and specific pieces of personal data that a business has collected about consumers.

Request that a business delete any personal data about the consumer that a business has collected.

Request that a business that sells a consumer's personal data, not sell the consumer's personal data.

If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.

GDPR Data Protection Rights

We would like to make sure you are fully aware of all of your data protection rights. Every user is entitled to the following:

The right to access – You have the right to request copies of your personal data. We may charge you a small fee for this service.

The right to rectification – You have the right to request that we correct any information you believe is inaccurate. You also have the right to request that we complete the information you believe is incomplete.

The right to erasure – You have the right to request that we erase your personal data, under certain conditions.

The right to restrict processing – You have the right to request that we restrict the processing of your personal data, under certain conditions.

The right to object to processing – You have the right to object to our processing of your personal data, under certain conditions.

The right to data portability – You have the right to request that we transfer the data that we have collected to another organization, or directly to you, under certain conditions.

If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.

Children's Information

Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.

datasquirel.com does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.

\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/privacy.js.nft.json b/dsql-app/.local_dist/server/pages/privacy.js.nft.json index b0e24b8..4d801bf 100644 --- a/dsql-app/.local_dist/server/pages/privacy.js.nft.json +++ b/dsql-app/.local_dist/server/pages/privacy.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/redirect.html b/dsql-app/.local_dist/server/pages/redirect.html index 438b5c1..6aecaf8 100644 --- a/dsql-app/.local_dist/server/pages/redirect.html +++ b/dsql-app/.local_dist/server/pages/redirect.html @@ -1 +1 @@ -
Datasquirel Logo
\ No newline at end of file +
Datasquirel Logo
\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/redirect.js.nft.json b/dsql-app/.local_dist/server/pages/redirect.js.nft.json index b0e24b8..4d801bf 100644 --- a/dsql-app/.local_dist/server/pages/redirect.js.nft.json +++ b/dsql-app/.local_dist/server/pages/redirect.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/reset-password.js b/dsql-app/.local_dist/server/pages/reset-password.js index 4c26217..e887fc5 100644 --- a/dsql-app/.local_dist/server/pages/reset-password.js +++ b/dsql-app/.local_dist/server/pages/reset-password.js @@ -1,16 +1,16 @@ -"use strict";(()=>{var e={};e.id=7537,e.ids=[3220,7537],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},75370:(e,t,r)=>{r.r(t),r.d(t,{config:()=>L,default:()=>b,getServerSideProps:()=>O,getStaticPaths:()=>R,getStaticProps:()=>N,reportWebVitals:()=>I,routeModule:()=>k,unstable_getServerProps:()=>T,unstable_getServerSideProps:()=>C,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>$,unstable_getStaticProps:()=>M});var s={};r.r(s),r.d(s,{ResetPasswordContext:()=>j,default:()=>D,getServerSideProps:()=>A});var n=r(63865),a=r(9455),o=r(30671),i=r(49407),l=r(89600),c=r(8732),u=r(82015),p=r.n(u),d=r(71457),m=r(87472),g=r(32415),f=r(20048),S=r.n(f),h=r(63715),_=r(13002),x=r(77463),P=r.n(x),y=r(22373),v=r.n(y),w=r(27825),E=r.n(w);let j=p().createContext({});function D(e){let{email:t}=e,r="Reset Password | Datasquirel",s="Set a new password",n=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:r}),(0,c.jsx)("meta",{name:"description",content:s}),(0,c.jsx)(m.A,{pageTitle:r,pageDescription:s,pagePathname:"/"})]}),[a,o]=p().useState(!1),[i,l]=p().useState(!1);return(0,c.jsx)(d.A,{head:n,user:e.user,children:(0,c.jsx)(j.Provider,{value:{user:e.user},children:(0,c.jsx)("main",{children:(0,c.jsxs)("section",{children:[a&&(0,c.jsx)(g.A,{}),(0,c.jsx)("div",{className:"main-container flex-col items-start",children:i?(0,c.jsx)(_.A,{message:"Password Updated Sucessfully. Redirecting you ..."}):(0,c.jsxs)(p().Fragment,{children:[(0,c.jsx)("h1",{className:"m-0 text-4xl",children:"Reset Password"}),(0,c.jsx)("span",{children:"Please enter new passord and confirm it"}),(0,c.jsxs)("form",{className:"max-w-xl w-full flex flex-col items-stretch gap-4",onSubmit:e=>{o(!0),e.preventDefault();let r=e.target,s=r.password.value,n=r["confirm-password"].classList.contains("warning");if(s?.length<8){window.alert("Password must be at least 8 characters"),setTimeout(()=>{o(!1)},500);return}if(n){window.alert("Passwords don't match"),setTimeout(()=>{o(!1)},500);return}(0,h.A)(`/api/resetPassword?email=${t}&password=${s}`).then(e=>{setTimeout(()=>{o(!1)},500),setTimeout(()=>{window.location.href="/logout?login=true"},1e3),e.success&&l(!0)})},children:[(0,c.jsx)("input",{type:"password",name:"password",id:"password",className:"w-full",placeholder:"New Password",required:!0}),(0,c.jsx)("input",{type:"password",name:"confirm-password",id:"confirm-password",className:"w-full",placeholder:"Confirm New Password",required:!0,onInput:e=>{let t=e.target,r=t.closest("form");try{r.password.value.match(RegExp(`^${E().escapeRegExp(t.value)}$`))?t.classList.remove("warning"):t.classList.add("warning")}catch(t){(0,h.A)("/api/admin/clientError",{method:"post",body:{component:"reset-password-page-component/lines-170-177",message:t.message,user:{}}}),e.target.classList.add("warning")}}}),(0,c.jsx)("button",{children:"Reset Password"})]})]})})]})})})})}async function A({req:e,res:t,query:r}){let s=await S()(e,t);if(!r?.token?.toString()?.match(/./))return{redirect:{destination:"/",permanent:!1}};let n=null;try{let e=P()({encryptedString:r.token.toString()}),t=JSON.parse(e||"");if(Date.now()-t.dateCode>36e5)return{redirect:{destination:"/",permanent:!1}};n=t.email}catch(e){return v()({component:"reset-password-page-component/getServersideProps/lines-251-260",message:e.message,user:s}),{redirect:{destination:"/",permanent:!1}}}return n?.match(/./)?{props:{user:s,email:n}}:{redirect:{destination:"/",permanent:!1}}}let b=(0,o.M)(s,"default"),N=(0,o.M)(s,"getStaticProps"),R=(0,o.M)(s,"getStaticPaths"),O=(0,o.M)(s,"getServerSideProps"),L=(0,o.M)(s,"config"),I=(0,o.M)(s,"reportWebVitals"),M=(0,o.M)(s,"unstable_getStaticProps"),$=(0,o.M)(s,"unstable_getStaticPaths"),q=(0,o.M)(s,"unstable_getStaticParams"),T=(0,o.M)(s,"unstable_getServerProps"),C=(0,o.M)(s,"unstable_getServerSideProps"),k=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/reset-password",pathname:"/reset-password",bundlePath:"",filename:""},components:{App:l.default,Document:i.default},userland:s})},13002:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(8732);function n({message:e,className:t}){return(0,s.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,s.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:e})]})}r(82015)},20048:(e,t,r)=>{r(81630);let s=r(67216),n=r(77463),a=r(29021),o=r(6505);async function i(e,t,r,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||r&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!a.existsSync(`${d}/${p.csrf_k}`))return null;if(0==p.verification_status&&!r){let e=await s(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=i},6505:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},22373:(e,t,r)=>{let s=r(29021),{IncomingMessage:n}=r(81630);e.exports=async function({user:e,message:t,component:r,noMail:n,req:a}){let o=new Date,i=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],t=a.headers["x-real-ip"],r=a.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=r||s||t||a.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀 SERVER ERROR =========================== +"use strict";(()=>{var e={};e.id=7537,e.ids=[3220,7537],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},20416:(e,t,r)=>{r.r(t),r.d(t,{config:()=>D,default:()=>E,getServerSideProps:()=>N,getStaticPaths:()=>b,getStaticProps:()=>A,reportWebVitals:()=>O,routeModule:()=>M,unstable_getServerProps:()=>L,unstable_getServerSideProps:()=>C,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>R,unstable_getStaticProps:()=>I});var s={};r.r(s),r.d(s,{ResetPasswordContext:()=>P,default:()=>w,getServerSideProps:()=>v});var n=r(63865),a=r(9455),o=r(30671),i=r(5583),c=r(19796),l=r(8732),u=r(82015),d=r.n(u),p=r(1013),m=r(91258),g=r(16757),f=r(92702),h=r(46169),x=r(90048),S=r(71205),_=r(77047),j=r(27825),y=r.n(j);let P=d().createContext({});function w(e){let{email:t}=e,r="Reset Password | Datasquirel",s="Set a new password",n=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:r}),(0,l.jsx)("meta",{name:"description",content:s}),(0,l.jsx)(m.A,{pageTitle:r,pageDescription:s,pagePathname:"/"})]}),[a,o]=d().useState(!1),[i,c]=d().useState(!1);return(0,l.jsx)(p.A,{head:n,user:e.user,children:(0,l.jsx)(P.Provider,{value:{user:e.user},children:(0,l.jsx)("main",{children:(0,l.jsxs)("section",{children:[a&&(0,l.jsx)(g.A,{}),(0,l.jsx)("div",{className:"main-container flex-col items-start",children:i?(0,l.jsx)(x.A,{message:"Password Updated Sucessfully. Redirecting you ..."}):(0,l.jsxs)(d().Fragment,{children:[(0,l.jsx)("h1",{className:"m-0 text-4xl",children:"Reset Password"}),(0,l.jsx)("span",{children:"Please enter new passord and confirm it"}),(0,l.jsxs)("form",{className:"max-w-xl w-full flex flex-col items-stretch gap-4",onSubmit:e=>{o(!0),e.preventDefault();let r=e.target,s=r.password.value,n=r["confirm-password"].classList.contains("warning");if(s?.length<8){window.alert("Password must be at least 8 characters"),setTimeout(()=>{o(!1)},500);return}if(n){window.alert("Passwords don't match"),setTimeout(()=>{o(!1)},500);return}(0,h.A)(`/api/resetPassword?email=${t}&password=${s}`).then(e=>{setTimeout(()=>{o(!1)},500),setTimeout(()=>{window.location.href="/logout?login=true"},1e3),e.success&&c(!0)})},children:[(0,l.jsx)("input",{type:"password",name:"password",id:"password",className:"w-full",placeholder:"New Password",required:!0}),(0,l.jsx)("input",{type:"password",name:"confirm-password",id:"confirm-password",className:"w-full",placeholder:"Confirm New Password",required:!0,onInput:e=>{let t=e.target,r=t.closest("form");try{r.password.value.match(RegExp(`^${y().escapeRegExp(t.value)}$`))?t.classList.remove("warning"):t.classList.add("warning")}catch(t){(0,h.A)("/api/admin/clientError",{method:"post",body:{component:"reset-password-page-component/lines-170-177",message:t.message,user:{}}}),e.target.classList.add("warning")}}}),(0,l.jsx)("button",{children:"Reset Password"})]})]})})]})})})})}async function v({req:e,res:t,query:r}){let s=await (0,f.default)(e,t);if(!r?.token?.toString()?.match(/./))return{redirect:{destination:"/",permanent:!1}};let n=null;try{let e=(0,S.A)({encryptedString:r.token.toString()}),t=JSON.parse(e||"");if(Date.now()-t.dateCode>36e5)return{redirect:{destination:"/",permanent:!1}};n=t.email}catch(e){return(0,_.A)({component:"reset-password-page-component/getServersideProps/lines-251-260",message:e.message,user:s}),{redirect:{destination:"/",permanent:!1}}}return n?.match(/./)?{props:{user:s,email:n}}:{redirect:{destination:"/",permanent:!1}}}let E=(0,o.M)(s,"default"),A=(0,o.M)(s,"getStaticProps"),b=(0,o.M)(s,"getStaticPaths"),N=(0,o.M)(s,"getServerSideProps"),D=(0,o.M)(s,"config"),O=(0,o.M)(s,"reportWebVitals"),I=(0,o.M)(s,"unstable_getStaticProps"),R=(0,o.M)(s,"unstable_getStaticPaths"),q=(0,o.M)(s,"unstable_getStaticParams"),L=(0,o.M)(s,"unstable_getServerProps"),C=(0,o.M)(s,"unstable_getServerSideProps"),M=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/reset-password",pathname:"/reset-password",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:s})},90048:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(8732);function n({message:e,className:t}){return(0,s.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,s.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:e})]})}r(82015)},91258:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(8732),n=r(82015),a=r.n(n);function o({pageTitle:e,pageDescription:t,pagePathname:r,aceEditor:n}){return(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:title",content:e}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{itemProp:"name",content:e}),(0,s.jsx)("meta",{itemProp:"description",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:e}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),n&&(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},92702:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var s=r(71934),n=r(71205),a=r(29021),o=r.n(a),i=r(41939);async function c(e,t,r){let{keyCookieName:a,csrfCookieName:c}=(0,i.A)();if(!e.cookies?.[a]?.match(/./))return null;let l=(0,n.A)({encryptedString:e.cookies[a]});if(!l)return null;let u=JSON.parse(l);if(!u.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!o().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!r){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},41939:(e,t,r)=>{r.d(t,{A:()=>s});function s(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let c=t;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:c+=n}}},77047:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(29021),n=r.n(s);async function a({user:e,message:t,component:r,noMail:s,req:a}){let o=new Date,i=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],t=a.headers["x-real-ip"],r=a.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=r||s||t||a.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let s=`🚀 SERVER ERROR =========================== Error Message: ${t} -Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(n+=` +Component: ${r}`;e?.id&&e?.first_name&&e?.last_name&&e?.email&&(s+=` User Id: ${e?.id} User Name: ${e?.first_name} ${e?.last_name} -User Email: ${e?.email}`),a?.url&&(n+=` -URL: ${a.url}`),a?.body&&(n+=` -Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(n+=` -IP: ${i}`),n+=` +User Email: ${e?.email}`),a?.url&&(s+=` +URL: ${a.url}`),a?.body&&(s+=` +Request Body: ${JSON.stringify(a.body,null,4)}`),i&&(s+=` +IP: ${i}`),s+=` Date: ${o.toDateString()} -========================================`,s.existsSync("./.tmp/error.log")||s.writeFileSync("./.tmp/error.log","","utf-8");let l=s.readFileSync("./.tmp/error.log","utf-8");s.writeFileSync("./.tmp/error.log",n),s.appendFileSync("./.tmp/error.log",` +========================================`,n().existsSync("./.tmp/error.log")||n().writeFileSync("./.tmp/error.log","","utf-8");let c=n().readFileSync("./.tmp/error.log","utf-8");n().writeFileSync("./.tmp/error.log",s),n().appendFileSync("./.tmp/error.log",` -${l}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},77463:(e,t,r)=>{let{scryptSync:s,createDecipheriv:n}=r(55511),{Buffer:a}=r(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:r})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=r||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",s(o,i,l),a.alloc(16,0));try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},67216:(e,t,r)=>{let s=r(9973),n=r(31976),a=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},31976:(e,t,r)=>{let s=r(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!s.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(8732);r(82015);var n=r(20883);function a(e){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600],()=>r(75370));module.exports=s})(); \ No newline at end of file +${c}`)}catch(e){console.log("Server Error Reporting Error:",e.message)}}},71205:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(55511),n=r(79428);function a({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=r||process.env.DSQL_ENCRYPTION_SALT,i=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,s.scryptSync)(a,o,i),l=n.Buffer.alloc(16,0),u=(0,s.createDecipheriv)("aes-192-cbc",c,l);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,r)=>{r.d(t,{A:()=>s});async function s(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},5583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(8732);r(82015);var n=r(20883);function a(){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796],()=>r(20416));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/reset-password.js.nft.json b/dsql-app/.local_dist/server/pages/reset-password.js.nft.json index 4d8d140..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/reset-password.js.nft.json +++ b/dsql-app/.local_dist/server/pages/reset-password.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/send-password-reset-link.js b/dsql-app/.local_dist/server/pages/send-password-reset-link.js index c9e3a12..d315b87 100644 --- a/dsql-app/.local_dist/server/pages/send-password-reset-link.js +++ b/dsql-app/.local_dist/server/pages/send-password-reset-link.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6827,e.ids=[3220,6827],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},24952:(e,t,s)=>{s.r(t),s.d(t,{config:()=>N,default:()=>E,getServerSideProps:()=>A,getStaticPaths:()=>b,getStaticProps:()=>D,reportWebVitals:()=>L,routeModule:()=>q,unstable_getServerProps:()=>M,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>I,unstable_getStaticPaths:()=>k,unstable_getStaticProps:()=>O});var r={};s.r(r),s.d(r,{SendPassResetContext:()=>P,default:()=>j,getServerSideProps:()=>y});var a=s(63865),n=s(9455),i=s(30671),o=s(49407),l=s(89600),c=s(8732),u=s(82015),d=s.n(u),p=s(71457),m=s(87472),f=s(32415),h=s(20048),g=s.n(h),_=s(63715),x=s(13002);let S=(0,s(82544).A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);function v({message:e}){return(0,c.jsxs)("div",{className:"info gray",children:[(0,c.jsx)(S,{}),(0,c.jsx)("span",{className:"font-normal",children:e})]})}let P=d().createContext({});function j(e){let t="Cloudbased SQL data management system | Datasquirel",s="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:t}),(0,c.jsx)("meta",{name:"description",content:s}),(0,c.jsx)(m.A,{pageTitle:t,pageDescription:s,pagePathname:"/"})]}),[a,n]=d().useState(!1),[i,o]=d().useState(!1);return(0,c.jsx)(p.A,{head:r,user:e.user,children:(0,c.jsx)(P.Provider,{value:{user:e.user},children:(0,c.jsx)("main",{children:(0,c.jsxs)("section",{children:[a&&(0,c.jsx)(f.A,{}),i?(0,c.jsx)(x.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,c.jsx)("div",{className:"paper",children:(0,c.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,c.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,c.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,c.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{n(!0),e.preventDefault();let t=e.target["email-address"].value;(0,_.A)(`/api/sendPasswordResetLink?email=${t}`).then(e=>{console.log(e),setTimeout(()=>{n(!1)},500),e.success&&o(!0)})},children:[(0,c.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:e?.user?.logged_in_status?e.user.email:"",required:!0}),(0,c.jsx)("button",{children:"Send password reset Email"}),(0,c.jsx)(v,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}async function y({req:e,res:t}){let s=await g()(e,t);return s?.social_login?{redirect:{destination:"/",permanent:!1}}:{props:{user:s}}}let E=(0,i.M)(r,"default"),D=(0,i.M)(r,"getStaticProps"),b=(0,i.M)(r,"getStaticPaths"),A=(0,i.M)(r,"getServerSideProps"),N=(0,i.M)(r,"config"),L=(0,i.M)(r,"reportWebVitals"),O=(0,i.M)(r,"unstable_getStaticProps"),k=(0,i.M)(r,"unstable_getStaticPaths"),I=(0,i.M)(r,"unstable_getStaticParams"),M=(0,i.M)(r,"unstable_getServerProps"),w=(0,i.M)(r,"unstable_getServerSideProps"),q=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/send-password-reset-link",pathname:"/send-password-reset-link",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:r})},13002:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(8732);function a({message:e,className:t}){return(0,r.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,r.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:e})]})}s(82015)},20048:(e,t,s)=>{s(81630);let r=s(67216),a=s(77463),n=s(29021),i=s(6505);async function o(e,t,s,o){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.[l]?.match(/./))return null;let u=a({encryptedString:e.cookies[l]});if(!u)return null;let d=JSON.parse(u);if(!d.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!n.existsSync(`${p}/${d.csrf_k}`))return null;if(0==d.verification_status&&!s){let e=await r(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return d?.date&&Date.now()-d.date>6048e5?null:d}e.exports=o},6505:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=r;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=a}}},77463:(e,t,s)=>{let{scryptSync:r,createDecipheriv:a}=s(55511),{Buffer:n}=s(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=a("aes-192-cbc",r(i,o,l),n.alloc(16,0));try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},67216:(e,t,s)=>{let r=s(9973),a=s(31976),n=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function i(...e){try{let t=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},31976:(e,t,s)=>{let r=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!r.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var r=s(8732);s(82015);var a=s(20883);function n(e){return(0,r.jsxs)(a.Html,{lang:"en",children:[(0,r.jsxs)(a.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(a.Main,{}),(0,r.jsx)(a.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600],()=>s(24952));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6827,e.ids=[3220,6827],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},90678:(e,t,s)=>{s.r(t),s.d(t,{config:()=>N,default:()=>v,getServerSideProps:()=>b,getStaticPaths:()=>A,getStaticProps:()=>E,reportWebVitals:()=>w,routeModule:()=>q,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>M,unstable_getStaticParams:()=>O,unstable_getStaticPaths:()=>k,unstable_getStaticProps:()=>D});var r={};s.r(r),s.d(r,{SendPassResetContext:()=>S,default:()=>y,getServerSideProps:()=>P});var a=s(63865),n=s(9455),i=s(30671),o=s(5583),l=s(19796),c=s(8732),u=s(82015),d=s.n(u),m=s(1013),p=s(91258),f=s(16757),h=s(92702),g=s(46169),x=s(90048);let _=(0,s(82544).A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);function j({message:e}){return(0,c.jsxs)("div",{className:"info gray",children:[(0,c.jsx)(_,{}),(0,c.jsx)("span",{className:"font-normal",children:e})]})}let S=d().createContext({});function y(e){let t="Cloudbased SQL data management system | Datasquirel",s="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:t}),(0,c.jsx)("meta",{name:"description",content:s}),(0,c.jsx)(p.A,{pageTitle:t,pageDescription:s,pagePathname:"/"})]}),[a,n]=d().useState(!1),[i,o]=d().useState(!1);return(0,c.jsx)(m.A,{head:r,user:e.user,children:(0,c.jsx)(S.Provider,{value:{user:e.user},children:(0,c.jsx)("main",{children:(0,c.jsxs)("section",{children:[a&&(0,c.jsx)(f.A,{}),i?(0,c.jsx)(x.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,c.jsx)("div",{className:"paper",children:(0,c.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,c.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,c.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,c.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{n(!0),e.preventDefault();let t=e.target["email-address"].value;(0,g.A)(`/api/sendPasswordResetLink?email=${t}`).then(e=>{console.log(e),setTimeout(()=>{n(!1)},500),e.success&&o(!0)})},children:[(0,c.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:e?.user?.logged_in_status?e.user.email:"",required:!0}),(0,c.jsx)("button",{children:"Send password reset Email"}),(0,c.jsx)(j,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}async function P({req:e,res:t}){let s=await (0,h.default)(e,t);return s?.social_login?{redirect:{destination:"/",permanent:!1}}:{props:{user:s}}}let v=(0,i.M)(r,"default"),E=(0,i.M)(r,"getStaticProps"),A=(0,i.M)(r,"getStaticPaths"),b=(0,i.M)(r,"getServerSideProps"),N=(0,i.M)(r,"config"),w=(0,i.M)(r,"reportWebVitals"),D=(0,i.M)(r,"unstable_getStaticProps"),k=(0,i.M)(r,"unstable_getStaticPaths"),O=(0,i.M)(r,"unstable_getStaticParams"),I=(0,i.M)(r,"unstable_getServerProps"),M=(0,i.M)(r,"unstable_getServerSideProps"),q=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/send-password-reset-link",pathname:"/send-password-reset-link",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:r})},90048:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(8732);function a({message:e,className:t}){return(0,r.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,r.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:e})]})}s(82015)},91258:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(8732),a=s(82015),n=s.n(a);function i({pageTitle:e,pageDescription:t,pagePathname:s,aceEditor:a}){return(0,r.jsxs)(n().Fragment,{children:[(0,r.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+s}),(0,r.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{property:"og:title",content:e}),(0,r.jsx)("meta",{property:"og:description",content:t}),(0,r.jsx)("meta",{itemProp:"name",content:e}),(0,r.jsx)("meta",{itemProp:"description",content:t}),(0,r.jsx)("meta",{name:"twitter:title",content:e}),(0,r.jsx)("meta",{name:"twitter:description",content:t}),a&&(0,r.jsxs)(n().Fragment,{children:[(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},92702:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var r=s(71934),a=s(71205),n=s(29021),i=s.n(n),o=s(41939);async function l(e,t,s){let{keyCookieName:n,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[n]?.match(/./))return null;let c=(0,a.A)({encryptedString:e.cookies[n]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!s){let e=await (0,r.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},41939:(e,t,s)=>{s.d(t,{A:()=>r});function r(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",a=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;let o=t;e?.userId&&(o+=`user_${e.userId}_`),n&&(o+=`${n}_`),o+=r;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),n&&(l+=`${n}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=a}}},71205:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(55511),a=s(79428);function n({encryptedString:e,encryptionKey:t,encryptionSalt:s}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let n=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!n?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,r.scryptSync)(n,i,o),c=a.Buffer.alloc(16,0),u=(0,r.createDecipheriv)("aes-192-cbc",l,c);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,s)=>{s.d(t,{A:()=>r});async function r(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},5583:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var r=s(8732);s(82015);var a=s(20883);function n(){return(0,r.jsxs)(a.Html,{lang:"en",children:[(0,r.jsxs)(a.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(a.Main,{}),(0,r.jsx)(a.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796],()=>s(90678));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/send-password-reset-link.js.nft.json b/dsql-app/.local_dist/server/pages/send-password-reset-link.js.nft.json index 679446f..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/send-password-reset-link.js.nft.json +++ b/dsql-app/.local_dist/server/pages/send-password-reset-link.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su.js b/dsql-app/.local_dist/server/pages/su.js index 4694e61..a5b8042 100644 --- a/dsql-app/.local_dist/server/pages/su.js +++ b/dsql-app/.local_dist/server/pages/su.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5516,e.ids=[5516],e.modules={42452:(e,s,t)=>{t.r(s),t.d(s,{config:()=>_,default:()=>j,getServerSideProps:()=>b,getStaticPaths:()=>v,getStaticProps:()=>f,reportWebVitals:()=>w,routeModule:()=>q,unstable_getServerProps:()=>D,unstable_getServerSideProps:()=>M,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>P,unstable_getStaticProps:()=>N});var r={};t.r(r),t.d(r,{default:()=>g,getServerSideProps:()=>S});var a=t(63865),l=t(9455),n=t(30671),i=t(49407),o=t(89600),c=t(8732);t(82015);var u=t(93615),d=t.n(u),p=t(49888),x=t(36299),m=t(67216),h=t.n(m);function g({user:e,data:s}){let t=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,c.jsx)(p.A,{head:t,user:e,children:(0,c.jsx)(x.A,{data:s})})}async function S({req:e,res:s,query:t}){let r=await d()(e);return r?.logged_in_status?{props:{user:r,data:{users:await h()("SELECT * FROM users ORDER BY id DESC")}}}:{redirect:{destination:"/su/login",permanent:!1}}}let j=(0,n.M)(r,"default"),f=(0,n.M)(r,"getStaticProps"),v=(0,n.M)(r,"getStaticPaths"),b=(0,n.M)(r,"getServerSideProps"),_=(0,n.M)(r,"config"),w=(0,n.M)(r,"reportWebVitals"),N=(0,n.M)(r,"unstable_getStaticProps"),P=(0,n.M)(r,"unstable_getStaticPaths"),y=(0,n.M)(r,"unstable_getStaticParams"),D=(0,n.M)(r,"unstable_getServerProps"),M=(0,n.M)(r,"unstable_getServerSideProps"),q=new a.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su",pathname:"/su",bundlePath:"",filename:""},components:{App:o.default,Document:i.default},userland:r})},36299:(e,s,t)=>{t.d(s,{A:()=>c});var r=t(8732),a=t(82015),l=t.n(a),n=t(63715),i=t(32415),o=t(21498);function c({data:e}){Object.keys(e.users[0]);let[s,t]=l().useState(null),[a,c]=l().useState(0),[u,d]=l().useState(!1);return console.log(typeof s),(0,r.jsx)(l().Fragment,{children:(0,r.jsxs)("div",{className:"items-stretch gap-10 w-full",children:[(0,r.jsxs)("section",{className:"paper w-full",children:[(0,r.jsx)("h2",{className:"text-xl m-0 mb-6",children:"Users"}),(0,r.jsx)("div",{className:"flex-col items-stretch gap-10",children:e.users.map((e,s)=>(0,r.jsx)(o.A,{userObject:e},s+1))})]}),(0,r.jsxs)("section",{className:"paper",children:[(0,r.jsxs)("div",{className:"w-full justify-between",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,r.jsx)("div",{children:(0,r.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(d(!0),(0,n.A)("/api/admin/clearErrorLogs","post").then(e=>{c(e=>e+1)}),setTimeout(()=>{d(!1)},2e3))},className:"outlined gray relative",children:[u&&(0,r.jsx)(i.A,{width:"20px"}),"Clear Error Log"]})})]}),s&&(0,r.jsx)("p",{dangerouslySetInnerHTML:{__html:s||"No Log"}}),"string"!=typeof s&&(0,r.jsx)(i.A,{position:"relative",width:"25px"})]})]})})}},21498:(e,s,t)=>{t.d(s,{A:()=>n});var r=t(8732),a=t(82015),l=t.n(a);function n({userObject:e,userPage:s}){let t=Object.keys(e),[a,n]=l().useState(!1),[i,o]=l().useState(0),[c,u]=l().useState(!s);return(0,r.jsxs)("div",{className:"card col green w-full overflow-hidden"+(c?s?" h-[100px]":" h-[85px]":" "),children:[(0,r.jsxs)("div",{className:"items-center w-full",children:[(0,r.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(s?" w-16 h-16":" w-12 h-12")}),!s&&(0,r.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,r.jsxs)("div",{className:"ml-auto",children:[(0,r.jsx)("button",{className:"outlined gray small-text",onClick:e=>{c?u(!1):u(!0)},children:c?"More Details":"Collapse"}),!s&&(0,r.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,r.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:t.map((s,a)=>(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("span",{style:{wordBreak:"break-all"},children:[s,":"," ",(0,r.jsx)("b",{children:e[s]})]})}),a{u(!0)},children:"Collapse"})]})}},67216:(e,s,t)=>{let r=t(9973),a=t(31976),l=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function n(...e){try{let s=await l.query(...e);return await l.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=n},31976:(e,s,t)=>{let r=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let s=`${e}/ca-cert.pem`;if(!r.existsSync(s)){console.log(`${s} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var s=require("../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,9600,3932],()=>t(42452));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5516,e.ids=[5516],e.modules={84231:(e,t,s)=>{s.r(t),s.d(t,{config:()=>y,default:()=>v,getServerSideProps:()=>P,getStaticPaths:()=>N,getStaticProps:()=>w,reportWebVitals:()=>_,routeModule:()=>D,unstable_getServerProps:()=>C,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>M});var r={};s.r(r),s.d(r,{default:()=>S,getServerSideProps:()=>b});var a=s(63865),l=s(9455),i=s(30671),n=s(5583),o=s(19796),c=s(8732),u=s(82015),d=s.n(u),m=s(61197),p=s(40778),x=s(46169),h=s(16757),g=s(1360);function j({data:e}){Object.keys(e.users[0]);let[t,s]=d().useState(null),[r,a]=d().useState(0),[l,i]=d().useState(!1);return console.log(typeof t),(0,c.jsx)(d().Fragment,{children:(0,c.jsxs)("div",{className:"items-stretch gap-10 w-full",children:[(0,c.jsxs)("section",{className:"paper w-full",children:[(0,c.jsx)("h2",{className:"text-xl m-0 mb-6",children:"Users"}),(0,c.jsx)("div",{className:"flex-col items-stretch gap-10",children:e.users.map((e,t)=>(0,c.jsx)(g.A,{userObject:e},t+1))})]}),(0,c.jsxs)("section",{className:"paper",children:[(0,c.jsxs)("div",{className:"w-full justify-between",children:[(0,c.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,c.jsx)("div",{children:(0,c.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(i(!0),(0,x.A)("/api/admin/clearErrorLogs",{method:"POST"}).then(e=>{a(e=>e+1)}),setTimeout(()=>{i(!1)},2e3))},className:"outlined gray relative",children:[l&&(0,c.jsx)(h.A,{width:"20px"}),"Clear Error Log"]})})]}),t&&(0,c.jsx)("p",{dangerouslySetInnerHTML:{__html:t||"No Log"}}),"string"!=typeof t&&(0,c.jsx)(h.A,{position:"relative",width:"25px"})]})]})})}var f=s(71934);function S({user:e,data:t}){let s=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,c.jsx)(p.A,{head:s,user:e,children:(0,c.jsx)(j,{data:t})})}async function b({req:e,res:t,query:s}){let r=await (0,m.A)(e);return r?.logged_in_status?{props:{user:r,data:{users:await (0,f.A)("SELECT * FROM users ORDER BY id DESC")}}}:{redirect:{destination:"/su/login",permanent:!1}}}let v=(0,i.M)(r,"default"),w=(0,i.M)(r,"getStaticProps"),N=(0,i.M)(r,"getStaticPaths"),P=(0,i.M)(r,"getServerSideProps"),y=(0,i.M)(r,"config"),_=(0,i.M)(r,"reportWebVitals"),M=(0,i.M)(r,"unstable_getStaticProps"),q=(0,i.M)(r,"unstable_getStaticPaths"),A=(0,i.M)(r,"unstable_getStaticParams"),C=(0,i.M)(r,"unstable_getServerProps"),E=(0,i.M)(r,"unstable_getServerSideProps"),D=new a.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su",pathname:"/su",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:r})},1360:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(8732),a=s(82015),l=s.n(a);function i({userObject:e,userPage:t}){let s=Object.keys(e),[a,i]=l().useState(!1),[n,o]=l().useState(0),[c,u]=l().useState(!t);return(0,r.jsxs)("div",{className:"card col green w-full overflow-hidden"+(c?t?" h-[100px]":" h-[85px]":" "),children:[(0,r.jsxs)("div",{className:"items-center w-full",children:[(0,r.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(t?" w-16 h-16":" w-12 h-12")}),!t&&(0,r.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,r.jsxs)("div",{className:"ml-auto",children:[(0,r.jsx)("button",{className:"outlined gray small-text",onClick:e=>{c?u(!1):u(!0)},children:c?"More Details":"Collapse"}),!t&&(0,r.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,r.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:s.map((t,a)=>(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("span",{style:{wordBreak:"break-all"},children:[t,":"," ",(0,r.jsx)("b",{children:e[t]})]})}),a{u(!0)},children:"Collapse"})]})}},71934:(e,t,s)=>{s.d(t,{A:()=>r});async function r(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796,6622],()=>s(84231));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su.js.nft.json b/dsql-app/.local_dist/server/pages/su.js.nft.json index 679446f..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/su.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/backups.js b/dsql-app/.local_dist/server/pages/su/backups.js index cd33626..b1a4291 100644 --- a/dsql-app/.local_dist/server/pages/su/backups.js +++ b/dsql-app/.local_dist/server/pages/su/backups.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=1984,e.ids=[1984],e.modules={47984:(e,t,r)=>{r.r(t),r.d(t,{config:()=>M,default:()=>f,getServerSideProps:()=>w,getStaticPaths:()=>P,getStaticProps:()=>k,reportWebVitals:()=>A,routeModule:()=>B,unstable_getServerProps:()=>q,unstable_getServerSideProps:()=>C,unstable_getStaticParams:()=>N,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>_});var s={};r.r(s),r.d(s,{default:()=>b,getServerSideProps:()=>v});var a=r(63865),n=r(9455),i=r(30671),l=r(49407),u=r(89600),o=r(8732),c=r(82015),p=r.n(c),d=r(93615),x=r.n(d),h=r(49888);r(19262);var m=r(63715),g=r(32415),j=r(47338);function S(e){let[t,r]=p().useState(!1),[s,a]=p().useState([]),[n,i]=p().useState(0);return(0,o.jsxs)(p().Fragment,{children:[t&&(0,o.jsx)(g.A,{}),(0,o.jsxs)("div",{className:"w-full justify-between",children:[(0,o.jsx)("h2",{className:"text-xl m-0",children:"Backups"}),(0,o.jsx)("div",{children:(0,o.jsx)("button",{onClick:e=>{window.confirm("Create new backup?")&&(r(!0),(0,m.A)("/api/admin/createNewBackup").then(e=>{i(e=>e+1),setTimeout(()=>{r(!1)},2e3)}))},className:"relative",children:"Create New Backup"})})]}),(0,o.jsxs)("section",{className:s&&s[0]?"p-0 gap-4":"paper",children:[!s&&(0,o.jsx)(g.A,{}),s&&s[0]&&s.sort((e,t)=>parseInt(e)>parseInt(t)?-1:1).map((e,t)=>{let r=new Date(parseInt(e));return(0,o.jsxs)("a",{href:`/su/backups/${e}`,className:"card w-full items-center",children:[(0,o.jsx)(j.A,{}),(0,o.jsx)("b",{children:"Backup:"}),(0,o.jsx)("span",{children:r.toString()})]},e)}),s&&!s[0]&&(0,o.jsx)("span",{children:"No Backups Yet"})]})]})}function b({user:e,data:t}){let r=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"Backups | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Databases backups"})]});return(0,o.jsx)(h.A,{head:r,user:e,children:(0,o.jsx)(S,{})})}async function v({req:e,res:t,query:r}){let s=await x()(e);return s?.logged_in_status?{props:{user:s}}:{redirect:{destination:"/su/login",permanent:!1}}}let f=(0,i.M)(s,"default"),k=(0,i.M)(s,"getStaticProps"),P=(0,i.M)(s,"getStaticPaths"),w=(0,i.M)(s,"getServerSideProps"),M=(0,i.M)(s,"config"),A=(0,i.M)(s,"reportWebVitals"),_=(0,i.M)(s,"unstable_getStaticProps"),y=(0,i.M)(s,"unstable_getStaticPaths"),N=(0,i.M)(s,"unstable_getStaticParams"),q=(0,i.M)(s,"unstable_getServerProps"),C=(0,i.M)(s,"unstable_getServerSideProps"),B=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/su/backups",pathname:"/su/backups",bundlePath:"",filename:""},components:{App:u.default,Document:l.default},userland:s})},19262:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(8732),a=r(82015),n=r.n(a),i=r(63715),l=r(32415);function u(e){let[t,r]=n().useState(null),[a,u]=n().useState(!1),[o,c]=n().useState(0);return(0,s.jsxs)(n().Fragment,{children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,s.jsx)("div",{children:(0,s.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(u(!0),(0,i.A)("/api/admin/clearErrorLogs","post").then(e=>{console.log(e),c(e=>e+1)}),setTimeout(()=>{u(!1)},2e3))},className:"outlined gray relative",children:[a&&(0,s.jsx)(l.A,{width:"20px"}),"Clear Error Log"]})})]}),(0,s.jsxs)("section",{className:"paper",children:[t&&(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:t||"No Log"}}),!t&&(0,s.jsx)(l.A,{position:"relative",width:"25px"})]})]})}},47338:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(82544).A)("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]])},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,3932],()=>r(47984));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=1984,e.ids=[1984],e.modules={81811:(e,t,r)=>{r.r(t),r.d(t,{config:()=>M,default:()=>f,getServerSideProps:()=>P,getStaticPaths:()=>v,getStaticProps:()=>k,reportWebVitals:()=>q,routeModule:()=>B,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>w});var a={};r.r(a),r.d(a,{default:()=>b,getServerSideProps:()=>j});var s=r(63865),n=r(9455),i=r(30671),u=r(5583),c=r(19796),l=r(8732),p=r(82015),d=r.n(p),o=r(61197),h=r(40778),x=r(46169),m=r(16757),g=r(47338);function S(){let[e,t]=d().useState(!1),[r,a]=d().useState([]),[s,n]=d().useState(0);return(0,l.jsxs)(d().Fragment,{children:[e&&(0,l.jsx)(m.A,{}),(0,l.jsxs)("div",{className:"w-full justify-between",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:"Backups"}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{onClick:e=>{window.confirm("Create new backup?")&&(t(!0),(0,x.A)("/api/admin/createNewBackup").then(e=>{n(e=>e+1),setTimeout(()=>{t(!1)},2e3)}))},className:"relative",children:"Create New Backup"})})]}),(0,l.jsxs)("section",{className:r&&r[0]?"p-0 gap-4":"paper",children:[!r&&(0,l.jsx)(m.A,{}),r&&r[0]&&r.sort((e,t)=>parseInt(e)>parseInt(t)?-1:1).map((e,t)=>{let r=new Date(parseInt(e));return(0,l.jsxs)("a",{href:`/su/backups/${e}`,className:"card w-full items-center",children:[(0,l.jsx)(g.A,{}),(0,l.jsx)("b",{children:"Backup:"}),(0,l.jsx)("span",{children:r.toString()})]},e)}),r&&!r[0]&&(0,l.jsx)("span",{children:"No Backups Yet"})]})]})}function b({user:e,data:t}){let r=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Backups | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Databases backups"})]});return(0,l.jsx)(h.A,{head:r,user:e,children:(0,l.jsx)(S,{})})}async function j({req:e,res:t,query:r}){let a=await (0,o.A)(e);return a?.logged_in_status?{props:{user:a}}:{redirect:{destination:"/su/login",permanent:!1}}}let f=(0,i.M)(a,"default"),k=(0,i.M)(a,"getStaticProps"),v=(0,i.M)(a,"getStaticPaths"),P=(0,i.M)(a,"getServerSideProps"),M=(0,i.M)(a,"config"),q=(0,i.M)(a,"reportWebVitals"),w=(0,i.M)(a,"unstable_getStaticProps"),_=(0,i.M)(a,"unstable_getStaticPaths"),A=(0,i.M)(a,"unstable_getStaticParams"),y=(0,i.M)(a,"unstable_getServerProps"),N=(0,i.M)(a,"unstable_getServerSideProps"),B=new s.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/su/backups",pathname:"/su/backups",bundlePath:"",filename:""},components:{App:c.default,Document:u.default},userland:a})},47338:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]])},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,6622],()=>r(81811));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/backups.js.nft.json b/dsql-app/.local_dist/server/pages/su/backups.js.nft.json index 00e291f..817b606 100644 --- a/dsql-app/.local_dist/server/pages/su/backups.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/backups.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/console.js b/dsql-app/.local_dist/server/pages/su/console.js index b48cd43..b3b9232 100644 --- a/dsql-app/.local_dist/server/pages/su/console.js +++ b/dsql-app/.local_dist/server/pages/su/console.js @@ -1 +1 @@ -(()=>{var e={};e.id=866,e.ids=[866],e.modules={509:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.r(t),s.d(t,{config:()=>h,default:()=>d,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>p,reportWebVitals:()=>g,routeModule:()=>b,unstable_getServerProps:()=>w,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>f});var a=s(63865),i=s(9455),l=s(30671),n=s(49407),o=s(89600),c=s(21711),u=e([c]);c=(u.then?(await u)():u)[0];let d=(0,l.M)(c,"default"),p=(0,l.M)(c,"getStaticProps"),m=(0,l.M)(c,"getStaticPaths"),x=(0,l.M)(c,"getServerSideProps"),h=(0,l.M)(c,"config"),g=(0,l.M)(c,"reportWebVitals"),f=(0,l.M)(c,"unstable_getStaticProps"),v=(0,l.M)(c,"unstable_getStaticPaths"),S=(0,l.M)(c,"unstable_getStaticParams"),w=(0,l.M)(c,"unstable_getServerProps"),j=(0,l.M)(c,"unstable_getServerSideProps"),b=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/console",pathname:"/su/console",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:c});r()}catch(e){r(e)}})},54254:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.d(t,{A:()=>u});var a=s(8732),i=s(82015),l=s.n(i),n=s(10717);s(20008);var o=s(39127),c=e([n,o]);function u({socketDomain:e}){let[t,s]=l().useState(null),[r,i]=l().useState(null),[n,o]=l().useState("");return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsx)("h2",{className:"text-2xl m-0",children:"Console"}),(0,a.jsx)("button",{onClick:e=>{t&&t.emit("log","Logging to the console")},children:"Log console"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full items-stretch",children:[(0,a.jsx)("section",{className:"paper bg-slate-900",id:"terminalWrapper",children:(0,a.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,a.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,a.jsx)("h2",{className:"m-0 text-white text-base",children:"Shell"}),(0,a.jsx)("hr",{className:"opacity-20"}),(0,a.jsx)("div",{id:"shell",className:"relative grow z-50 overflow-hidden w-full h-[340px]"})]})})}),(0,a.jsx)("section",{className:"paper bg-slate-500",id:"terminalWrapper",children:(0,a.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,a.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,a.jsx)("h2",{className:"m-0 text-white text-base",children:"Server Log"}),(0,a.jsx)("hr",{className:"opacity-20"}),(0,a.jsx)("div",{id:"terminal",className:"relative grow z-50 overflow-hidden w-full h-[150px]"})]})})})]})]})}[n,o]=c.then?(await c)():c,r()}catch(e){r(e)}})},20008:(e,t,s)=>{"use strict";async function r({socket:e}){let{Terminal:t}=s(86182),{FitAddon:r}=s(91999),a=new r,i=document.getElementById("terminalWrapper"),l=document.getElementById("terminal"),n=Math.round(i.clientWidth/12),o=new t({cols:n,rows:6});o.open(l),a.fit(),e.on("console",e=>{o.write(e)});{let s=new r,a=document.getElementById("shell"),i=new t({cols:n,rows:17});i.open(a),s.fit(),e.on("shell",e=>{i.write(e)}),i.onKey((t,s)=>{e.emit("shell",t.key)})}return o}s.d(t,{A:()=>r})},21711:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.r(t),s.d(t,{default:()=>u,getServerSideProps:()=>d});var a=s(8732);s(82015);var i=s(93615),l=s.n(i),n=s(49888),o=s(54254);s(68353);var c=e([o]);function u({user:e,data:t,socketDomain:s}){let r=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Console | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,a.jsx)(n.A,{head:r,user:e,children:(0,a.jsx)(o.A,{socketDomain:s})})}async function d({req:e,res:t,query:s}){let r=await l()(e);if(!r?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let a=process.env.DSQL_SOCKET_DOMAIN;return{props:{user:r,socketDomain:a||""}}}o=(c.then?(await c)():c)[0],r()}catch(e){r(e)}})},68353:()=>{},40361:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{"use strict";e.exports=require("next/head")},82015:e=>{"use strict";e.exports=require("react")},22326:e=>{"use strict";e.exports=require("react-dom")},8732:e=>{"use strict";e.exports=require("react/jsx-runtime")},86182:e=>{"use strict";e.exports=require("xterm")},91999:e=>{"use strict";e.exports=require("xterm-addon-fit")},79428:e=>{"use strict";e.exports=require("buffer")},55511:e=>{"use strict";e.exports=require("crypto")},81630:e=>{"use strict";e.exports=require("http")},33873:e=>{"use strict";e.exports=require("path")},39127:e=>{"use strict";e.exports=import("ansi-regex")},10717:e=>{"use strict";e.exports=import("socket.io-client")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600,3932],()=>s(509));module.exports=r})(); \ No newline at end of file +(()=>{var e={};e.id=866,e.ids=[866],e.modules={76747:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.r(t),s.d(t,{config:()=>h,default:()=>d,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>p,reportWebVitals:()=>g,routeModule:()=>b,unstable_getServerProps:()=>w,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>f});var a=s(63865),i=s(9455),l=s(30671),n=s(5583),c=s(19796),o=s(35301),u=e([o]);o=(u.then?(await u)():u)[0];let d=(0,l.M)(o,"default"),p=(0,l.M)(o,"getStaticProps"),m=(0,l.M)(o,"getStaticPaths"),x=(0,l.M)(o,"getServerSideProps"),h=(0,l.M)(o,"config"),g=(0,l.M)(o,"reportWebVitals"),f=(0,l.M)(o,"unstable_getStaticProps"),v=(0,l.M)(o,"unstable_getStaticPaths"),S=(0,l.M)(o,"unstable_getStaticParams"),w=(0,l.M)(o,"unstable_getServerProps"),j=(0,l.M)(o,"unstable_getServerSideProps"),b=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/console",pathname:"/su/console",bundlePath:"",filename:""},components:{App:c.default,Document:n.default},userland:o});r()}catch(e){r(e)}})},26988:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.d(t,{A:()=>u});var a=s(8732),i=s(82015),l=s.n(i),n=s(10717);s(74182);var c=s(39127),o=e([n,c]);function u({socketDomain:e}){let[t,s]=l().useState(null),[r,i]=l().useState(null),[n,c]=l().useState("");return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsx)("h2",{className:"text-2xl m-0",children:"Console"}),(0,a.jsx)("button",{onClick:e=>{t&&t.emit("log","Logging to the console")},children:"Log console"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full items-stretch",children:[(0,a.jsx)("section",{className:"paper bg-slate-900",id:"terminalWrapper",children:(0,a.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,a.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,a.jsx)("h2",{className:"m-0 text-white text-base",children:"Shell"}),(0,a.jsx)("hr",{className:"opacity-20"}),(0,a.jsx)("div",{id:"shell",className:"relative grow z-50 overflow-hidden w-full h-[340px]"})]})})}),(0,a.jsx)("section",{className:"paper bg-slate-500",id:"terminalWrapper",children:(0,a.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,a.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,a.jsx)("h2",{className:"m-0 text-white text-base",children:"Server Log"}),(0,a.jsx)("hr",{className:"opacity-20"}),(0,a.jsx)("div",{id:"terminal",className:"relative grow z-50 overflow-hidden w-full h-[150px]"})]})})})]})]})}[n,c]=o.then?(await o)():o,r()}catch(e){r(e)}})},74182:(e,t,s)=>{"use strict";async function r({socket:e}){let{Terminal:t}=s(86182),{FitAddon:r}=s(91999),a=new r,i=document.getElementById("terminalWrapper"),l=document.getElementById("terminal"),n=Math.round(i.clientWidth/12),c=new t({cols:n,rows:6});c.open(l),a.fit(),e.on("console",e=>{c.write(e)});{let s=new r,a=document.getElementById("shell"),i=new t({cols:n,rows:17});i.open(a),s.fit(),e.on("shell",e=>{i.write(e)}),i.onKey((t,s)=>{e.emit("shell",t.key)})}return c}s.d(t,{A:()=>r})},35301:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.r(t),s.d(t,{default:()=>o,getServerSideProps:()=>u});var a=s(8732);s(82015);var i=s(61197),l=s(40778),n=s(26988);s(68353);var c=e([n]);function o({user:e,data:t,socketDomain:s}){let r=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Console | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,a.jsx)(l.A,{head:r,user:e,children:(0,a.jsx)(n.A,{socketDomain:s})})}async function u({req:e,res:t,query:s}){let r=await (0,i.A)(e);if(!r?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let a=process.env.DSQL_SOCKET_DOMAIN;return{props:{user:r,socketDomain:a||""}}}n=(c.then?(await c)():c)[0],r()}catch(e){r(e)}})},68353:()=>{},13893:e=>{"use strict";e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{"use strict";e.exports=require("next/head")},82015:e=>{"use strict";e.exports=require("react")},22326:e=>{"use strict";e.exports=require("react-dom")},8732:e=>{"use strict";e.exports=require("react/jsx-runtime")},86182:e=>{"use strict";e.exports=require("xterm")},91999:e=>{"use strict";e.exports=require("xterm-addon-fit")},79428:e=>{"use strict";e.exports=require("buffer")},55511:e=>{"use strict";e.exports=require("crypto")},33873:e=>{"use strict";e.exports=require("path")},39127:e=>{"use strict";e.exports=import("ansi-regex")},10717:e=>{"use strict";e.exports=import("socket.io-client")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796,6622],()=>s(76747));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/console.js.nft.json b/dsql-app/.local_dist/server/pages/su/console.js.nft.json index 5dd87d4..e97499f 100644 --- a/dsql-app/.local_dist/server/pages/su/console.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/console.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@socket.io/component-emitter/lib/cjs/index.js","../../../../node_modules/@socket.io/component-emitter/lib/cjs/package.json","../../../../node_modules/@socket.io/component-emitter/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/ansi-regex/index.js","../../../../node_modules/ansi-regex/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/debug/package.json","../../../../node_modules/debug/src/browser.js","../../../../node_modules/debug/src/common.js","../../../../node_modules/debug/src/index.js","../../../../node_modules/debug/src/node.js","../../../../node_modules/engine.io-client/build/cjs/contrib/has-cors.js","../../../../node_modules/engine.io-client/build/cjs/contrib/parseqs.js","../../../../node_modules/engine.io-client/build/cjs/contrib/parseuri.js","../../../../node_modules/engine.io-client/build/cjs/globals.node.js","../../../../node_modules/engine.io-client/build/cjs/index.js","../../../../node_modules/engine.io-client/build/cjs/package.json","../../../../node_modules/engine.io-client/build/cjs/socket.js","../../../../node_modules/engine.io-client/build/cjs/transport.js","../../../../node_modules/engine.io-client/build/cjs/transports/index.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling-fetch.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling-xhr.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling.js","../../../../node_modules/engine.io-client/build/cjs/transports/websocket.js","../../../../node_modules/engine.io-client/build/cjs/transports/websocket.node.js","../../../../node_modules/engine.io-client/build/cjs/transports/webtransport.js","../../../../node_modules/engine.io-client/build/cjs/util.js","../../../../node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js","../../../../node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js","../../../../node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js","../../../../node_modules/engine.io-client/build/esm-debug/globals.node.js","../../../../node_modules/engine.io-client/build/esm-debug/index.js","../../../../node_modules/engine.io-client/build/esm-debug/package.json","../../../../node_modules/engine.io-client/build/esm-debug/socket.js","../../../../node_modules/engine.io-client/build/esm-debug/transport.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/index.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/websocket.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/webtransport.js","../../../../node_modules/engine.io-client/build/esm-debug/util.js","../../../../node_modules/engine.io-client/package.json","../../../../node_modules/engine.io-parser/build/cjs/commons.js","../../../../node_modules/engine.io-parser/build/cjs/decodePacket.js","../../../../node_modules/engine.io-parser/build/cjs/encodePacket.js","../../../../node_modules/engine.io-parser/build/cjs/index.js","../../../../node_modules/engine.io-parser/build/cjs/package.json","../../../../node_modules/engine.io-parser/build/esm/commons.js","../../../../node_modules/engine.io-parser/build/esm/decodePacket.js","../../../../node_modules/engine.io-parser/build/esm/encodePacket.js","../../../../node_modules/engine.io-parser/build/esm/index.js","../../../../node_modules/engine.io-parser/build/esm/package.json","../../../../node_modules/engine.io-parser/package.json","../../../../node_modules/ms/index.js","../../../../node_modules/ms/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/socket.io-client/build/cjs/contrib/backo2.js","../../../../node_modules/socket.io-client/build/cjs/index.js","../../../../node_modules/socket.io-client/build/cjs/manager.js","../../../../node_modules/socket.io-client/build/cjs/on.js","../../../../node_modules/socket.io-client/build/cjs/socket.js","../../../../node_modules/socket.io-client/build/cjs/url.js","../../../../node_modules/socket.io-client/build/esm-debug/contrib/backo2.js","../../../../node_modules/socket.io-client/build/esm-debug/index.js","../../../../node_modules/socket.io-client/build/esm-debug/manager.js","../../../../node_modules/socket.io-client/build/esm-debug/on.js","../../../../node_modules/socket.io-client/build/esm-debug/package.json","../../../../node_modules/socket.io-client/build/esm-debug/socket.js","../../../../node_modules/socket.io-client/build/esm-debug/url.js","../../../../node_modules/socket.io-client/package.json","../../../../node_modules/socket.io-parser/build/cjs/binary.js","../../../../node_modules/socket.io-parser/build/cjs/index.js","../../../../node_modules/socket.io-parser/build/cjs/is-binary.js","../../../../node_modules/socket.io-parser/build/cjs/package.json","../../../../node_modules/socket.io-parser/build/esm-debug/binary.js","../../../../node_modules/socket.io-parser/build/esm-debug/index.js","../../../../node_modules/socket.io-parser/build/esm-debug/is-binary.js","../../../../node_modules/socket.io-parser/build/esm-debug/package.json","../../../../node_modules/socket.io-parser/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/ws/index.js","../../../../node_modules/ws/lib/buffer-util.js","../../../../node_modules/ws/lib/constants.js","../../../../node_modules/ws/lib/event-target.js","../../../../node_modules/ws/lib/extension.js","../../../../node_modules/ws/lib/limiter.js","../../../../node_modules/ws/lib/permessage-deflate.js","../../../../node_modules/ws/lib/receiver.js","../../../../node_modules/ws/lib/sender.js","../../../../node_modules/ws/lib/stream.js","../../../../node_modules/ws/lib/subprotocol.js","../../../../node_modules/ws/lib/validation.js","../../../../node_modules/ws/lib/websocket-server.js","../../../../node_modules/ws/lib/websocket.js","../../../../node_modules/ws/package.json","../../../../node_modules/ws/wrapper.mjs","../../../../node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js","../../../../node_modules/xmlhttprequest-ssl/package.json","../../../../node_modules/xterm-addon-fit/lib/xterm-addon-fit.js","../../../../node_modules/xterm-addon-fit/package.json","../../../../node_modules/xterm/lib/xterm.js","../../../../node_modules/xterm/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@socket.io/component-emitter/lib/cjs/index.js","../../../../node_modules/@socket.io/component-emitter/lib/cjs/package.json","../../../../node_modules/@socket.io/component-emitter/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/ansi-regex/index.js","../../../../node_modules/ansi-regex/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/debug/package.json","../../../../node_modules/debug/src/browser.js","../../../../node_modules/debug/src/common.js","../../../../node_modules/debug/src/index.js","../../../../node_modules/debug/src/node.js","../../../../node_modules/engine.io-client/build/cjs/contrib/has-cors.js","../../../../node_modules/engine.io-client/build/cjs/contrib/parseqs.js","../../../../node_modules/engine.io-client/build/cjs/contrib/parseuri.js","../../../../node_modules/engine.io-client/build/cjs/globals.node.js","../../../../node_modules/engine.io-client/build/cjs/index.js","../../../../node_modules/engine.io-client/build/cjs/package.json","../../../../node_modules/engine.io-client/build/cjs/socket.js","../../../../node_modules/engine.io-client/build/cjs/transport.js","../../../../node_modules/engine.io-client/build/cjs/transports/index.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling-fetch.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling-xhr.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js","../../../../node_modules/engine.io-client/build/cjs/transports/polling.js","../../../../node_modules/engine.io-client/build/cjs/transports/websocket.js","../../../../node_modules/engine.io-client/build/cjs/transports/websocket.node.js","../../../../node_modules/engine.io-client/build/cjs/transports/webtransport.js","../../../../node_modules/engine.io-client/build/cjs/util.js","../../../../node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js","../../../../node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js","../../../../node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js","../../../../node_modules/engine.io-client/build/esm-debug/globals.node.js","../../../../node_modules/engine.io-client/build/esm-debug/index.js","../../../../node_modules/engine.io-client/build/esm-debug/package.json","../../../../node_modules/engine.io-client/build/esm-debug/socket.js","../../../../node_modules/engine.io-client/build/esm-debug/transport.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/index.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/polling.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/websocket.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js","../../../../node_modules/engine.io-client/build/esm-debug/transports/webtransport.js","../../../../node_modules/engine.io-client/build/esm-debug/util.js","../../../../node_modules/engine.io-client/package.json","../../../../node_modules/engine.io-parser/build/cjs/commons.js","../../../../node_modules/engine.io-parser/build/cjs/decodePacket.js","../../../../node_modules/engine.io-parser/build/cjs/encodePacket.js","../../../../node_modules/engine.io-parser/build/cjs/index.js","../../../../node_modules/engine.io-parser/build/cjs/package.json","../../../../node_modules/engine.io-parser/build/esm/commons.js","../../../../node_modules/engine.io-parser/build/esm/decodePacket.js","../../../../node_modules/engine.io-parser/build/esm/encodePacket.js","../../../../node_modules/engine.io-parser/build/esm/index.js","../../../../node_modules/engine.io-parser/build/esm/package.json","../../../../node_modules/engine.io-parser/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/ms/index.js","../../../../node_modules/ms/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/socket.io-client/build/cjs/contrib/backo2.js","../../../../node_modules/socket.io-client/build/cjs/index.js","../../../../node_modules/socket.io-client/build/cjs/manager.js","../../../../node_modules/socket.io-client/build/cjs/on.js","../../../../node_modules/socket.io-client/build/cjs/socket.js","../../../../node_modules/socket.io-client/build/cjs/url.js","../../../../node_modules/socket.io-client/build/esm-debug/contrib/backo2.js","../../../../node_modules/socket.io-client/build/esm-debug/index.js","../../../../node_modules/socket.io-client/build/esm-debug/manager.js","../../../../node_modules/socket.io-client/build/esm-debug/on.js","../../../../node_modules/socket.io-client/build/esm-debug/package.json","../../../../node_modules/socket.io-client/build/esm-debug/socket.js","../../../../node_modules/socket.io-client/build/esm-debug/url.js","../../../../node_modules/socket.io-client/package.json","../../../../node_modules/socket.io-parser/build/cjs/binary.js","../../../../node_modules/socket.io-parser/build/cjs/index.js","../../../../node_modules/socket.io-parser/build/cjs/is-binary.js","../../../../node_modules/socket.io-parser/build/cjs/package.json","../../../../node_modules/socket.io-parser/build/esm-debug/binary.js","../../../../node_modules/socket.io-parser/build/esm-debug/index.js","../../../../node_modules/socket.io-parser/build/esm-debug/is-binary.js","../../../../node_modules/socket.io-parser/build/esm-debug/package.json","../../../../node_modules/socket.io-parser/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js","../../../../node_modules/xmlhttprequest-ssl/package.json","../../../../node_modules/xterm-addon-fit/lib/xterm-addon-fit.js","../../../../node_modules/xterm-addon-fit/package.json","../../../../node_modules/xterm/lib/xterm.js","../../../../node_modules/xterm/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs.js b/dsql-app/.local_dist/server/pages/su/docs.js index fcc1f1d..a7992ff 100644 --- a/dsql-app/.local_dist/server/pages/su/docs.js +++ b/dsql-app/.local_dist/server/pages/su/docs.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3402,e.ids=[3402],e.modules={43193:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>v,getServerSideProps:()=>f,getStaticPaths:()=>_,getStaticProps:()=>b,reportWebVitals:()=>q,routeModule:()=>w,unstable_getServerProps:()=>E,unstable_getServerSideProps:()=>R,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>M});var s={};r.r(s),r.d(s,{default:()=>P,getServerSideProps:()=>m});var a=r(63865),i=r(9455),o=r(30671),n=r(49407),u=r(89600),d=r(8732);r(82015);var p=r(93615),l=r.n(p),c=r(49888),g=r(59200),S=r(67216),x=r.n(S);function P({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(c.A,{head:r,user:e,children:(0,d.jsx)(g.A,{data:t})})}async function m({req:e,res:t,query:r}){let s=await l()(e);return s?.logged_in_status?{props:{user:s,data:{docPages:await x()("SELECT * FROM docs_pages WHERE level=1 ORDER BY page_order ASC"),env:"dev_dev"}}}:{redirect:{destination:"/su/login",permanent:!1}}}let v=(0,o.M)(s,"default"),b=(0,o.M)(s,"getStaticProps"),_=(0,o.M)(s,"getStaticPaths"),f=(0,o.M)(s,"getServerSideProps"),h=(0,o.M)(s,"config"),q=(0,o.M)(s,"reportWebVitals"),M=(0,o.M)(s,"unstable_getStaticProps"),j=(0,o.M)(s,"unstable_getStaticPaths"),A=(0,o.M)(s,"unstable_getStaticParams"),E=(0,o.M)(s,"unstable_getServerProps"),R=(0,o.M)(s,"unstable_getServerSideProps"),w=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs",pathname:"/su/docs",bundlePath:"",filename:""},components:{App:u.default,Document:n.default},userland:s})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,3932,4333],()=>r(43193));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3402,e.ids=[3402],e.modules={12025:(e,t,s)=>{s.r(t),s.d(t,{config:()=>S,default:()=>g,getServerSideProps:()=>v,getStaticPaths:()=>j,getStaticProps:()=>f,reportWebVitals:()=>b,routeModule:()=>k,unstable_getServerProps:()=>N,unstable_getServerSideProps:()=>_,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>P,unstable_getStaticProps:()=>w});var a={};s.r(a),s.d(a,{default:()=>h,getServerSideProps:()=>x});var r=s(63865),i=s(9455),l=s(30671),n=s(5583),o=s(19796),d=s(8732);s(82015);var c=s(61197),u=s(40778),p=s(93035),m=s(71934);function h({user:e,data:t}){let s=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(u.A,{head:s,user:e,children:(0,d.jsx)(p.A,{data:t})})}async function x({req:e,res:t,query:s}){let a=await (0,c.A)(e);return a?.logged_in_status?{props:{user:a,data:{docPages:await (0,m.A)("SELECT * FROM docs_pages WHERE level=1 ORDER BY page_order ASC"),env:"dev_dev"}}}:{redirect:{destination:"/su/login",permanent:!1}}}let g=(0,l.M)(a,"default"),f=(0,l.M)(a,"getStaticProps"),j=(0,l.M)(a,"getStaticPaths"),v=(0,l.M)(a,"getServerSideProps"),S=(0,l.M)(a,"config"),b=(0,l.M)(a,"reportWebVitals"),w=(0,l.M)(a,"unstable_getStaticProps"),P=(0,l.M)(a,"unstable_getStaticPaths"),y=(0,l.M)(a,"unstable_getStaticParams"),N=(0,l.M)(a,"unstable_getServerProps"),_=(0,l.M)(a,"unstable_getServerSideProps"),k=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs",pathname:"/su/docs",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:a})},55904:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(8732),r=s(82015),i=s.n(r);function l({children:e,column:t,className:s}){let r=i().useRef();return(0,a.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:r,children:e})}},93035:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(8732),r=s(82015),i=s.n(r),l=s(46169),n=s(16757),o=s(82544);let d=(0,o.A)("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]),c=(0,o.A)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);function u({docPageObject:e}){let[t,s]=i().useState(!1),[r,o]=i().useState([]);return(0,a.jsxs)("div",{className:"card col relative cursor-pointer",onClick:t=>{t.target?.closest(".cancel-link")?t.preventDefault():window.location.pathname=`/su/docs/pages/${e.id}`},children:[t&&(0,a.jsx)(n.A,{width:"20px"}),(0,a.jsxs)("div",{className:"w-full items-start",children:[(0,a.jsx)(d,{}),(0,a.jsxs)("div",{className:"flex-col items-start gap-0 relative z-10",children:[(0,a.jsx)("span",{className:"title",children:e.title}),(0,a.jsx)("span",{className:"-my-3",dangerouslySetInnerHTML:{__html:e.description||""}})]}),(0,a.jsxs)("div",{className:"ml-auto cancel-link",children:[(0,a.jsx)("button",{onClick:()=>{window.location.href=`/su/docs/edit-page?id=${e.id}`},className:"outlined small-text light-gray",children:"Edit Page"}),(0,a.jsx)("button",{onClick:()=>{window.confirm("Delete this page?")&&(s(!0),(0,l.A)("/api/admin/docs/delete-page",{method:"post",body:e}).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{s(!1)},1e3)}))},className:"outlined small-text light-gray",children:"Delete Page"})]})]}),r&&(0,a.jsxs)("div",{className:"-mt-[40px] pt-[40px] ml-[10px] pl-[20px] border-0 border-l border-slate-200 border-solid w-full flex-col items-start cancel-link",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c,{}),(0,a.jsx)("span",{className:"text-slate-300 font-semibold",children:"Children Pages"})]}),r.map((e,t)=>(0,a.jsxs)("div",{className:"card w-full",onClick:()=>{window.location.pathname=`/su/docs/pages/${e.id}`},children:[(0,a.jsx)(d,{}),(0,a.jsx)("span",{children:e.title})]},t))]})]})}var p=s(55904);function m({data:e}){let{env:t}=e,s=e.docPages,[r,o]=i().useState(!1);function d(e){window.confirm(e?"Update Docs DB from JSON file?":"Update docs json file?")&&(o(!0),(0,l.A)("/api/admin/docs/persist",{method:"post",body:{pull:e}}).then(t=>{t.success?window.alert(e?"Docs database table Updated Sucessfully!":"JSON data written Successfully!"):window.alert("Operation failed!"),setTimeout(()=>{o(!1)},1e3)}).catch(e=>{setTimeout(()=>{o(!1)},1e3)}))}return(0,a.jsxs)(i().Fragment,{children:[r&&(0,a.jsx)(n.A,{}),(0,a.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full mb-6",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Documentation Pages"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("a",{href:"/su/docs/create-page",className:"button",children:"Create Page"}),(0,a.jsxs)(p.A,{children:[(0,a.jsx)("button",{className:"outlined gray",onClick:()=>{d(!1)},children:"Push"}),(0,a.jsx)("button",{className:"outlined gray",onClick:()=>{d(!0)},children:"Pull"})]})]})]}),(0,a.jsx)("div",{className:"paper flex-col items-stretch gap-10 w-full",children:s.map((e,t)=>(0,a.jsx)(u,{docPageObject:e},t))})]})]})}},71934:(e,t,s)=>{s.d(t,{A:()=>a});async function a(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9796,6622],()=>s(12025));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs.js.nft.json b/dsql-app/.local_dist/server/pages/su/docs.js.nft.json index b998a4f..817b606 100644 --- a/dsql-app/.local_dist/server/pages/su/docs.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/docs.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/create-page.js b/dsql-app/.local_dist/server/pages/su/docs/create-page.js index b5452d0..802ed84 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/create-page.js +++ b/dsql-app/.local_dist/server/pages/su/docs/create-page.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=179,e.ids=[179],e.modules={52175:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>b,getServerSideProps:()=>f,getStaticPaths:()=>q,getStaticProps:()=>v,reportWebVitals:()=>M,routeModule:()=>w,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>_});var s={};r.r(s),r.d(s,{default:()=>m,getServerSideProps:()=>P});var a=r(63865),i=r(9455),o=r(30671),u=r(49407),n=r(89600),p=r(8732);r(82015);var d=r(93615),c=r.n(d),l=r(49888),g=r(50129),S=r(67216),x=r.n(S);function m({user:e,data:t}){let r=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,p.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,p.jsx)(l.A,{head:r,user:e,children:(0,p.jsx)(g.A,{data:t,user:e})})}async function P({req:e,res:t,query:r}){let s=await c()(e);return s?.logged_in_status?{props:{user:s,data:{docPages:await x()("SELECT * FROM docs_pages WHERE level=0")}}}:{redirect:{destination:"/su/login",permanent:!1}}}let b=(0,o.M)(s,"default"),v=(0,o.M)(s,"getStaticProps"),q=(0,o.M)(s,"getStaticPaths"),f=(0,o.M)(s,"getServerSideProps"),h=(0,o.M)(s,"config"),M=(0,o.M)(s,"reportWebVitals"),_=(0,o.M)(s,"unstable_getStaticProps"),j=(0,o.M)(s,"unstable_getStaticPaths"),y=(0,o.M)(s,"unstable_getStaticParams"),A=(0,o.M)(s,"unstable_getServerProps"),E=(0,o.M)(s,"unstable_getServerSideProps"),w=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/create-page",pathname:"/su/docs/create-page",bundlePath:"",filename:""},components:{App:n.default,Document:u.default},userland:s})},40373:e=>{e.exports=require("@tinymce/tinymce-react")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,3737,3932,5664],()=>r(52175));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=179,e.ids=[179],e.modules={78918:(e,t,r)=>{r.r(t),r.d(t,{config:()=>f,default:()=>P,getServerSideProps:()=>v,getStaticPaths:()=>b,getStaticProps:()=>x,reportWebVitals:()=>h,routeModule:()=>y,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>A,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>M});var a={};r.r(a),r.d(a,{default:()=>S,getServerSideProps:()=>m});var s=r(63865),i=r(9455),o=r(30671),u=r(5583),n=r(19796),d=r(8732);r(82015);var p=r(61197),c=r(40778),l=r(55016),g=r(71934);function S({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(c.A,{head:r,user:e,children:(0,d.jsx)(l.A,{data:t,user:e})})}async function m({req:e,res:t,query:r}){let a=await (0,p.A)(e);return a?.logged_in_status?{props:{user:a,data:{docPages:await (0,g.A)("SELECT * FROM docs_pages WHERE level=0")}}}:{redirect:{destination:"/su/login",permanent:!1}}}let P=(0,o.M)(a,"default"),x=(0,o.M)(a,"getStaticProps"),b=(0,o.M)(a,"getStaticPaths"),v=(0,o.M)(a,"getServerSideProps"),f=(0,o.M)(a,"config"),h=(0,o.M)(a,"reportWebVitals"),M=(0,o.M)(a,"unstable_getStaticProps"),q=(0,o.M)(a,"unstable_getStaticPaths"),_=(0,o.M)(a,"unstable_getStaticParams"),j=(0,o.M)(a,"unstable_getServerProps"),A=(0,o.M)(a,"unstable_getServerSideProps"),y=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/create-page",pathname:"/su/docs/create-page",bundlePath:"",filename:""},components:{App:n.default,Document:u.default},userland:a})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,6622,3155,6903],()=>r(78918));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/create-page.js.nft.json b/dsql-app/.local_dist/server/pages/su/docs/create-page.js.nft.json index df66300..7308825 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/create-page.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/docs/create-page.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/object-assign/index.js","../../../../../node_modules/object-assign/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../node_modules/prop-types/index.js","../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../node_modules/prop-types/lib/has.js","../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../node_modules/prop-types/node_modules/react-is/package.json","../../../../../node_modules/prop-types/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/object-assign/index.js","../../../../../node_modules/object-assign/package.json","../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../node_modules/prop-types/index.js","../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../node_modules/prop-types/lib/has.js","../../../../../node_modules/prop-types/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react-is/cjs/react-is.development.js","../../../../../node_modules/react-is/cjs/react-is.production.min.js","../../../../../node_modules/react-is/index.js","../../../../../node_modules/react-is/package.json","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/edit-page.js b/dsql-app/.local_dist/server/pages/su/docs/edit-page.js index 4a9cb59..1ee3cba 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/edit-page.js +++ b/dsql-app/.local_dist/server/pages/su/docs/edit-page.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5700,e.ids=[5700],e.modules={3693:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>b,getServerSideProps:()=>v,getStaticPaths:()=>q,getStaticProps:()=>f,reportWebVitals:()=>M,routeModule:()=>w,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>_});var s={};r.r(s),r.d(s,{default:()=>x,getServerSideProps:()=>P});var a=r(63865),i=r(9455),n=r(30671),o=r(49407),u=r(89600),d=r(8732);r(82015);var p=r(93615),c=r.n(p),l=r(49888),g=r(50129),S=r(67216),m=r.n(S);function x({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(l.A,{head:r,user:e,children:(0,d.jsx)(g.A,{data:t,user:e})})}async function P({req:e,res:t,query:r}){let s=await c()(e);if(!s?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let a=await m()("SELECT * FROM docs_pages WHERE id=?",[r.id]);return a&&Array.isArray(a)&&a[0]?{props:{user:s,data:a[0]}}:{redirect:{destination:"/su/docs",permanent:!1}}}let b=(0,n.M)(s,"default"),f=(0,n.M)(s,"getStaticProps"),q=(0,n.M)(s,"getStaticPaths"),v=(0,n.M)(s,"getServerSideProps"),h=(0,n.M)(s,"config"),M=(0,n.M)(s,"reportWebVitals"),_=(0,n.M)(s,"unstable_getStaticProps"),j=(0,n.M)(s,"unstable_getStaticPaths"),y=(0,n.M)(s,"unstable_getStaticParams"),A=(0,n.M)(s,"unstable_getServerProps"),E=(0,n.M)(s,"unstable_getServerSideProps"),w=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/edit-page",pathname:"/su/docs/edit-page",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:s})},40373:e=>{e.exports=require("@tinymce/tinymce-react")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,3737,3932,5664],()=>r(3693));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5700,e.ids=[5700],e.modules={55564:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>x,getServerSideProps:()=>f,getStaticPaths:()=>b,getStaticProps:()=>P,reportWebVitals:()=>v,routeModule:()=>y,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>M});var a={};r.r(a),r.d(a,{default:()=>S,getServerSideProps:()=>m});var s=r(63865),i=r(9455),n=r(30671),o=r(5583),u=r(19796),d=r(8732);r(82015);var p=r(61197),c=r(40778),l=r(55016),g=r(71934);function S({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(c.A,{head:r,user:e,children:(0,d.jsx)(l.A,{data:t,user:e})})}async function m({req:e,res:t,query:r}){let a=await (0,p.A)(e);if(!a?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let s=await (0,g.A)("SELECT * FROM docs_pages WHERE id=?",[r.id]);return s&&Array.isArray(s)&&s[0]?{props:{user:a,data:s[0]}}:{redirect:{destination:"/su/docs",permanent:!1}}}let x=(0,n.M)(a,"default"),P=(0,n.M)(a,"getStaticProps"),b=(0,n.M)(a,"getStaticPaths"),f=(0,n.M)(a,"getServerSideProps"),h=(0,n.M)(a,"config"),v=(0,n.M)(a,"reportWebVitals"),M=(0,n.M)(a,"unstable_getStaticProps"),q=(0,n.M)(a,"unstable_getStaticPaths"),_=(0,n.M)(a,"unstable_getStaticParams"),A=(0,n.M)(a,"unstable_getServerProps"),j=(0,n.M)(a,"unstable_getServerSideProps"),y=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/edit-page",pathname:"/su/docs/edit-page",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:a})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,6622,3155,6903],()=>r(55564));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/edit-page.js.nft.json b/dsql-app/.local_dist/server/pages/su/docs/edit-page.js.nft.json index df66300..7308825 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/edit-page.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/docs/edit-page.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/object-assign/index.js","../../../../../node_modules/object-assign/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../node_modules/prop-types/index.js","../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../node_modules/prop-types/lib/has.js","../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../node_modules/prop-types/node_modules/react-is/package.json","../../../../../node_modules/prop-types/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/object-assign/index.js","../../../../../node_modules/object-assign/package.json","../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../node_modules/prop-types/index.js","../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../node_modules/prop-types/lib/has.js","../../../../../node_modules/prop-types/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react-is/cjs/react-is.development.js","../../../../../node_modules/react-is/cjs/react-is.production.min.js","../../../../../node_modules/react-is/index.js","../../../../../node_modules/react-is/package.json","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/pages.js b/dsql-app/.local_dist/server/pages/su/docs/pages.js index 9a9a18e..2d6b0a6 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/pages.js +++ b/dsql-app/.local_dist/server/pages/su/docs/pages.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=99,e.ids=[99],e.modules={93836:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>v,getServerSideProps:()=>f,getStaticPaths:()=>_,getStaticProps:()=>b,reportWebVitals:()=>q,routeModule:()=>w,unstable_getServerProps:()=>E,unstable_getServerSideProps:()=>R,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>M});var s={};r.r(s),r.d(s,{default:()=>P,getServerSideProps:()=>m});var a=r(63865),i=r(9455),o=r(30671),n=r(49407),u=r(89600),p=r(8732);r(82015);var d=r(93615),l=r.n(d),c=r(49888),g=r(59200),S=r(67216),x=r.n(S);function P({user:e,data:t}){let r=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,p.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,p.jsx)(c.A,{head:r,user:e,children:(0,p.jsx)(g.A,{data:t})})}async function m({req:e,res:t,query:r}){let s=await l()(e);return s?.logged_in_status?{props:{user:s,data:{docPages:await x()("SELECT * FROM docs_pages WHERE level=1 ORDER BY page_order ASC"),env:"dev_dev"}}}:{redirect:{destination:"/su/login",permanent:!1}}}let v=(0,o.M)(s,"default"),b=(0,o.M)(s,"getStaticProps"),_=(0,o.M)(s,"getStaticPaths"),f=(0,o.M)(s,"getServerSideProps"),h=(0,o.M)(s,"config"),q=(0,o.M)(s,"reportWebVitals"),M=(0,o.M)(s,"unstable_getStaticProps"),j=(0,o.M)(s,"unstable_getStaticPaths"),A=(0,o.M)(s,"unstable_getStaticParams"),E=(0,o.M)(s,"unstable_getServerProps"),R=(0,o.M)(s,"unstable_getServerSideProps"),w=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/pages",pathname:"/su/docs/pages",bundlePath:"",filename:""},components:{App:u.default,Document:n.default},userland:s})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,3932,4333],()=>r(93836));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=99,e.ids=[99],e.modules={94572:(e,t,s)=>{s.r(t),s.d(t,{config:()=>S,default:()=>g,getServerSideProps:()=>v,getStaticPaths:()=>j,getStaticProps:()=>f,reportWebVitals:()=>b,routeModule:()=>k,unstable_getServerProps:()=>N,unstable_getServerSideProps:()=>_,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>P,unstable_getStaticProps:()=>w});var a={};s.r(a),s.d(a,{default:()=>h,getServerSideProps:()=>x});var r=s(63865),i=s(9455),l=s(30671),n=s(5583),o=s(19796),d=s(8732);s(82015);var c=s(61197),u=s(40778),p=s(93035),m=s(71934);function h({user:e,data:t}){let s=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(u.A,{head:s,user:e,children:(0,d.jsx)(p.A,{data:t})})}async function x({req:e,res:t,query:s}){let a=await (0,c.A)(e);return a?.logged_in_status?{props:{user:a,data:{docPages:await (0,m.A)("SELECT * FROM docs_pages WHERE level=1 ORDER BY page_order ASC"),env:"dev_dev"}}}:{redirect:{destination:"/su/login",permanent:!1}}}let g=(0,l.M)(a,"default"),f=(0,l.M)(a,"getStaticProps"),j=(0,l.M)(a,"getStaticPaths"),v=(0,l.M)(a,"getServerSideProps"),S=(0,l.M)(a,"config"),b=(0,l.M)(a,"reportWebVitals"),w=(0,l.M)(a,"unstable_getStaticProps"),P=(0,l.M)(a,"unstable_getStaticPaths"),y=(0,l.M)(a,"unstable_getStaticParams"),N=(0,l.M)(a,"unstable_getServerProps"),_=(0,l.M)(a,"unstable_getServerSideProps"),k=new r.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/pages",pathname:"/su/docs/pages",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:a})},55904:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(8732),r=s(82015),i=s.n(r);function l({children:e,column:t,className:s}){let r=i().useRef();return(0,a.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:r,children:e})}},93035:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(8732),r=s(82015),i=s.n(r),l=s(46169),n=s(16757),o=s(82544);let d=(0,o.A)("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]),c=(0,o.A)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);function u({docPageObject:e}){let[t,s]=i().useState(!1),[r,o]=i().useState([]);return(0,a.jsxs)("div",{className:"card col relative cursor-pointer",onClick:t=>{t.target?.closest(".cancel-link")?t.preventDefault():window.location.pathname=`/su/docs/pages/${e.id}`},children:[t&&(0,a.jsx)(n.A,{width:"20px"}),(0,a.jsxs)("div",{className:"w-full items-start",children:[(0,a.jsx)(d,{}),(0,a.jsxs)("div",{className:"flex-col items-start gap-0 relative z-10",children:[(0,a.jsx)("span",{className:"title",children:e.title}),(0,a.jsx)("span",{className:"-my-3",dangerouslySetInnerHTML:{__html:e.description||""}})]}),(0,a.jsxs)("div",{className:"ml-auto cancel-link",children:[(0,a.jsx)("button",{onClick:()=>{window.location.href=`/su/docs/edit-page?id=${e.id}`},className:"outlined small-text light-gray",children:"Edit Page"}),(0,a.jsx)("button",{onClick:()=>{window.confirm("Delete this page?")&&(s(!0),(0,l.A)("/api/admin/docs/delete-page",{method:"post",body:e}).then(e=>{e.success&&window.location.reload(),setTimeout(()=>{s(!1)},1e3)}))},className:"outlined small-text light-gray",children:"Delete Page"})]})]}),r&&(0,a.jsxs)("div",{className:"-mt-[40px] pt-[40px] ml-[10px] pl-[20px] border-0 border-l border-slate-200 border-solid w-full flex-col items-start cancel-link",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c,{}),(0,a.jsx)("span",{className:"text-slate-300 font-semibold",children:"Children Pages"})]}),r.map((e,t)=>(0,a.jsxs)("div",{className:"card w-full",onClick:()=>{window.location.pathname=`/su/docs/pages/${e.id}`},children:[(0,a.jsx)(d,{}),(0,a.jsx)("span",{children:e.title})]},t))]})]})}var p=s(55904);function m({data:e}){let{env:t}=e,s=e.docPages,[r,o]=i().useState(!1);function d(e){window.confirm(e?"Update Docs DB from JSON file?":"Update docs json file?")&&(o(!0),(0,l.A)("/api/admin/docs/persist",{method:"post",body:{pull:e}}).then(t=>{t.success?window.alert(e?"Docs database table Updated Sucessfully!":"JSON data written Successfully!"):window.alert("Operation failed!"),setTimeout(()=>{o(!1)},1e3)}).catch(e=>{setTimeout(()=>{o(!1)},1e3)}))}return(0,a.jsxs)(i().Fragment,{children:[r&&(0,a.jsx)(n.A,{}),(0,a.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full mb-6",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Documentation Pages"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("a",{href:"/su/docs/create-page",className:"button",children:"Create Page"}),(0,a.jsxs)(p.A,{children:[(0,a.jsx)("button",{className:"outlined gray",onClick:()=>{d(!1)},children:"Push"}),(0,a.jsx)("button",{className:"outlined gray",onClick:()=>{d(!0)},children:"Pull"})]})]})]}),(0,a.jsx)("div",{className:"paper flex-col items-stretch gap-10 w-full",children:s.map((e,t)=>(0,a.jsx)(u,{docPageObject:e},t))})]})]})}},71934:(e,t,s)=>{s.d(t,{A:()=>a});async function a(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9796,6622],()=>s(94572));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/pages.js.nft.json b/dsql-app/.local_dist/server/pages/su/docs/pages.js.nft.json index 21d1675..b068359 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/pages.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/docs/pages.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js b/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js index e96a391..98ff368 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js +++ b/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=4795,e.ids=[4795],e.modules={81553:(e,t,r)=>{r.r(t),r.d(t,{config:()=>j,default:()=>q,getServerSideProps:()=>_,getStaticPaths:()=>M,getStaticProps:()=>v,reportWebVitals:()=>y,routeModule:()=>F,unstable_getServerProps:()=>D,unstable_getServerSideProps:()=>W,unstable_getStaticParams:()=>w,unstable_getStaticPaths:()=>E,unstable_getStaticProps:()=>A});var s={};r.r(s),r.d(s,{default:()=>f,getServerSideProps:()=>h});var a=r(63865),i=r(9455),n=r(30671),o=r(49407),u=r(89600),d=r(8732),p=r(82015),c=r.n(p),l=r(93615),g=r.n(l),x=r(49888),S=r(50129);function m({data:e,user:t}){let{targetDocPage:r}=e;return(0,d.jsx)(c().Fragment,{children:(0,d.jsx)(S.A,{data:r,user:t})})}var P=r(67216),b=r.n(P);function f({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(x.A,{head:r,user:e,children:(0,d.jsx)(m,{data:t,user:e})})}async function h({req:e,res:t,query:r}){let s=await g()(e);if(!s?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let a=await b()("SELECT * FROM docs_pages WHERE id=?",[r.id]);return a&&Array.isArray(a)&&a[0]?{props:{user:s,data:{targetDocPage:a[0]}}}:{redirect:{destination:"/su/docs",permanent:!1}}}let q=(0,n.M)(s,"default"),v=(0,n.M)(s,"getStaticProps"),M=(0,n.M)(s,"getStaticPaths"),_=(0,n.M)(s,"getServerSideProps"),j=(0,n.M)(s,"config"),y=(0,n.M)(s,"reportWebVitals"),A=(0,n.M)(s,"unstable_getStaticProps"),E=(0,n.M)(s,"unstable_getStaticPaths"),w=(0,n.M)(s,"unstable_getStaticParams"),D=(0,n.M)(s,"unstable_getServerProps"),W=(0,n.M)(s,"unstable_getServerSideProps"),F=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/pages/[id]",pathname:"/su/docs/pages/[id]",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:s})},40373:e=>{e.exports=require("@tinymce/tinymce-react")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,3737,3932,5664],()=>r(81553));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=4795,e.ids=[4795],e.modules={90702:(e,t,r)=>{r.r(t),r.d(t,{config:()=>q,default:()=>f,getServerSideProps:()=>M,getStaticPaths:()=>v,getStaticProps:()=>h,reportWebVitals:()=>_,routeModule:()=>D,unstable_getServerProps:()=>E,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>A,unstable_getStaticProps:()=>j});var a={};r.r(a),r.d(a,{default:()=>P,getServerSideProps:()=>b});var s=r(63865),i=r(9455),n=r(30671),o=r(5583),u=r(19796),d=r(8732),c=r(82015),p=r.n(c),l=r(61197),g=r(40778),S=r(55016);function m({data:e,user:t}){let{targetDocPage:r}=e;return(0,d.jsx)(p().Fragment,{children:(0,d.jsx)(S.A,{data:r,user:t})})}var x=r(71934);function P({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,d.jsx)(g.A,{head:r,user:e,children:(0,d.jsx)(m,{data:t,user:e})})}async function b({req:e,res:t,query:r}){let a=await (0,l.A)(e);if(!a?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let s=await (0,x.A)("SELECT * FROM docs_pages WHERE id=?",[r.id]);return s&&Array.isArray(s)&&s[0]?{props:{user:a,data:{targetDocPage:s[0]}}}:{redirect:{destination:"/su/docs",permanent:!1}}}let f=(0,n.M)(a,"default"),h=(0,n.M)(a,"getStaticProps"),v=(0,n.M)(a,"getStaticPaths"),M=(0,n.M)(a,"getServerSideProps"),q=(0,n.M)(a,"config"),_=(0,n.M)(a,"reportWebVitals"),j=(0,n.M)(a,"unstable_getStaticProps"),A=(0,n.M)(a,"unstable_getStaticPaths"),y=(0,n.M)(a,"unstable_getStaticParams"),E=(0,n.M)(a,"unstable_getServerProps"),w=(0,n.M)(a,"unstable_getServerSideProps"),D=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/docs/pages/[id]",pathname:"/su/docs/pages/[id]",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:a})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40373:e=>{e.exports=require("@tinymce/tinymce-react")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9796,6622,3155,6903],()=>r(90702));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js.nft.json b/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js.nft.json index 7d80749..3496ebf 100644 --- a/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/docs/pages/[id].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/core-util-is/lib/util.js","../../../../../../node_modules/core-util-is/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/isarray/index.js","../../../../../../node_modules/isarray/package.json","../../../../../../node_modules/mysql/index.js","../../../../../../node_modules/mysql/lib/Connection.js","../../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../../node_modules/mysql/lib/Pool.js","../../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../../node_modules/mysql/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/object-assign/index.js","../../../../../../node_modules/object-assign/package.json","../../../../../../node_modules/process-nextick-args/index.js","../../../../../../node_modules/process-nextick-args/package.json","../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../node_modules/prop-types/index.js","../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../node_modules/prop-types/lib/has.js","../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../../node_modules/prop-types/node_modules/react-is/package.json","../../../../../../node_modules/prop-types/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../../node_modules/readable-stream/package.json","../../../../../../node_modules/readable-stream/readable.js","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/serverless-mysql/index.js","../../../../../../node_modules/serverless-mysql/package.json","../../../../../../node_modules/sqlstring/index.js","../../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../../node_modules/sqlstring/package.json","../../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../../node_modules/string_decoder/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../node_modules/util-deprecate/node.js","../../../../../../node_modules/util-deprecate/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1614.js","../../../../chunks/2414.js","../../../../chunks/2451.js","../../../../chunks/2996.js","../../../../chunks/3247.js","../../../../chunks/3460.js","../../../../chunks/3737.js","../../../../chunks/3932.js","../../../../chunks/4050.js","../../../../chunks/4312.js","../../../../chunks/4333.js","../../../../chunks/4385.js","../../../../chunks/45.js","../../../../chunks/5134.js","../../../../chunks/5212.js","../../../../chunks/5264.js","../../../../chunks/5421.js","../../../../chunks/5664.js","../../../../chunks/5674.js","../../../../chunks/6521.js","../../../../chunks/7070.js","../../../../chunks/7640.js","../../../../chunks/8540.js","../../../../chunks/8613.js","../../../../chunks/883.js","../../../../chunks/8842.js","../../../../chunks/9600.js","../../../../chunks/9621.js","../../../../chunks/9732.js","../../../../chunks/9821.js","../../../../chunks/9914.js","../../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/ScriptLoader2.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/TinyMCE.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/Utils.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/Editor.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/components/EditorPropTypes.js","../../../../../../node_modules/@tinymce/tinymce-react/lib/cjs/main/ts/index.js","../../../../../../node_modules/@tinymce/tinymce-react/package.json","../../../../../../node_modules/client-only/index.js","../../../../../../node_modules/client-only/package.json","../../../../../../node_modules/lodash/lodash.js","../../../../../../node_modules/lodash/package.json","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../../node_modules/next/head.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/object-assign/index.js","../../../../../../node_modules/object-assign/package.json","../../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../node_modules/prop-types/index.js","../../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../node_modules/prop-types/lib/has.js","../../../../../../node_modules/prop-types/package.json","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/package.json","../../../../../../node_modules/react-dom/server.browser.js","../../../../../../node_modules/react-is/cjs/react-is.development.js","../../../../../../node_modules/react-is/cjs/react-is.production.min.js","../../../../../../node_modules/react-is/index.js","../../../../../../node_modules/react-is/package.json","../../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.min.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/scheduler/package.json","../../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../../node_modules/styled-jsx/index.js","../../../../../../node_modules/styled-jsx/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1251.js","../../../../chunks/1579.js","../../../../chunks/194.js","../../../../chunks/2282.js","../../../../chunks/3155.js","../../../../chunks/3474.js","../../../../chunks/3496.js","../../../../chunks/3634.js","../../../../chunks/3704.js","../../../../chunks/3791.js","../../../../chunks/4627.js","../../../../chunks/5392.js","../../../../chunks/5839.js","../../../../chunks/5954.js","../../../../chunks/6160.js","../../../../chunks/6202.js","../../../../chunks/6521.js","../../../../chunks/6622.js","../../../../chunks/6903.js","../../../../chunks/725.js","../../../../chunks/7713.js","../../../../chunks/8704.js","../../../../chunks/8760.js","../../../../chunks/883.js","../../../../chunks/9796.js","../../../../chunks/9821.js","../../../../chunks/9901.js","../../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/envar.js b/dsql-app/.local_dist/server/pages/su/envar.js index df0af5b..771b489 100644 --- a/dsql-app/.local_dist/server/pages/su/envar.js +++ b/dsql-app/.local_dist/server/pages/su/envar.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3641,e.ids=[3641],e.modules={65060:(e,t,r)=>{let s;r.r(t),r.d(t,{config:()=>_,default:()=>P,getServerSideProps:()=>M,getStaticPaths:()=>q,getStaticProps:()=>y,reportWebVitals:()=>N,routeModule:()=>D,unstable_getServerProps:()=>E,unstable_getServerSideProps:()=>V,unstable_getStaticParams:()=>C,unstable_getStaticPaths:()=>A,unstable_getStaticProps:()=>k});var a={};r.r(a),r.d(a,{default:()=>j,getServerSideProps:()=>w});var n=r(63865),i=r(9455),o=r(30671),l=r(49407),u=r(89600),d=r(8732),p=r(82015),c=r.n(p),m=r(93615),x=r.n(m),g=r(49888),h=r(32415);require("os");var v=r(63715);function S({envObject:e,envKey:t}){let[r,a]=c().useState(!1),[n,i]=c().useState(!1),[o,l]=c().useState(e[t]),[u,p]=c().useState(!1);return(0,d.jsx)(c().Fragment,{children:(0,d.jsxs)("form",{className:"grid grid-cols-2 items-center gap2 w-full hover:bg-slate-100 py-2 px-4 relative",onSubmit:e=>{e.preventDefault(),r&&(i(!0),setTimeout(()=>{i(!1)},1e3))},children:[n&&(0,d.jsx)(h.A,{width:"20px"}),(0,d.jsx)("span",{children:t}),(0,d.jsxs)("div",{children:[(0,d.jsx)("input",{type:r?"text":"password",onFocus:e=>{"password"==e.target.type&&(e.target.type="text"),p(!0),a(!0)},onBlur:e=>{window.clearTimeout(s),s=setTimeout(()=>{"text"==e.target.type&&(e.target.type="password"),p(!1),a(!1)},2e3)},value:o,onChange:e=>{l(e.target.value)}}),u?(0,d.jsx)("div",{className:"button secondary",onClick:e=>{e.preventDefault(),r&&(i(!0),(0,v.A)("/api/admin/updateEnv",{method:"post",body:{key:t,value:o}}).then(e=>{e.success?window.location.reload():window.alert(e.error)}).finally(()=>{setTimeout(()=>{i(!1)},1e3)}))},children:"Update"}):(0,d.jsx)("div",{className:"button outlined",onClick:e=>{a(!r),p(!0)},children:"Reveal"})]})]})})}function b({data:e}){let{envObject:t}=e,[r,s]=c().useState(t),a=Object.keys(r);return(0,d.jsxs)(c().Fragment,{children:[(0,d.jsxs)("div",{className:"w-full justify-between",children:[(0,d.jsx)("h2",{className:"text-2xl m-0",children:"Environment Variables"}),(0,d.jsx)("button",{onClick:e=>{let t=window.prompt("What is the new ENV name?"),r=window.prompt("ENV Value");t&&r&&s(e=>{let s={...e};return s[t]=r,s})},children:"Add Environment Variable"})]}),(0,d.jsx)("section",{className:"paper",children:a.map((e,t)=>(0,d.jsx)(S,{envObject:r,envKey:e},t))})]})}let f=r(29021);function j({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"Console | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,d.jsx)(g.A,{head:r,user:e,children:(0,d.jsx)(b,{data:t})})}async function w({req:e,res:t,query:r}){let s=await x()(e);if(!s?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let a=f.readFileSync("./.env","utf-8").split(/\n|\r/),n={};return a.forEach(e=>{if(!e.match(/=/)||e.match(/^\#/))return;let t=e.split("=");n[t[0]]=t[1]}),{props:{user:s,data:{envObject:n}}}}let P=(0,o.M)(a,"default"),y=(0,o.M)(a,"getStaticProps"),q=(0,o.M)(a,"getStaticPaths"),M=(0,o.M)(a,"getServerSideProps"),_=(0,o.M)(a,"config"),N=(0,o.M)(a,"reportWebVitals"),k=(0,o.M)(a,"unstable_getStaticProps"),A=(0,o.M)(a,"unstable_getStaticPaths"),C=(0,o.M)(a,"unstable_getStaticParams"),E=(0,o.M)(a,"unstable_getServerProps"),V=(0,o.M)(a,"unstable_getServerSideProps"),D=new n.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/envar",pathname:"/su/envar",bundlePath:"",filename:""},components:{App:u.default,Document:l.default},userland:a})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9600,3932],()=>r(65060));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3641,e.ids=[3641],e.modules={12183:(e,t,r)=>{let s;r.r(t),r.d(t,{config:()=>M,default:()=>w,getServerSideProps:()=>q,getStaticPaths:()=>y,getStaticProps:()=>P,reportWebVitals:()=>_,routeModule:()=>V,unstable_getServerProps:()=>C,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>k,unstable_getStaticPaths:()=>N,unstable_getStaticProps:()=>A});var a={};r.r(a),r.d(a,{default:()=>b,getServerSideProps:()=>j});var n=r(63865),i=r(9455),l=r(30671),o=r(5583),u=r(19796),d=r(8732),c=r(82015),p=r.n(c),m=r(61197),x=r(40778),g=r(16757),h=r(46169);function v({envObject:e,envKey:t}){let[r,a]=p().useState(!1),[n,i]=p().useState(!1),[l,o]=p().useState(e[t]),[u,c]=p().useState(!1);return(0,d.jsx)(p().Fragment,{children:(0,d.jsxs)("form",{className:"grid grid-cols-2 items-center gap2 w-full hover:bg-slate-100 py-2 px-4 relative",onSubmit:e=>{e.preventDefault(),r&&(i(!0),setTimeout(()=>{i(!1)},1e3))},children:[n&&(0,d.jsx)(g.A,{width:"20px"}),(0,d.jsx)("span",{children:t}),(0,d.jsxs)("div",{children:[(0,d.jsx)("input",{type:r?"text":"password",onFocus:e=>{"password"==e.target.type&&(e.target.type="text"),c(!0),a(!0)},onBlur:e=>{window.clearTimeout(s),s=setTimeout(()=>{"text"==e.target.type&&(e.target.type="password"),c(!1),a(!1)},2e3)},value:l,onChange:e=>{o(e.target.value)}}),u?(0,d.jsx)("div",{className:"button secondary",onClick:e=>{e.preventDefault(),r&&(i(!0),(0,h.A)("/api/admin/updateEnv",{method:"post",body:{key:t,value:l}}).then(e=>{e.success?window.location.reload():window.alert(e.error)}).finally(()=>{setTimeout(()=>{i(!1)},1e3)}))},children:"Update"}):(0,d.jsx)("div",{className:"button outlined",onClick:e=>{a(!r),c(!0)},children:"Reveal"})]})]})})}function S({data:e}){let{envObject:t}=e,[r,s]=p().useState(t),a=Object.keys(r);return(0,d.jsxs)(p().Fragment,{children:[(0,d.jsxs)("div",{className:"w-full justify-between",children:[(0,d.jsx)("h2",{className:"text-2xl m-0",children:"Environment Variables"}),(0,d.jsx)("button",{onClick:e=>{let t=window.prompt("What is the new ENV name?"),r=window.prompt("ENV Value");t&&r&&s(e=>{let s={...e};return s[t]=r,s})},children:"Add Environment Variable"})]}),(0,d.jsx)("section",{className:"paper",children:a.map((e,t)=>(0,d.jsx)(v,{envObject:r,envKey:e},t))})]})}let f=r(29021);function b({user:e,data:t}){let r=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"Console | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,d.jsx)(x.A,{head:r,user:e,children:(0,d.jsx)(S,{data:t})})}async function j({req:e,res:t,query:r}){let s=await (0,m.A)(e);if(!s?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let a=f.readFileSync("./.env","utf-8").split(/\n|\r/),n={};return a.forEach(e=>{if(!e.match(/=/)||e.match(/^\#/))return;let t=e.split("=");n[t[0]]=t[1]}),{props:{user:s,data:{envObject:n}}}}let w=(0,l.M)(a,"default"),P=(0,l.M)(a,"getStaticProps"),y=(0,l.M)(a,"getStaticPaths"),q=(0,l.M)(a,"getServerSideProps"),M=(0,l.M)(a,"config"),_=(0,l.M)(a,"reportWebVitals"),A=(0,l.M)(a,"unstable_getStaticProps"),N=(0,l.M)(a,"unstable_getStaticPaths"),k=(0,l.M)(a,"unstable_getStaticParams"),C=(0,l.M)(a,"unstable_getServerProps"),E=(0,l.M)(a,"unstable_getServerSideProps"),V=new n.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/envar",pathname:"/su/envar",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:a})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,6622],()=>r(12183));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/envar.js.nft.json b/dsql-app/.local_dist/server/pages/su/envar.js.nft.json index 00e291f..817b606 100644 --- a/dsql-app/.local_dist/server/pages/su/envar.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/envar.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/error-logs.js b/dsql-app/.local_dist/server/pages/su/error-logs.js index 121a242..ab4dcf6 100644 --- a/dsql-app/.local_dist/server/pages/su/error-logs.js +++ b/dsql-app/.local_dist/server/pages/su/error-logs.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=6257,e.ids=[6257],e.modules={93446:(e,s,t)=>{t.r(s),t.d(s,{config:()=>S,default:()=>g,getServerSideProps:()=>f,getStaticPaths:()=>v,getStaticProps:()=>j,reportWebVitals:()=>b,routeModule:()=>M,unstable_getServerProps:()=>_,unstable_getServerSideProps:()=>y,unstable_getStaticParams:()=>P,unstable_getStaticPaths:()=>N,unstable_getStaticProps:()=>w});var r={};t.r(r),t.d(r,{default:()=>m,getServerSideProps:()=>h});var a=t(63865),l=t(9455),i=t(30671),n=t(49407),o=t(89600),c=t(8732);t(82015);var d=t(93615),u=t.n(d),x=t(49888);t(36299);var p=t(19262);function m({user:e,data:s}){let t=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,c.jsx)(x.A,{head:t,user:e,children:(0,c.jsx)(p.A,{})})}async function h({req:e,res:s,query:t}){let r=await u()(e);return r?.logged_in_status?{props:{user:r}}:{redirect:{destination:"/su/login",permanent:!1}}}let g=(0,i.M)(r,"default"),j=(0,i.M)(r,"getStaticProps"),v=(0,i.M)(r,"getStaticPaths"),f=(0,i.M)(r,"getServerSideProps"),S=(0,i.M)(r,"config"),b=(0,i.M)(r,"reportWebVitals"),w=(0,i.M)(r,"unstable_getStaticProps"),N=(0,i.M)(r,"unstable_getStaticPaths"),P=(0,i.M)(r,"unstable_getStaticParams"),_=(0,i.M)(r,"unstable_getServerProps"),y=(0,i.M)(r,"unstable_getServerSideProps"),M=new a.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su/error-logs",pathname:"/su/error-logs",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:r})},36299:(e,s,t)=>{t.d(s,{A:()=>c});var r=t(8732),a=t(82015),l=t.n(a),i=t(63715),n=t(32415),o=t(21498);function c({data:e}){Object.keys(e.users[0]);let[s,t]=l().useState(null),[a,c]=l().useState(0),[d,u]=l().useState(!1);return console.log(typeof s),(0,r.jsx)(l().Fragment,{children:(0,r.jsxs)("div",{className:"items-stretch gap-10 w-full",children:[(0,r.jsxs)("section",{className:"paper w-full",children:[(0,r.jsx)("h2",{className:"text-xl m-0 mb-6",children:"Users"}),(0,r.jsx)("div",{className:"flex-col items-stretch gap-10",children:e.users.map((e,s)=>(0,r.jsx)(o.A,{userObject:e},s+1))})]}),(0,r.jsxs)("section",{className:"paper",children:[(0,r.jsxs)("div",{className:"w-full justify-between",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,r.jsx)("div",{children:(0,r.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(u(!0),(0,i.A)("/api/admin/clearErrorLogs","post").then(e=>{c(e=>e+1)}),setTimeout(()=>{u(!1)},2e3))},className:"outlined gray relative",children:[d&&(0,r.jsx)(n.A,{width:"20px"}),"Clear Error Log"]})})]}),s&&(0,r.jsx)("p",{dangerouslySetInnerHTML:{__html:s||"No Log"}}),"string"!=typeof s&&(0,r.jsx)(n.A,{position:"relative",width:"25px"})]})]})})}},19262:(e,s,t)=>{t.d(s,{A:()=>o});var r=t(8732),a=t(82015),l=t.n(a),i=t(63715),n=t(32415);function o(e){let[s,t]=l().useState(null),[a,o]=l().useState(!1),[c,d]=l().useState(0);return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"w-full justify-between",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,r.jsx)("div",{children:(0,r.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(o(!0),(0,i.A)("/api/admin/clearErrorLogs","post").then(e=>{console.log(e),d(e=>e+1)}),setTimeout(()=>{o(!1)},2e3))},className:"outlined gray relative",children:[a&&(0,r.jsx)(n.A,{width:"20px"}),"Clear Error Log"]})})]}),(0,r.jsxs)("section",{className:"paper",children:[s&&(0,r.jsx)("p",{dangerouslySetInnerHTML:{__html:s||"No Log"}}),!s&&(0,r.jsx)(n.A,{position:"relative",width:"25px"})]})]})}},21498:(e,s,t)=>{t.d(s,{A:()=>i});var r=t(8732),a=t(82015),l=t.n(a);function i({userObject:e,userPage:s}){let t=Object.keys(e),[a,i]=l().useState(!1),[n,o]=l().useState(0),[c,d]=l().useState(!s);return(0,r.jsxs)("div",{className:"card col green w-full overflow-hidden"+(c?s?" h-[100px]":" h-[85px]":" "),children:[(0,r.jsxs)("div",{className:"items-center w-full",children:[(0,r.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(s?" w-16 h-16":" w-12 h-12")}),!s&&(0,r.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,r.jsxs)("div",{className:"ml-auto",children:[(0,r.jsx)("button",{className:"outlined gray small-text",onClick:e=>{c?d(!1):d(!0)},children:c?"More Details":"Collapse"}),!s&&(0,r.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,r.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:t.map((s,a)=>(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("span",{style:{wordBreak:"break-all"},children:[s,":"," ",(0,r.jsx)("b",{children:e[s]})]})}),a{d(!0)},children:"Collapse"})]})}},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var s=require("../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,9600,3932],()=>t(93446));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=6257,e.ids=[6257],e.modules={25767:(e,t,r)=>{r.r(t),r.d(t,{config:()=>M,default:()=>b,getServerSideProps:()=>v,getStaticPaths:()=>j,getStaticProps:()=>f,reportWebVitals:()=>_,routeModule:()=>E,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>L,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>w,unstable_getStaticProps:()=>q});var s={};r.r(s),r.d(s,{default:()=>h,getServerSideProps:()=>P});var a=r(63865),i=r(9455),o=r(30671),n=r(5583),l=r(19796),u=r(8732),d=r(82015),c=r.n(d),p=r(61197),g=r(40778),x=r(46169),m=r(16757);function S(){let[e,t]=c().useState(null),[r,s]=c().useState(!1),[a,i]=c().useState(0);return(0,u.jsxs)(c().Fragment,{children:[(0,u.jsxs)("div",{className:"w-full justify-between",children:[(0,u.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,u.jsx)("div",{children:(0,u.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(s(!0),(0,x.A)("/api/admin/clearErrorLogs",{method:"POST"}).then(e=>{console.log(e),i(e=>e+1)}),setTimeout(()=>{s(!1)},2e3))},className:"outlined gray relative",children:[r&&(0,u.jsx)(m.A,{width:"20px"}),"Clear Error Log"]})})]}),(0,u.jsxs)("section",{className:"paper",children:[e&&(0,u.jsx)("p",{dangerouslySetInnerHTML:{__html:e||"No Log"}}),!e&&(0,u.jsx)(m.A,{position:"relative",width:"25px"})]})]})}function h({user:e,data:t}){let r=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,u.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,u.jsx)(g.A,{head:r,user:e,children:(0,u.jsx)(S,{})})}async function P({req:e,res:t,query:r}){let s=await (0,p.A)(e);return s?.logged_in_status?{props:{user:s}}:{redirect:{destination:"/su/login",permanent:!1}}}let b=(0,o.M)(s,"default"),f=(0,o.M)(s,"getStaticProps"),j=(0,o.M)(s,"getStaticPaths"),v=(0,o.M)(s,"getServerSideProps"),M=(0,o.M)(s,"config"),_=(0,o.M)(s,"reportWebVitals"),q=(0,o.M)(s,"unstable_getStaticProps"),w=(0,o.M)(s,"unstable_getStaticPaths"),A=(0,o.M)(s,"unstable_getStaticParams"),y=(0,o.M)(s,"unstable_getServerProps"),L=(0,o.M)(s,"unstable_getServerSideProps"),E=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/error-logs",pathname:"/su/error-logs",bundlePath:"",filename:""},components:{App:l.default,Document:n.default},userland:s})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,6622],()=>r(25767));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/error-logs.js.nft.json b/dsql-app/.local_dist/server/pages/su/error-logs.js.nft.json index 00e291f..817b606 100644 --- a/dsql-app/.local_dist/server/pages/su/error-logs.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/error-logs.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/load-balancing.js b/dsql-app/.local_dist/server/pages/su/load-balancing.js index eac8555..3f2b351 100644 --- a/dsql-app/.local_dist/server/pages/su/load-balancing.js +++ b/dsql-app/.local_dist/server/pages/su/load-balancing.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9157,e.ids=[9157],e.modules={52093:(e,s,r)=>{r.a(e,async(e,t)=>{try{r.r(s),r.d(s,{config:()=>m,default:()=>u,getServerSideProps:()=>p,getStaticPaths:()=>h,getStaticProps:()=>x,reportWebVitals:()=>g,routeModule:()=>y,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>j});var a=r(63865),n=r(9455),l=r(30671),i=r(49407),c=r(89600),o=r(64232),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,l.M)(o,"default"),x=(0,l.M)(o,"getStaticProps"),h=(0,l.M)(o,"getStaticPaths"),p=(0,l.M)(o,"getServerSideProps"),m=(0,l.M)(o,"config"),g=(0,l.M)(o,"reportWebVitals"),j=(0,l.M)(o,"unstable_getStaticProps"),f=(0,l.M)(o,"unstable_getStaticPaths"),v=(0,l.M)(o,"unstable_getStaticParams"),S=(0,l.M)(o,"unstable_getServerProps"),b=(0,l.M)(o,"unstable_getServerSideProps"),y=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/su/load-balancing",pathname:"/su/load-balancing",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:o});t()}catch(e){t(e)}})},94010:(e,s,r)=>{r.a(e,async(e,t)=>{try{r.d(s,{A:()=>c});var a=r(8732);r(82015);var n=r(96089),l=r(75979),i=e([l]);function c({slugText:e,justIcon:s,noIcon:r,title:t,outlined:i,extraClasses:c}){return(0,a.jsxs)("div",{className:(0,l.twMerge)("button small-text hover:!bg-transparent",i?" outlined gray bg-white":" ghost light-gray",c),onClick:s=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:i?void 0:{padding:0},children:[!r&&(0,a.jsx)(n.A,{size:i?15:20}),!s&&(0,a.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:t||"Copy Slug"})]})}l=(i.then?(await i)():i)[0],t()}catch(e){t(e)}})},36299:(e,s,r)=>{r.d(s,{A:()=>o});var t=r(8732),a=r(82015),n=r.n(a),l=r(63715),i=r(32415),c=r(21498);function o({data:e}){Object.keys(e.users[0]);let[s,r]=n().useState(null),[a,o]=n().useState(0),[d,u]=n().useState(!1);return console.log(typeof s),(0,t.jsx)(n().Fragment,{children:(0,t.jsxs)("div",{className:"items-stretch gap-10 w-full",children:[(0,t.jsxs)("section",{className:"paper w-full",children:[(0,t.jsx)("h2",{className:"text-xl m-0 mb-6",children:"Users"}),(0,t.jsx)("div",{className:"flex-col items-stretch gap-10",children:e.users.map((e,s)=>(0,t.jsx)(c.A,{userObject:e},s+1))})]}),(0,t.jsxs)("section",{className:"paper",children:[(0,t.jsxs)("div",{className:"w-full justify-between",children:[(0,t.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,t.jsx)("div",{children:(0,t.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(u(!0),(0,l.A)("/api/admin/clearErrorLogs","post").then(e=>{o(e=>e+1)}),setTimeout(()=>{u(!1)},2e3))},className:"outlined gray relative",children:[d&&(0,t.jsx)(i.A,{width:"20px"}),"Clear Error Log"]})})]}),s&&(0,t.jsx)("p",{dangerouslySetInnerHTML:{__html:s||"No Log"}}),"string"!=typeof s&&(0,t.jsx)(i.A,{position:"relative",width:"25px"})]})]})})}},19262:(e,s,r)=>{r.d(s,{A:()=>c});var t=r(8732),a=r(82015),n=r.n(a),l=r(63715),i=r(32415);function c(e){let[s,r]=n().useState(null),[a,c]=n().useState(!1),[o,d]=n().useState(0);return(0,t.jsxs)(n().Fragment,{children:[(0,t.jsxs)("div",{className:"w-full justify-between",children:[(0,t.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,t.jsx)("div",{children:(0,t.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(c(!0),(0,l.A)("/api/admin/clearErrorLogs","post").then(e=>{console.log(e),d(e=>e+1)}),setTimeout(()=>{c(!1)},2e3))},className:"outlined gray relative",children:[a&&(0,t.jsx)(i.A,{width:"20px"}),"Clear Error Log"]})})]}),(0,t.jsxs)("section",{className:"paper",children:[s&&(0,t.jsx)("p",{dangerouslySetInnerHTML:{__html:s||"No Log"}}),!s&&(0,t.jsx)(i.A,{position:"relative",width:"25px"})]})]})}},21498:(e,s,r)=>{r.d(s,{A:()=>l});var t=r(8732),a=r(82015),n=r.n(a);function l({userObject:e,userPage:s}){let r=Object.keys(e),[a,l]=n().useState(!1),[i,c]=n().useState(0),[o,d]=n().useState(!s);return(0,t.jsxs)("div",{className:"card col green w-full overflow-hidden"+(o?s?" h-[100px]":" h-[85px]":" "),children:[(0,t.jsxs)("div",{className:"items-center w-full",children:[(0,t.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(s?" w-16 h-16":" w-12 h-12")}),!s&&(0,t.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,t.jsxs)("div",{className:"ml-auto",children:[(0,t.jsx)("button",{className:"outlined gray small-text",onClick:e=>{o?d(!1):d(!0)},children:o?"More Details":"Collapse"}),!s&&(0,t.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,t.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:r.map((s,a)=>(0,t.jsxs)(n().Fragment,{children:[(0,t.jsx)("div",{children:(0,t.jsxs)("span",{style:{wordBreak:"break-all"},children:[s,":"," ",(0,t.jsx)("b",{children:e[s]})]})}),a{d(!0)},children:"Collapse"})]})}},77306:(e,s,r)=>{r.a(e,async(e,t)=>{try{r.d(s,{A:()=>o});var a=r(8732),n=r(94010),l=r(2459),i=r(75979),c=e([n,i]);function o({server:e,noLoadBalance:s}){return(0,a.jsxs)("div",{className:"stack w-full",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(l.A,{size:15,opacity:.5}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:e.host}),s?(0,a.jsx)(a.Fragment,{}):e.loadBalanced?(0,a.jsx)("span",{className:"info green small",children:"Load Balanced"}):(0,a.jsx)("button",{children:"Add to Load Balancer"})]})]}),(0,a.jsx)("div",{className:(0,i.twMerge)("stack border-0 border-l border-solid border-s-slate-200 dark:border-white/20","pl-6 ml-2 -mt-4 pt-2 w-full gap-0"),children:(0,a.jsx)("ul",{className:"p-0 m-0 pl-4",children:e.users?.map((e,s)=>a.jsx(d,{user:e},s))})})]})}function d({user:e}){return(0,a.jsx)("li",{className:(0,i.twMerge)("w-full"),children:(0,a.jsxs)("div",{className:"stack gap-0",children:[(0,a.jsxs)("span",{children:["user: ",(0,a.jsx)("b",{children:e.name})]}),(0,a.jsxs)("span",{children:["pass:"," ",(0,a.jsx)("b",{children:(0,a.jsx)(n.A,{slugText:e.password,title:"********",extraClasses:"inline",noIcon:!0})})]})]})})}[n,i]=c.then?(await c)():c,t()}catch(e){t(e)}})},72179:(e,s,r)=>{r.a(e,async(e,t)=>{try{r.d(s,{A:()=>d});var a=r(8732),n=r(89600),l=r(82015),i=r.n(l),c=r(77306),o=e([c]);function d(){let e=i().useContext(n.AppContext).pageProps;e.user;let s=e.servers;return(0,a.jsxs)(i().Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-2",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Load Balancing"}),(0,a.jsx)("span",{children:"Distribute database load accross servers"})]}),(0,a.jsx)("div",{})]}),(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("h2",{className:"text-base m-0",children:"Servers"}),(0,a.jsx)("div",{className:"flex flex-col gap-2 w-full",children:s.map((e,s)=>(0,a.jsx)(c.A,{server:e},s))})]})]})}c=(o.then?(await o)():o)[0],t()}catch(e){t(e)}})},92127:(e,s,r)=>{r(33873);let t=r(29021);r(56248);let a=r(70956);e.exports=function(){try{let e=a();if(!t.existsSync(e.path)){let s={host:String(process.env.DSQL_DB_TARGET_IP_ADDRESS),port:3306,primary:!0,loadBalanced:!0,users:[{host:String(process.env.DSQL_DB_HOST),name:"root",password:process.env.DSQL_MARIADB_ROOT_PASSWORD||"password"}]};t.writeFileSync(e.path,JSON.stringify([s]))}return!0}catch(e){return console.log(`Error checking servers ${e.message}`),!1}}},70956:(e,s,r)=>{let t=r(33873);e.exports=function(){let e=process.env.DSQL_SU_USER_ID||"1",s=t.resolve(process.cwd(),`./jsonData/dbSchemas/users/user-${e}`),r=`${s}/servers.json`;return{dir:s,path:r}}},31511:(e,s,r)=>{r(33873);let t=r(29021),a=r(56248),n=r(92127),l=r(70956);e.exports=function(){try{n();let e=l();return a.parse(t.readFileSync(e.path,"utf-8"))}catch(e){console.log(`Error getting servers ${e.message}`);return}}},96089:(e,s,r)=>{r.d(s,{A:()=>t});let t=(0,r(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},56248:e=>{e.exports={parse:function(e,s){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,s)}catch(e){return}}},stringify:function(e,s,r){try{return JSON.stringify(e,s,r)}catch(e){return}}}},64232:(e,s,r)=>{r.a(e,async(e,t)=>{try{r.r(s),r.d(s,{default:()=>x,getServerSideProps:()=>h});var a=r(8732);r(82015);var n=r(93615),l=r.n(n),i=r(49888);r(36299),r(19262);var c=r(72179),o=r(31511),d=r.n(o),u=e([c]);function x({user:e,data:s}){let r=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Load Balancing"}),(0,a.jsx)("meta",{name:"description",content:"Distribute db load accross servers"})]});return(0,a.jsx)(i.A,{head:r,user:e,children:(0,a.jsx)(c.A,{})})}async function h({req:e,res:s,query:r}){try{let s=await l()(e);if(!s?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let r=d()();if(!r)throw Error("No servers found");return{props:{user:s,servers:r}}}catch(e){return{redirect:{destination:"/su",permanent:!1}}}}c=(u.then?(await u)():u)[0],t()}catch(e){t(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var s=require("../../webpack-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[883,9821,9600,3932],()=>r(52093));module.exports=t})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9157,e.ids=[9157],e.modules={45035:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{config:()=>g,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>h,getStaticProps:()=>p,reportWebVitals:()=>m,routeModule:()=>b,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>y,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>f});var a=t(63865),n=t(9455),i=t(30671),c=t(5583),l=t(19796),o=t(21922),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,i.M)(o,"default"),p=(0,i.M)(o,"getStaticProps"),h=(0,i.M)(o,"getStaticPaths"),x=(0,i.M)(o,"getServerSideProps"),g=(0,i.M)(o,"config"),m=(0,i.M)(o,"reportWebVitals"),f=(0,i.M)(o,"unstable_getStaticProps"),v=(0,i.M)(o,"unstable_getStaticPaths"),S=(0,i.M)(o,"unstable_getStaticParams"),j=(0,i.M)(o,"unstable_getServerProps"),y=(0,i.M)(o,"unstable_getServerSideProps"),b=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/su/load-balancing",pathname:"/su/load-balancing",bundlePath:"",filename:""},components:{App:l.default,Document:c.default},userland:o});s()}catch(e){s(e)}})},73872:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>l});var a=t(8732);t(82015);var n=t(96089),i=t(75979),c=e([i]);function l({slugText:e,justIcon:r,noIcon:t,title:s,outlined:c,extraClasses:l}){return(0,a.jsxs)("div",{className:(0,i.twMerge)("button small-text hover:!bg-transparent",c?" outlined gray bg-white":" ghost light-gray",l),onClick:r=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:c?void 0:{padding:0},children:[!t&&(0,a.jsx)(n.A,{size:c?15:20}),!r&&(0,a.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:s||"Copy Slug"})]})}i=(c.then?(await c)():c)[0],s()}catch(e){s(e)}})},57168:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>o});var a=t(8732),n=t(73872),i=t(2459),c=t(75979),l=e([n,c]);function o({server:e,noLoadBalance:r}){return(0,a.jsxs)("div",{className:"stack w-full",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{size:15,opacity:.5}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:e.host}),r?(0,a.jsx)(a.Fragment,{}):e.loadBalanced?(0,a.jsx)("span",{className:"info green small",children:"Load Balanced"}):(0,a.jsx)("button",{children:"Add to Load Balancer"})]})]}),(0,a.jsx)("div",{className:(0,c.twMerge)("stack border-0 border-l border-solid border-s-slate-200 dark:border-white/20","pl-6 ml-2 -mt-4 pt-2 w-full gap-0"),children:(0,a.jsx)("ul",{className:"p-0 m-0 pl-4",children:e.users?.map((e,r)=>a.jsx(d,{user:e},r))})})]})}function d({user:e}){return(0,a.jsx)("li",{className:(0,c.twMerge)("w-full"),children:(0,a.jsxs)("div",{className:"stack gap-0",children:[(0,a.jsxs)("span",{children:["user: ",(0,a.jsx)("b",{children:e.name})]}),(0,a.jsxs)("span",{children:["pass:"," ",(0,a.jsx)("b",{children:(0,a.jsx)(n.A,{slugText:e.password,title:"********",extraClasses:"inline",noIcon:!0})})]})]})})}[n,c]=l.then?(await l)():l,s()}catch(e){s(e)}})},53265:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>d});var a=t(8732),n=t(19796),i=t(82015),c=t.n(i),l=t(57168),o=e([l]);function d(){let e=c().useContext(n.AppContext).pageProps;e.user;let r=e.servers;return(0,a.jsxs)(c().Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-2",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Load Balancing"}),(0,a.jsx)("span",{children:"Distribute database load accross servers"})]}),(0,a.jsx)("div",{})]}),(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("h2",{className:"text-base m-0",children:"Servers"}),(0,a.jsx)("div",{className:"flex flex-col gap-2 w-full",children:r.map((e,r)=>(0,a.jsx)(l.A,{server:e},r))})]})]})}l=(o.then?(await o)():o)[0],s()}catch(e){s(e)}})},77489:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(29021),a=t.n(s),n=t(60374),i=t(33873),c=t.n(i);function l(){let e=process.env.DSQL_SU_USER_ID||"1",r=c().resolve(process.cwd(),`./jsonData/dbSchemas/users/user-${e}`),t=`${r}/servers.json`;return{dir:r,path:t}}function o(){try{!function(){try{let e=l();if(!a().existsSync(e.path)){let r={host:String(process.env.DSQL_DB_TARGET_IP_ADDRESS),port:3306,primary:!0,loadBalanced:!0,users:[{host:String(process.env.DSQL_DB_HOST),name:"root",password:process.env.DSQL_MARIADB_ROOT_PASSWORD||"password"}]};a().writeFileSync(e.path,JSON.stringify([r]))}}catch(e){return console.log(`Error checking servers ${e.message}`),!1}}();let e=l();return n.A.parse(a().readFileSync(e.path,"utf-8"))}catch(e){console.log(`Error getting servers ${e.message}`);return}}},96089:(e,r,t)=>{t.d(r,{A:()=>s});let s=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},60374:(e,r,t)=>{t.d(r,{A:()=>s});let s={parse:function(e,r){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,r)}catch(e){return}}},stringify:function(e,r,t){try{return JSON.stringify(e,r||void 0,t)}catch(e){return}}}},21922:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{default:()=>d,getServerSideProps:()=>u});var a=t(8732);t(82015);var n=t(61197),i=t(40778),c=t(53265),l=t(77489),o=e([c]);function d({user:e,data:r}){let t=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Load Balancing"}),(0,a.jsx)("meta",{name:"description",content:"Distribute db load accross servers"})]});return(0,a.jsx)(i.A,{head:t,user:e,children:(0,a.jsx)(c.A,{})})}async function u({req:e,res:r,query:t}){try{let r=await (0,n.A)(e);if(!r?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let t=(0,l.A)();if(!t)throw Error("No servers found");return{props:{user:r,servers:t}}}catch(e){return{redirect:{destination:"/su",permanent:!1}}}}c=(o.then?(await o)():o)[0],s()}catch(e){s(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var r=require("../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[883,9821,9796,6622],()=>t(45035));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/load-balancing.js.nft.json b/dsql-app/.local_dist/server/pages/su/load-balancing.js.nft.json index e34d141..aaebd60 100644 --- a/dsql-app/.local_dist/server/pages/su/load-balancing.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/load-balancing.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/servers.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../jsonData/dbSchemas/users/user-1/servers.json","../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/login.js b/dsql-app/.local_dist/server/pages/su/login.js index 00f9d5d..2ce58fa 100644 --- a/dsql-app/.local_dist/server/pages/su/login.js +++ b/dsql-app/.local_dist/server/pages/su/login.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=9634,e.ids=[3220,9634],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},80268:(e,t,s)=>{s.r(t),s.d(t,{config:()=>b,default:()=>j,getServerSideProps:()=>D,getStaticPaths:()=>P,getStaticProps:()=>E,reportWebVitals:()=>A,routeModule:()=>M,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>O,unstable_getStaticParams:()=>w,unstable_getStaticPaths:()=>N,unstable_getStaticProps:()=>L});var r={};s.r(r),s.d(r,{default:()=>g,getServerSideProps:()=>v});var n=s(63865),a=s(9455),o=s(30671),i=s(49407),l=s(89600),c=s(8732);s(82015);var u=s(27912),p=s.n(u),d=s(93615),m=s.n(d),_=s(63715),h=s(20048),f=s.n(h),S=s(72377),x=s.n(S);function g({user:e}){let t=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Super User Login | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,c.jsxs)("section",{className:"w-full h-screen justify-center items-center",children:[(0,c.jsx)(p(),{children:t}),(0,c.jsxs)("div",{className:"p-6 bg-slate-100 rounded w-full max-w-2xl flex flex-col items-center",children:[(0,c.jsx)(y,{}),(0,c.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=e.target;(0,_.A)("/api/admin/loginSuUser",{method:"post",body:{email:t.email.value,password:t.password.value,authKey:t["auth-key"].value}}).then(e=>{window.location.reload()})},className:"flex flex-col items-stretch gap-4 w-full",children:[(0,c.jsx)("input",{type:"text",name:"email",id:"email",placeholder:"Email Address"}),(0,c.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password"}),(0,c.jsx)("input",{type:"password",name:"auth-key",id:"auth-key",placeholder:"Auth Key"}),(0,c.jsx)("button",{children:"Login"})]})]})]})}async function v({req:e,res:t,query:s}){let r=await f()(e,t,!0);x()(r)&&console.log("Admin User Detected ...");let n=await m()(e);return n?.logged_in_status?{redirect:{destination:"/su",permanent:!1}}:{props:{user:n}}}function y(){return(0,c.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,c.jsx)("h1",{className:"text-2xl text-center m-0",children:"Super User Login"}),(0,c.jsxs)("span",{children:["This area is reserved only for the owner of this Admin. To login use the info in your ",(0,c.jsx)("b",{children:"dsql.env"})," File. Use the env variables as follows. Your ",(0,c.jsx)("i",{children:"email address"})," is the same address used to register the first user account"]}),(0,c.jsxs)("ul",{className:"p-0",children:[(0,c.jsxs)("li",{children:["Password:"," ",(0,c.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,c.jsx)("b",{children:" DSQL_USER_KEY"})]}),(0,c.jsxs)("li",{children:["Auth Key:"," ",(0,c.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,c.jsx)("b",{children:" DSQL_SPECIAL_KEY"})]})]})]})}let j=(0,o.M)(r,"default"),E=(0,o.M)(r,"getStaticProps"),P=(0,o.M)(r,"getStaticPaths"),D=(0,o.M)(r,"getServerSideProps"),b=(0,o.M)(r,"config"),A=(0,o.M)(r,"reportWebVitals"),L=(0,o.M)(r,"unstable_getStaticProps"),N=(0,o.M)(r,"unstable_getStaticPaths"),w=(0,o.M)(r,"unstable_getStaticParams"),I=(0,o.M)(r,"unstable_getServerProps"),O=(0,o.M)(r,"unstable_getServerSideProps"),M=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/su/login",pathname:"/su/login",bundlePath:"",filename:""},components:{App:l.default,Document:i.default},userland:r})},93615:(e,t,s)=>{let{IncomingMessage:r}=s(81630),n=s(77463),a=s(6505);e.exports=async function(e){let{keyCookieName:t,csrfCookieName:s}=a(),r=`${t}_su`;if(!e.cookies?.[r])return console.log("No auth key cookie found"),null;let o=n({encryptedString:e.cookies[r]});if(!o)return console.log("No user payload found"),null;let i=JSON.parse(o);return i.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},20048:(e,t,s)=>{s(81630);let r=s(67216),n=s(77463),a=s(29021),o=s(6505);async function i(e,t,s,i){let{keyCookieName:l,csrfCookieName:c}=o();if(!e.cookies?.[l]?.match(/./))return null;let u=n({encryptedString:e.cookies[l]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a.existsSync(`${d}/${p.csrf_k}`))return null;if(0==p.verification_status&&!s){let e=await r(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=i},72377:e=>{e.exports=function(e,t){return t?e?.id&&String(e?.id)==(process.env.DSQL_SU_USER_ID||"1")&&"true":e?.id&&"1"==String(e?.id)&&"true"}},6505:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=r;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:o,csrfCookieName:i,oneTimeCodeName:l+=n}}},77463:(e,t,s)=>{let{scryptSync:r,createDecipheriv:n}=s(55511),{Buffer:a}=s(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let o=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,l=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!o?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=n("aes-192-cbc",r(o,i,l),a.alloc(16,0));try{let t=c.update(e,"hex","utf8");return t+=c.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},67216:(e,t,s)=>{let r=s(9973),n=s(31976),a=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function o(...e){try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=o},31976:(e,t,s)=>{let r=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!r.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(8732);s(82015);var n=s(20883);function a(e){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600],()=>s(80268));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=9634,e.ids=[3220,9634],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},38954:(e,t,s)=>{s.r(t),s.d(t,{config:()=>E,default:()=>x,getServerSideProps:()=>j,getStaticPaths:()=>y,getStaticProps:()=>v,reportWebVitals:()=>P,routeModule:()=>L,unstable_getServerProps:()=>N,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>D,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>A});var r={};s.r(r),s.d(r,{default:()=>_,getServerSideProps:()=>g});var n=s(63865),a=s(9455),i=s(30671),o=s(5583),l=s(19796),c=s(8732);s(82015);var u=s(27912),d=s.n(u),p=s(61197),m=s(46169),f=s(92702),h=s(89923);function _(){let e=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Super User Login | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,c.jsxs)("section",{className:"w-full h-screen justify-center items-center",children:[(0,c.jsx)(d(),{children:e}),(0,c.jsxs)("div",{className:"p-6 bg-slate-100 rounded w-full max-w-2xl flex flex-col items-center",children:[(0,c.jsx)(S,{}),(0,c.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=e.target;(0,m.A)("/api/admin/loginSuUser",{method:"post",body:{email:t.email.value,password:t.password.value,authKey:t["auth-key"].value}}).then(e=>{window.location.reload()})},className:"flex flex-col items-stretch gap-4 w-full",children:[(0,c.jsx)("input",{type:"text",name:"email",id:"email",placeholder:"Email Address"}),(0,c.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password"}),(0,c.jsx)("input",{type:"password",name:"auth-key",id:"auth-key",placeholder:"Auth Key"}),(0,c.jsx)("button",{children:"Login"})]})]})]})}async function g({req:e,res:t,query:s}){let r=await (0,f.default)(e,t,!0);(0,h.A)(r)&&console.log("Admin User Detected ...");let n=await (0,p.A)(e);return n?.logged_in_status?{redirect:{destination:"/su",permanent:!1}}:{props:{user:n}}}function S(){return(0,c.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,c.jsx)("h1",{className:"text-2xl text-center m-0",children:"Super User Login"}),(0,c.jsxs)("span",{children:["This area is reserved only for the owner of this Admin. To login use the info in your ",(0,c.jsx)("b",{children:"dsql.env"})," File. Use the env variables as follows. Your ",(0,c.jsx)("i",{children:"email address"})," is the same address used to register the first user account"]}),(0,c.jsxs)("ul",{className:"p-0",children:[(0,c.jsxs)("li",{children:["Password:"," ",(0,c.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,c.jsx)("b",{children:" DSQL_USER_KEY"})]}),(0,c.jsxs)("li",{children:["Auth Key:"," ",(0,c.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,c.jsx)("b",{children:" DSQL_SPECIAL_KEY"})]})]})]})}let x=(0,i.M)(r,"default"),v=(0,i.M)(r,"getStaticProps"),y=(0,i.M)(r,"getStaticPaths"),j=(0,i.M)(r,"getServerSideProps"),E=(0,i.M)(r,"config"),P=(0,i.M)(r,"reportWebVitals"),A=(0,i.M)(r,"unstable_getStaticProps"),b=(0,i.M)(r,"unstable_getStaticPaths"),D=(0,i.M)(r,"unstable_getStaticParams"),N=(0,i.M)(r,"unstable_getServerProps"),w=(0,i.M)(r,"unstable_getServerSideProps"),L=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/su/login",pathname:"/su/login",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:r})},61197:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(71205),n=s(41939);async function a(e){let{keyCookieName:t,csrfCookieName:s}=(0,n.A)(),a=`${t}_su`;if(!e.cookies?.[a])return console.log("No auth key cookie found"),null;let i=(0,r.A)({encryptedString:e.cookies[a]});if(!i)return console.log("No user payload found"),null;let o=JSON.parse(i);return o.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):o.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):o}},92702:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var r=s(71934),n=s(71205),a=s(29021),i=s.n(a),o=s(41939);async function l(e,t,s){let{keyCookieName:a,csrfCookieName:l}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let c=(0,n.A)({encryptedString:e.cookies[a]});if(!c)return null;let u=JSON.parse(c);if(!u.csrf_k||s&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let d=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!i().existsSync(`${d}/${u.csrf_k}`))return null;if(0==u.verification_status&&!s){let e=await (0,r.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},89923:(e,t,s)=>{s.d(t,{A:()=>r});function r(e,t){return t?!!(e?.id&&String(e?.id)==(process.env.DSQL_SU_USER_ID||"1")):!!(e?.id&&"1"==String(e?.id))}},41939:(e,t,s)=>{s.d(t,{A:()=>r});function r(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let l=t;return e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:l+=n}}},71205:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(55511),n=s(79428);function a({encryptedString:e,encryptionKey:t,encryptionSalt:s}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=s||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=(0,r.scryptSync)(a,i,o),c=n.Buffer.alloc(16,0),u=(0,r.createDecipheriv)("aes-192-cbc",l,c);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,s)=>{s.d(t,{A:()=>r});async function r(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},5583:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(8732);s(82015);var n=s(20883);function a(){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796],()=>s(38954));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/login.js.nft.json b/dsql-app/.local_dist/server/pages/su/login.js.nft.json index b998a4f..817b606 100644 --- a/dsql-app/.local_dist/server/pages/su/login.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/login.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/servers.js b/dsql-app/.local_dist/server/pages/su/servers.js index 5e1d8c2..ee13016 100644 --- a/dsql-app/.local_dist/server/pages/su/servers.js +++ b/dsql-app/.local_dist/server/pages/su/servers.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3821,e.ids=[3821],e.modules={17021:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{config:()=>g,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>h,getStaticProps:()=>p,reportWebVitals:()=>S,routeModule:()=>_,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>m});var a=t(63865),n=t(9455),i=t(30671),c=t(49407),o=t(89600),l=t(95376),d=e([l]);l=(d.then?(await d)():d)[0];let u=(0,i.M)(l,"default"),p=(0,i.M)(l,"getStaticProps"),h=(0,i.M)(l,"getStaticPaths"),x=(0,i.M)(l,"getServerSideProps"),g=(0,i.M)(l,"config"),S=(0,i.M)(l,"reportWebVitals"),m=(0,i.M)(l,"unstable_getStaticProps"),v=(0,i.M)(l,"unstable_getStaticPaths"),f=(0,i.M)(l,"unstable_getStaticParams"),y=(0,i.M)(l,"unstable_getServerProps"),j=(0,i.M)(l,"unstable_getServerSideProps"),_=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/su/servers",pathname:"/su/servers",bundlePath:"",filename:""},components:{App:o.default,Document:c.default},userland:l});s()}catch(e){s(e)}})},94010:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>o});var a=t(8732);t(82015);var n=t(96089),i=t(75979),c=e([i]);function o({slugText:e,justIcon:r,noIcon:t,title:s,outlined:c,extraClasses:o}){return(0,a.jsxs)("div",{className:(0,i.twMerge)("button small-text hover:!bg-transparent",c?" outlined gray bg-white":" ghost light-gray",o),onClick:r=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:c?void 0:{padding:0},children:[!t&&(0,a.jsx)(n.A,{size:c?15:20}),!r&&(0,a.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:s||"Copy Slug"})]})}i=(c.then?(await c)():c)[0],s()}catch(e){s(e)}})},77306:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>l});var a=t(8732),n=t(94010),i=t(2459),c=t(75979),o=e([n,c]);function l({server:e,noLoadBalance:r}){return(0,a.jsxs)("div",{className:"stack w-full",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{size:15,opacity:.5}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:e.host}),r?(0,a.jsx)(a.Fragment,{}):e.loadBalanced?(0,a.jsx)("span",{className:"info green small",children:"Load Balanced"}):(0,a.jsx)("button",{children:"Add to Load Balancer"})]})]}),(0,a.jsx)("div",{className:(0,c.twMerge)("stack border-0 border-l border-solid border-s-slate-200 dark:border-white/20","pl-6 ml-2 -mt-4 pt-2 w-full gap-0"),children:(0,a.jsx)("ul",{className:"p-0 m-0 pl-4",children:e.users?.map((e,r)=>a.jsx(d,{user:e},r))})})]})}function d({user:e}){return(0,a.jsx)("li",{className:(0,c.twMerge)("w-full"),children:(0,a.jsxs)("div",{className:"stack gap-0",children:[(0,a.jsxs)("span",{children:["user: ",(0,a.jsx)("b",{children:e.name})]}),(0,a.jsxs)("span",{children:["pass:"," ",(0,a.jsx)("b",{children:(0,a.jsx)(n.A,{slugText:e.password,title:"********",extraClasses:"inline",noIcon:!0})})]})]})})}[n,c]=o.then?(await o)():o,s()}catch(e){s(e)}})},2419:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>d});var a=t(8732),n=t(89600),i=t(82015),c=t.n(i),o=t(77306),l=e([o]);function d(){let e=c().useContext(n.AppContext).pageProps;e.user;let r=e.servers;return(0,a.jsxs)(c().Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-2",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Servers"}),(0,a.jsx)("span",{children:"All Servers"})]}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{children:"Add Server"})})]}),(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 w-full",children:r.map((e,r)=>(0,a.jsx)(o.A,{server:e,noLoadBalance:!0},r))}),(0,a.jsx)("button",{className:"w-full outlined dashed gray",children:"Add Server"})]})]})}o=(l.then?(await l)():l)[0],s()}catch(e){s(e)}})},92127:(e,r,t)=>{t(33873);let s=t(29021);t(56248);let a=t(70956);e.exports=function(){try{let e=a();if(!s.existsSync(e.path)){let r={host:String(process.env.DSQL_DB_TARGET_IP_ADDRESS),port:3306,primary:!0,loadBalanced:!0,users:[{host:String(process.env.DSQL_DB_HOST),name:"root",password:process.env.DSQL_MARIADB_ROOT_PASSWORD||"password"}]};s.writeFileSync(e.path,JSON.stringify([r]))}return!0}catch(e){return console.log(`Error checking servers ${e.message}`),!1}}},70956:(e,r,t)=>{let s=t(33873);e.exports=function(){let e=process.env.DSQL_SU_USER_ID||"1",r=s.resolve(process.cwd(),`./jsonData/dbSchemas/users/user-${e}`),t=`${r}/servers.json`;return{dir:r,path:t}}},31511:(e,r,t)=>{t(33873);let s=t(29021),a=t(56248),n=t(92127),i=t(70956);e.exports=function(){try{n();let e=i();return a.parse(s.readFileSync(e.path,"utf-8"))}catch(e){console.log(`Error getting servers ${e.message}`);return}}},96089:(e,r,t)=>{t.d(r,{A:()=>s});let s=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},67216:(e,r,t)=>{let s=t(9973),a=t(31976),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function i(...e){try{let r=await n.query(...e);return await n.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},31976:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},56248:e=>{e.exports={parse:function(e,r){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,r)}catch(e){return}}},stringify:function(e,r,t){try{return JSON.stringify(e,r,t)}catch(e){return}}}},95376:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{default:()=>y,getServerSideProps:()=>j});var a=t(8732);t(82015);var n=t(29021),i=t.n(n),c=t(93615),o=t.n(c),l=t(49888),d=t(31511),u=t.n(d),p=t(2419),h=t(67216),x=t.n(h),g=t(33873),S=t.n(g),m=t(56248),v=t.n(m),f=e([p]);function y({user:e,data:r}){let t=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Load Balancing"}),(0,a.jsx)("meta",{name:"description",content:"Distribute db load accross servers"})]});return(0,a.jsx)(l.A,{head:t,user:e,children:(0,a.jsx)(p.A,{})})}async function j({req:e,res:r,query:t}){try{let r=await o()(e);if(!r?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let t=u()();if(!t)throw Error("No servers found");t.find(e=>e.primary);let s=(await x()("SELECT user,host,password FROM mysql.user")).filter(e=>e.User.match(/^dsql_user|^root/i));return i().writeFileSync(S().resolve(process.cwd(),"./.tmp/wrt.json"),String(v().stringify(s,null,4)),"utf8"),{props:{user:r,servers:t}}}catch(e){return{redirect:{destination:"/su",permanent:!1}}}}p=(f.then?(await f)():f)[0],s()}catch(e){s(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var r=require("../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[883,9821,9600,3932],()=>t(17021));module.exports=s})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3821,e.ids=[3821],e.modules={95755:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{config:()=>x,default:()=>u,getServerSideProps:()=>g,getStaticPaths:()=>h,getStaticProps:()=>p,reportWebVitals:()=>f,routeModule:()=>w,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>j,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>m});var a=t(63865),n=t(9455),i=t(30671),l=t(5583),c=t(19796),o=t(49690),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,i.M)(o,"default"),p=(0,i.M)(o,"getStaticProps"),h=(0,i.M)(o,"getStaticPaths"),g=(0,i.M)(o,"getServerSideProps"),x=(0,i.M)(o,"config"),f=(0,i.M)(o,"reportWebVitals"),m=(0,i.M)(o,"unstable_getStaticProps"),v=(0,i.M)(o,"unstable_getStaticPaths"),S=(0,i.M)(o,"unstable_getStaticParams"),y=(0,i.M)(o,"unstable_getServerProps"),j=(0,i.M)(o,"unstable_getServerSideProps"),w=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/su/servers",pathname:"/su/servers",bundlePath:"",filename:""},components:{App:c.default,Document:l.default},userland:o});s()}catch(e){s(e)}})},73872:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>c});var a=t(8732);t(82015);var n=t(96089),i=t(75979),l=e([i]);function c({slugText:e,justIcon:r,noIcon:t,title:s,outlined:l,extraClasses:c}){return(0,a.jsxs)("div",{className:(0,i.twMerge)("button small-text hover:!bg-transparent",l?" outlined gray bg-white":" ghost light-gray",c),onClick:r=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:l?void 0:{padding:0},children:[!t&&(0,a.jsx)(n.A,{size:l?15:20}),!r&&(0,a.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:s||"Copy Slug"})]})}i=(l.then?(await l)():l)[0],s()}catch(e){s(e)}})},57168:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>o});var a=t(8732),n=t(73872),i=t(2459),l=t(75979),c=e([n,l]);function o({server:e,noLoadBalance:r}){return(0,a.jsxs)("div",{className:"stack w-full",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{size:15,opacity:.5}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:e.host}),r?(0,a.jsx)(a.Fragment,{}):e.loadBalanced?(0,a.jsx)("span",{className:"info green small",children:"Load Balanced"}):(0,a.jsx)("button",{children:"Add to Load Balancer"})]})]}),(0,a.jsx)("div",{className:(0,l.twMerge)("stack border-0 border-l border-solid border-s-slate-200 dark:border-white/20","pl-6 ml-2 -mt-4 pt-2 w-full gap-0"),children:(0,a.jsx)("ul",{className:"p-0 m-0 pl-4",children:e.users?.map((e,r)=>a.jsx(d,{user:e},r))})})]})}function d({user:e}){return(0,a.jsx)("li",{className:(0,l.twMerge)("w-full"),children:(0,a.jsxs)("div",{className:"stack gap-0",children:[(0,a.jsxs)("span",{children:["user: ",(0,a.jsx)("b",{children:e.name})]}),(0,a.jsxs)("span",{children:["pass:"," ",(0,a.jsx)("b",{children:(0,a.jsx)(n.A,{slugText:e.password,title:"********",extraClasses:"inline",noIcon:!0})})]})]})})}[n,l]=c.then?(await c)():c,s()}catch(e){s(e)}})},66097:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>d});var a=t(8732),n=t(19796),i=t(82015),l=t.n(i),c=t(57168),o=e([c]);function d(){let e=l().useContext(n.AppContext).pageProps;e.user;let r=e.servers;return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-2",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Servers"}),(0,a.jsx)("span",{children:"All Servers"})]}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{children:"Add Server"})})]}),(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 w-full",children:r.map((e,r)=>(0,a.jsx)(c.A,{server:e,noLoadBalance:!0},r))}),(0,a.jsx)("button",{className:"w-full outlined dashed gray",children:"Add Server"})]})]})}c=(o.then?(await o)():o)[0],s()}catch(e){s(e)}})},77489:(e,r,t)=>{t.d(r,{A:()=>o});var s=t(29021),a=t.n(s),n=t(60374),i=t(33873),l=t.n(i);function c(){let e=process.env.DSQL_SU_USER_ID||"1",r=l().resolve(process.cwd(),`./jsonData/dbSchemas/users/user-${e}`),t=`${r}/servers.json`;return{dir:r,path:t}}function o(){try{!function(){try{let e=c();if(!a().existsSync(e.path)){let r={host:String(process.env.DSQL_DB_TARGET_IP_ADDRESS),port:3306,primary:!0,loadBalanced:!0,users:[{host:String(process.env.DSQL_DB_HOST),name:"root",password:process.env.DSQL_MARIADB_ROOT_PASSWORD||"password"}]};a().writeFileSync(e.path,JSON.stringify([r]))}}catch(e){return console.log(`Error checking servers ${e.message}`),!1}}();let e=c();return n.A.parse(a().readFileSync(e.path,"utf-8"))}catch(e){console.log(`Error getting servers ${e.message}`);return}}},96089:(e,r,t)=>{t.d(r,{A:()=>s});let s=(0,t(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},71934:(e,r,t)=>{t.d(r,{A:()=>s});async function s(...e){let r=global.DSQL_DB_CONN;try{if(!r)throw Error("No Connection provided to DB_HANDLER function!");let t=await r.query(...e);return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await r?.end()}}},60374:(e,r,t)=>{t.d(r,{A:()=>s});let s={parse:function(e,r){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,r)}catch(e){return}}},stringify:function(e,r,t){try{return JSON.stringify(e,r||void 0,t)}catch(e){return}}}},49690:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{default:()=>f,getServerSideProps:()=>m});var a=t(8732);t(82015);var n=t(29021),i=t.n(n),l=t(61197),c=t(40778),o=t(77489),d=t(66097),u=t(71934),p=t(33873),h=t.n(p),g=t(60374),x=e([d]);function f({user:e,data:r}){let t=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"Load Balancing"}),(0,a.jsx)("meta",{name:"description",content:"Distribute db load accross servers"})]});return(0,a.jsx)(c.A,{head:t,user:e,children:(0,a.jsx)(d.A,{})})}async function m({req:e,res:r,query:t}){try{let r=await (0,l.A)(e);if(!r?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let t=(0,o.A)();if(!t)throw Error("No servers found");t.find(e=>e.primary);let s=(await (0,u.A)("SELECT user,host,password FROM mysql.user")).filter(e=>e.User.match(/^dsql_user|^root/i));return i().writeFileSync(h().resolve(process.cwd(),"./.tmp/wrt.json"),String(g.A.stringify(s,null,4)),"utf8"),{props:{user:r,servers:t}}}catch(e){return{redirect:{destination:"/su",permanent:!1}}}}d=(x.then?(await x)():x)[0],s()}catch(e){s(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var r=require("../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[883,9821,9796,6622],()=>t(95755));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/servers.js.nft.json b/dsql-app/.local_dist/server/pages/su/servers.js.nft.json index 2909395..d575905 100644 --- a/dsql-app/.local_dist/server/pages/su/servers.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/servers.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../.tmp/wrt.json","../../../../jsonData/dbSchemas/users/user-1/servers.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../.tmp/wrt.json","../../../../jsonData/dbSchemas/users/user-1/servers.json","../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/users.js b/dsql-app/.local_dist/server/pages/su/users.js index da2c84a..40890c7 100644 --- a/dsql-app/.local_dist/server/pages/su/users.js +++ b/dsql-app/.local_dist/server/pages/su/users.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5109,e.ids=[5109],e.modules={93701:(e,s,t)=>{t.r(s),t.d(s,{config:()=>D,default:()=>b,getServerSideProps:()=>w,getStaticPaths:()=>P,getStaticProps:()=>_,reportWebVitals:()=>N,routeModule:()=>O,unstable_getServerProps:()=>A,unstable_getServerSideProps:()=>L,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>M,unstable_getStaticProps:()=>y});var r={};t.r(r),t.d(r,{default:()=>v,getServerSideProps:()=>j});var a=t(63865),l=t(9455),n=t(30671),i=t(49407),c=t(89600),o=t(8732),u=t(82015),d=t.n(u),p=t(93615),m=t.n(p),x=t(49888),h=t(21498);function g({data:e}){return(0,o.jsx)(d().Fragment,{children:(0,o.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,o.jsxs)("div",{className:"flex flex-row items-center w-full gap-20 mb-6 justify-between",children:[(0,o.jsx)("h2",{className:"text-xl m-0",children:"Users"}),(0,o.jsx)("a",{href:"/su/users/new",className:"button",children:"Add User"})]}),(0,o.jsx)("div",{className:"flex-col items-stretch gap-10 w-full",children:e.users.map((e,s)=>(0,o.jsx)(h.A,{userObject:e},s+1))})]})})}var S=t(67216),f=t.n(S);function v({user:e,data:s}){let t=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,o.jsx)(x.A,{head:t,user:e,children:(0,o.jsx)(g,{data:s})})}async function j({req:e,res:s,query:t}){let r=await m()(e);return r?.logged_in_status?{props:{user:r,data:{users:(await f()("SELECT * FROM users")).reverse()}}}:{redirect:{destination:"/su/login",permanent:!1}}}let b=(0,n.M)(r,"default"),_=(0,n.M)(r,"getStaticProps"),P=(0,n.M)(r,"getStaticPaths"),w=(0,n.M)(r,"getServerSideProps"),D=(0,n.M)(r,"config"),N=(0,n.M)(r,"reportWebVitals"),y=(0,n.M)(r,"unstable_getStaticProps"),M=(0,n.M)(r,"unstable_getStaticPaths"),q=(0,n.M)(r,"unstable_getStaticParams"),A=(0,n.M)(r,"unstable_getServerProps"),L=(0,n.M)(r,"unstable_getServerSideProps"),O=new a.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su/users",pathname:"/su/users",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:r})},21498:(e,s,t)=>{t.d(s,{A:()=>n});var r=t(8732),a=t(82015),l=t.n(a);function n({userObject:e,userPage:s}){let t=Object.keys(e),[a,n]=l().useState(!1),[i,c]=l().useState(0),[o,u]=l().useState(!s);return(0,r.jsxs)("div",{className:"card col green w-full overflow-hidden"+(o?s?" h-[100px]":" h-[85px]":" "),children:[(0,r.jsxs)("div",{className:"items-center w-full",children:[(0,r.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(s?" w-16 h-16":" w-12 h-12")}),!s&&(0,r.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,r.jsxs)("div",{className:"ml-auto",children:[(0,r.jsx)("button",{className:"outlined gray small-text",onClick:e=>{o?u(!1):u(!0)},children:o?"More Details":"Collapse"}),!s&&(0,r.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,r.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:t.map((s,a)=>(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("span",{style:{wordBreak:"break-all"},children:[s,":"," ",(0,r.jsx)("b",{children:e[s]})]})}),a{u(!0)},children:"Collapse"})]})}},67216:(e,s,t)=>{let r=t(9973),a=t(31976),l=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function n(...e){try{let s=await l.query(...e);return await l.end(),JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=n},31976:(e,s,t)=>{let r=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let s=`${e}/ca-cert.pem`;if(!r.existsSync(s)){console.log(`${s} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var s=require("../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[883,9821,9600,3932],()=>t(93701));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5109,e.ids=[5109],e.modules={9591:(e,t,s)=>{s.r(t),s.d(t,{config:()=>N,default:()=>b,getServerSideProps:()=>w,getStaticPaths:()=>v,getStaticProps:()=>S,reportWebVitals:()=>P,routeModule:()=>D,unstable_getServerProps:()=>q,unstable_getServerSideProps:()=>A,unstable_getStaticParams:()=>M,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>_});var r={};s.r(r),s.d(r,{default:()=>f,getServerSideProps:()=>j});var a=s(63865),l=s(9455),i=s(30671),n=s(5583),o=s(19796),u=s(8732),c=s(82015),d=s.n(c),m=s(61197),p=s(40778),x=s(1360);function h({data:e}){return(0,u.jsx)(d().Fragment,{children:(0,u.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,u.jsxs)("div",{className:"flex flex-row items-center w-full gap-20 mb-6 justify-between",children:[(0,u.jsx)("h2",{className:"text-xl m-0",children:"Users"}),(0,u.jsx)("a",{href:"/su/users/new",className:"button",children:"Add User"})]}),(0,u.jsx)("div",{className:"flex-col items-stretch gap-10 w-full",children:e.users.map((e,t)=>(0,u.jsx)(x.A,{userObject:e},t+1))})]})})}var g=s(71934);function f({user:e,data:t}){let s=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,u.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,u.jsx)(p.A,{head:s,user:e,children:(0,u.jsx)(h,{data:t})})}async function j({req:e,res:t,query:s}){let r=await (0,m.A)(e);return r?.logged_in_status?{props:{user:r,data:{users:(await (0,g.A)("SELECT * FROM users")).reverse()}}}:{redirect:{destination:"/su/login",permanent:!1}}}let b=(0,i.M)(r,"default"),S=(0,i.M)(r,"getStaticProps"),v=(0,i.M)(r,"getStaticPaths"),w=(0,i.M)(r,"getServerSideProps"),N=(0,i.M)(r,"config"),P=(0,i.M)(r,"reportWebVitals"),_=(0,i.M)(r,"unstable_getStaticProps"),y=(0,i.M)(r,"unstable_getStaticPaths"),M=(0,i.M)(r,"unstable_getStaticParams"),q=(0,i.M)(r,"unstable_getServerProps"),A=(0,i.M)(r,"unstable_getServerSideProps"),D=new a.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su/users",pathname:"/su/users",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:r})},1360:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(8732),a=s(82015),l=s.n(a);function i({userObject:e,userPage:t}){let s=Object.keys(e),[a,i]=l().useState(!1),[n,o]=l().useState(0),[u,c]=l().useState(!t);return(0,r.jsxs)("div",{className:"card col green w-full overflow-hidden"+(u?t?" h-[100px]":" h-[85px]":" "),children:[(0,r.jsxs)("div",{className:"items-center w-full",children:[(0,r.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(t?" w-16 h-16":" w-12 h-12")}),!t&&(0,r.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,r.jsxs)("div",{className:"ml-auto",children:[(0,r.jsx)("button",{className:"outlined gray small-text",onClick:e=>{u?c(!1):c(!0)},children:u?"More Details":"Collapse"}),!t&&(0,r.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,r.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:s.map((t,a)=>(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("span",{style:{wordBreak:"break-all"},children:[t,":"," ",(0,r.jsx)("b",{children:e[t]})]})}),a{c(!0)},children:"Collapse"})]})}},71934:(e,t,s)=>{s.d(t,{A:()=>r});async function r(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796,6622],()=>s(9591));module.exports=r})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/users.js.nft.json b/dsql-app/.local_dist/server/pages/su/users.js.nft.json index b998a4f..817b606 100644 --- a/dsql-app/.local_dist/server/pages/su/users.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/users.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/core-util-is/lib/util.js","../../../../node_modules/core-util-is/package.json","../../../../node_modules/inherits/inherits.js","../../../../node_modules/inherits/inherits_browser.js","../../../../node_modules/inherits/package.json","../../../../node_modules/isarray/index.js","../../../../node_modules/isarray/package.json","../../../../node_modules/mysql/index.js","../../../../node_modules/mysql/lib/Connection.js","../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../node_modules/mysql/lib/Pool.js","../../../../node_modules/mysql/lib/PoolCluster.js","../../../../node_modules/mysql/lib/PoolConfig.js","../../../../node_modules/mysql/lib/PoolConnection.js","../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../node_modules/mysql/lib/PoolSelector.js","../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../node_modules/mysql/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/process-nextick-args/index.js","../../../../node_modules/process-nextick-args/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../node_modules/readable-stream/package.json","../../../../node_modules/readable-stream/readable.js","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/serverless-mysql/index.js","../../../../node_modules/serverless-mysql/package.json","../../../../node_modules/sqlstring/index.js","../../../../node_modules/sqlstring/lib/SqlString.js","../../../../node_modules/sqlstring/package.json","../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/util-deprecate/node.js","../../../../node_modules/util-deprecate/package.json","../../../../package.json","../../../package.json","../../chunks/1614.js","../../chunks/2414.js","../../chunks/2451.js","../../chunks/2996.js","../../chunks/3247.js","../../chunks/3460.js","../../chunks/3737.js","../../chunks/3932.js","../../chunks/4050.js","../../chunks/4312.js","../../chunks/4333.js","../../chunks/4385.js","../../chunks/45.js","../../chunks/5134.js","../../chunks/5212.js","../../chunks/5264.js","../../chunks/5421.js","../../chunks/5664.js","../../chunks/5674.js","../../chunks/6521.js","../../chunks/7070.js","../../chunks/7640.js","../../chunks/8540.js","../../chunks/8613.js","../../chunks/883.js","../../chunks/8842.js","../../chunks/9600.js","../../chunks/9621.js","../../chunks/9732.js","../../chunks/9821.js","../../chunks/9914.js","../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/lodash/lodash.js","../../../../node_modules/lodash/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../node_modules/next/dist/shared/lib/head.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../node_modules/next/head.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/scheduler/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../package.json","../../chunks/1251.js","../../chunks/1579.js","../../chunks/194.js","../../chunks/2282.js","../../chunks/3155.js","../../chunks/3474.js","../../chunks/3496.js","../../chunks/3634.js","../../chunks/3704.js","../../chunks/3791.js","../../chunks/4627.js","../../chunks/5392.js","../../chunks/5839.js","../../chunks/5954.js","../../chunks/6160.js","../../chunks/6202.js","../../chunks/6521.js","../../chunks/6622.js","../../chunks/6903.js","../../chunks/725.js","../../chunks/7713.js","../../chunks/8704.js","../../chunks/8760.js","../../chunks/883.js","../../chunks/9796.js","../../chunks/9821.js","../../chunks/9901.js","../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/users/[single].js b/dsql-app/.local_dist/server/pages/su/users/[single].js index a44664f..3675600 100644 --- a/dsql-app/.local_dist/server/pages/su/users/[single].js +++ b/dsql-app/.local_dist/server/pages/su/users/[single].js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3632,e.ids=[3632],e.modules={3443:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.r(t),s.d(t,{config:()=>p,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>h,reportWebVitals:()=>f,routeModule:()=>b,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>j});var r=s(63865),l=s(9455),n=s(30671),i=s(49407),c=s(89600),o=s(29657),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,n.M)(o,"default"),h=(0,n.M)(o,"getStaticProps"),m=(0,n.M)(o,"getStaticPaths"),x=(0,n.M)(o,"getServerSideProps"),p=(0,n.M)(o,"config"),f=(0,n.M)(o,"reportWebVitals"),j=(0,n.M)(o,"unstable_getStaticProps"),g=(0,n.M)(o,"unstable_getStaticPaths"),v=(0,n.M)(o,"unstable_getStaticParams"),y=(0,n.M)(o,"unstable_getServerProps"),w=(0,n.M)(o,"unstable_getServerSideProps"),b=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su/users/[single]",pathname:"/su/users/[single]",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:o});a()}catch(e){a(e)}})},84759:(e,t,s)=>{s.d(t,{A:()=>a});function a({editorHTMLElementRef:e,fieldObject:t,setRefresh:s,language:a="javascript",entry:r,jsonTextEditors:l,editorRef:n,readOnly:i,initialContent:c,options:o}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{s?.(e=>e+1)},1e3);return}let d=ace.edit(e.current);d.setOptions({mode:"ace/mode/"+a,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&r?.[t.fieldName]?(()=>{if("json"!==a)return r[t.fieldName];try{return JSON.stringify(JSON.parse(r[t.fieldName]),null,4)}catch(e){return r[t.fieldName]}})():""),placeholder:"json"==a?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:i,...o}),n&&t?.fieldName&&(l?.current.push({fieldName:t.fieldName,ref:n}),n.current=d);try{ace.require("ace/ext/beautify").beautify(d.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},51548:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(8732),r=s(58526);function l({selectOptions:e,name:t,onChangeHandler:s,required:l,setAlert:n,title:i,defaultValue:c,info:o,id:d}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),s=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!s.classList.contains("hidden")){s.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&s.classList.contains("hidden"))){if(!t){s.classList.add("hidden");return}if(s.classList.contains("hidden")){s.classList.remove("hidden");return}s.classList.add("hidden")}}return(0,a.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[i&&(0,a.jsxs)("label",{htmlFor:t,children:[i,l?"":" (optional)"]}),(0,a.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,a.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:l,onChange:e=>{n&&n(null),e.target.classList.remove("warning"),s&&s(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:s,title:r}=e;return(0,a.jsx)("option",{value:s,selected:!!e.default,children:r},t+1)})}),(0,a.jsx)(r.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,a.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,a.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,a.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,a.jsx)("span",{children:o})}),(0,a.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,a.jsx)("div",{children:"Form Select Error"})}}s(82015)},89788:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>o});var r=s(8732);s(63715);var l=s(82015),n=s.n(l);s(84759);var i=s(75979),c=e([i]);function o({editorRef:e,content:t,readOnly:s,language:a="javascript",options:l,wrapperProps:c}){try{let e=n().useRef(),[t,s]=n().useState(0);return(0,r.jsx)("div",{...c,ref:e,className:(0,i.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,r.jsx)(n().Fragment,{children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}i=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},46437:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(8732),r=s(23293);function l(){return(0,a.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,a.jsx)(r.A,{})})}s(82015)},58548:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(8732),r=s(82015),l=s.n(r);function n({confirmedDelegetedUser:e,linksArray:t,user:s}){e?.delegated,e?.priviledges?.match(/Edit Tables/i),e?.priviledges?.match(/Delete Tables/i),e?.priviledges?.match(/Create Tables/i);let[r,n]=l().useState(t||null);return r&&r[1]?(0,a.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:r.map((e,t,s)=>t===r.length-1?(0,a.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,a.jsxs)(l().Fragment,{children:[(0,a.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,a.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,a.jsx)(l().Fragment,{})}},34844:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8732),r=s(82015),l=s.n(r),n=s(96089);function i({content:e,language:t,style:s,showCopy:r}){let[i,c]=l().useState(!1),o=()=>{c(!0)},d={};return(0,a.jsxs)("pre",{className:`language-${t||"javascript"} w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center`,style:s?{...s,...d}:d,children:[(0,a.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:e}),(0,a.jsx)("button",{className:"outlined copy-code "+(r?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:t=>{navigator.clipboard.writeText(e).then(()=>{o()})},children:(0,a.jsx)(n.A,{className:"text-white",size:20})})]})}},84270:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>x});var r=s(8732),l=s(82015),n=s.n(l),i=s(21498),c=s(46437),o=s(92867),d=s(63715),u=s(32415),h=s(7264),m=e([h]);function x({data:e}){let t=e.user,[s,a]=n().useState(0),[l,m]=n().useState(!1);return(0,r.jsxs)(n().Fragment,{children:[(0,r.jsxs)("div",{className:"w-full justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(c.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[t.first_name," ",t.last_name]}),(0,r.jsx)("span",{className:"info w-auto gray font-normal",children:t.email})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("button",{onClick:e=>{window.confirm(`Create a new backup for ${t.first_name}?`)&&(m(!0),(0,d.A)("/api/admin/addUserBackup",{method:"post",body:{user:t}}).then(e=>{console.log(e),e.success&&a(e=>e+1),setTimeout(()=>{m(!1)},1e3)}))},className:"relative",children:[l&&(0,r.jsx)(u.A,{width:"20px"}),"Backup User"]})})]}),(0,r.jsx)(i.A,{userObject:t,userPage:!0}),(0,r.jsx)(o.A,{user:t,refresh:s,setRefresh:a}),(0,r.jsx)(h.A,{user:t,refresh:s,setRefresh:a})]})}h=(m.then?(await m)():m)[0],a()}catch(e){a(e)}})},92867:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(8732),r=s(82015),l=s.n(r),n=s(32415);s(63715);var i=s(47338);function c({user:e,refresh:t,setRefresh:s}){let[r,c]=l().useState(!1),[o,d]=l().useState([]);return(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"User Backups"}),!o&&(0,a.jsx)(n.A,{width:"20px",position:"relative"}),o&&!o[0]&&(0,a.jsx)("div",{children:"This user has no backups"}),o&&o[0]&&o.sort((e,t)=>parseInt(e)>parseInt(t)?-1:1).map((t,s)=>{let r=new Date(parseInt(t));return(0,a.jsxs)("a",{href:`/su/users/${e.id}/${t}`,className:"card w-full items-center",children:[(0,a.jsx)(i.A,{}),(0,a.jsx)("b",{children:"Backup:"}),(0,a.jsx)("span",{children:r.toString()})]},t)})]})}},21498:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(8732),r=s(82015),l=s.n(r);function n({userObject:e,userPage:t}){let s=Object.keys(e),[r,n]=l().useState(!1),[i,c]=l().useState(0),[o,d]=l().useState(!t);return(0,a.jsxs)("div",{className:"card col green w-full overflow-hidden"+(o?t?" h-[100px]":" h-[85px]":" "),children:[(0,a.jsxs)("div",{className:"items-center w-full",children:[(0,a.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(t?" w-16 h-16":" w-12 h-12")}),!t&&(0,a.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,a.jsxs)("div",{className:"ml-auto",children:[(0,a.jsx)("button",{className:"outlined gray small-text",onClick:e=>{o?d(!1):d(!0)},children:o?"More Details":"Collapse"}),!t&&(0,a.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,a.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:s.map((t,r)=>(0,a.jsxs)(l().Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)("span",{style:{wordBreak:"break-all"},children:[t,":"," ",(0,a.jsx)("b",{children:e[t]})]})}),r{d(!0)},children:"Collapse"})]})}},7264:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>d});var r=s(8732),l=s(82015),n=s.n(l);s(63715);var i=s(16845),c=s(64102),o=e([c]);function d({user:e,refresh:t,setRefresh:s}){let[a,l]=n().useState(!1),[o,d]=n().useState(null),[u,h]=n().useState(null);return(0,r.jsxs)("div",{className:"paper w-full",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"User Data"}),o&&(0,r.jsx)(i.A,{user:e,rootFilesArray:o}),u&&(0,r.jsx)(c.A,{user:e,databases:u})]})}c=(o.then?(await o)():o)[0],a()}catch(e){a(e)}})},64102:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>h});var r=s(8732),l=s(82015),n=s.n(l);s(46437),s(58548);var i=s(32415),c=s(63715),o=s(21243),d=s(51548),u=e([o]);function h({user:e,databases:t}){try{let s=n().useRef(),a=n().useRef(),l=n().useRef(t[0]),[u,h]=n().useState(!1),[m,x]=n().useState(!1),[p,f]=n().useState(0),[j,g]=n().useState(t[0]),[v,y]=n().useState([]);return(0,r.jsxs)("div",{className:"paper w-full",children:[(0,r.jsx)("h3",{className:"text-lg m-0",children:(0,r.jsx)("span",{children:"Database Shell"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(d.A,{selectOptions:t.map(t=>({payload:t,title:t?.replace(RegExp(`datasquirel_user_${e.id}_`),"")})),name:"select-database",onChangeHandler:e=>{g(e.target.value),l.current=e.target.value},title:"Databases"}),j&&v&&(0,r.jsx)(d.A,{selectOptions:v.map(e=>({payload:e,title:e})),name:"select-database-table",title:"Tables"})]}),(0,r.jsxs)("div",{className:"w-full flex-col relative",children:[(0,r.jsx)("div",{ref:s,id:"ace-editor-wrapper",style:{height:"100px"}}),(0,r.jsxs)("button",{className:"absolute right-4 bottom-4"+(u?" pointer-events-none opacity-70":""),onClick:e=>{!function(){h(!0);let e=a.current?a.current.getValue():null;if(!e?.match(/./))return;let t=e.replace(/^--.*/gm,"").replace(/\n|\r|\n\r/gm,"").replace(/ {2,}/g," ");(0,c.A)("/api/admin/runUserDbQuery",{method:"post",body:{database:l.current,query:t}},!0).then(e=>{e.success?x(e.result):e.msg&&window.alert(e.msg),setTimeout(()=>{h(!1)},500)})}()},children:[u&&(0,r.jsx)(i.A,{position:"relative",width:"15px",borderWidth:"3px",style:{backgroundColor:"transparent"}}),u?"Running Query ...":"Run Query"]})]}),m&&!u&&(0,r.jsx)(o.A,{data:m,user:e})]})}catch(e){return console.log(e),(0,r.jsx)(n().Fragment,{children:(0,r.jsx)("section",{className:"card",children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Shell not available at this time"})})})}}o=(u.then?(await u)():u)[0],a()}catch(e){a(e)}})},21243:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>o});var r=s(8732),l=s(89788),n=s(82015),i=s.n(n),c=e([l]);function o({data:e,user:t}){try{return Object.keys(e[0]),(0,r.jsx)(i().Fragment,{children:(0,r.jsx)("div",{className:"p-4 bg-slate-200 rounded-md overflow-hidden w-full max-w-6xl",children:(0,r.jsx)(l.A,{content:JSON.stringify(e,null,4)})})})}catch(e){return(0,r.jsx)(i().Fragment,{children:(0,r.jsx)("span",{children:"No results"})})}}l=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},16845:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(8732),r=s(82015),l=s.n(r),n=s(34844),i=s(63715),c=s(66916);function o({user:e,file:t,activeFile:s,setActiveFile:r}){return(0,a.jsxs)("button",{className:"justify-start gap-4"+(s?.path===`${t.root}/${t.name}`?" dark":" light-gray"),onClick:s=>{(0,i.A)("/api/admin/grabFile",{method:"post",body:{user:e,type:"file",path:`${t.root}/${t.name}`}}).then(e=>{if(e.success)try{r({title:t.name,path:`${t.root}/${t.name}`,data:JSON.stringify(JSON.parse(e.data),null,4)})}catch(s){r({title:t.name,path:`${t.root}/${t.name}`,data:e.data})}})},children:[(0,a.jsx)(c.A,{}),t.name]})}var d=s(96089),u=s(54677);function h({user:e,file:t,activeFile:s,setActiveFile:r}){let[n,i]=l().useState(null),[c,m]=l().useState(!1);return(0,a.jsxs)("div",{className:"flex-col w-full items-start relative",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.A,{fontSize:"small",className:"text-slate-400"}),t.name,(0,a.jsx)(u.A,{className:"ml-auto absolute right-2"})]}),t.content&&(0,a.jsx)("div",{className:"flex-col w-full pl-4 items-start ml-2",style:{borderLeft:"1px solid var(--slate-200)"},children:t.content.map((t,l)=>t?.type?.match(/file/i)?(0,a.jsx)(o,{user:e,file:t,activeFile:s,setActiveFile:r},l):(0,a.jsx)(h,{user:e,file:t,activeFile:s,setActiveFile:r},l))})]})}function m({user:e,rootFilesArray:t}){let[s,r]=l().useState(null);return(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("h3",{className:"text-lg m-0",children:"User Files"}),(0,a.jsxs)("div",{className:"w-full items-start max-w-7xl",children:[(0,a.jsx)("div",{className:"flex-col items-stretch w-[40%]",children:t.map((t,l)=>t?.type?.match(/file/)?(0,a.jsx)(o,{user:e,file:t,activeFile:s,setActiveFile:r},l):(0,a.jsx)(h,{user:e,file:t,activeFile:s,setActiveFile:r},l))}),(0,a.jsx)("div",{className:"grow flex-col items-start justify-start w-[60%] h-full -mt-4",children:s&&(0,a.jsx)(n.A,{content:s.data||"",language:"javascript"})})]})]})}},23293:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},96089:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},47338:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]])},66916:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},54677:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},67216:(e,t,s)=>{let a=s(9973),r=s(31976),l=a({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:r()}});async function n(...e){try{let t=await l.query(...e);return await l.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=n},31976:(e,t,s)=>{let a=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!a.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:a.readFileSync(`${e}/ca-cert.pem`)}}},29657:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.r(t),s.d(t,{default:()=>x,getServerSideProps:()=>p});var r=s(8732),l=s(82015),n=s.n(l),i=s(93615),c=s.n(i),o=s(49888),d=s(84270),u=s(67216),h=s.n(u),m=e([d]);function x({user:e,data:t}){let s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"}),(0,r.jsxs)(n().Fragment,{children:[(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]});return(0,r.jsx)(o.A,{head:s,user:e,children:(0,r.jsx)(d.A,{data:t})})}async function p({req:e,res:t,query:s}){let a=await c()(e);if(!a?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let r=await h()(`SELECT * FROM users WHERE id='${s.single}'`);return r?.[0]?{props:{user:a,data:{user:r?.[0]||{}}}}:{redirect:{destination:"/su/users",permanent:!1}}}d=(m.then?(await m)():m)[0],a()}catch(e){a(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9600,3932],()=>s(3443));module.exports=a})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3632,e.ids=[3632],e.modules={17981:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.r(t),s.d(t,{config:()=>p,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>h,reportWebVitals:()=>f,routeModule:()=>b,unstable_getServerProps:()=>v,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>j});var r=s(63865),l=s(9455),i=s(30671),n=s(5583),c=s(19796),o=s(24747),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,i.M)(o,"default"),h=(0,i.M)(o,"getStaticProps"),m=(0,i.M)(o,"getStaticPaths"),x=(0,i.M)(o,"getServerSideProps"),p=(0,i.M)(o,"config"),f=(0,i.M)(o,"reportWebVitals"),j=(0,i.M)(o,"unstable_getStaticProps"),g=(0,i.M)(o,"unstable_getStaticPaths"),y=(0,i.M)(o,"unstable_getStaticParams"),v=(0,i.M)(o,"unstable_getServerProps"),w=(0,i.M)(o,"unstable_getServerSideProps"),b=new r.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su/users/[single]",pathname:"/su/users/[single]",bundlePath:"",filename:""},components:{App:c.default,Document:n.default},userland:o});a()}catch(e){a(e)}})},6789:(e,t,s)=>{s.d(t,{A:()=>a});function a({editorHTMLElementRef:e,fieldObject:t,setRefresh:s,language:a="javascript",entry:r,jsonTextEditors:l,editorRef:i,readOnly:n,initialContent:c,options:o}){try{if(!ace?.edit||!e.current){console.log("Ace Editor not found!"),setTimeout(()=>{s?.(e=>e+1)},1e3);return}let d=ace.edit(e.current);d.setOptions({mode:"ace/mode/"+a,value:c||(t?.defaultValue?t.defaultValue:t?.fieldName&&r?.[t.fieldName]?(()=>{if("json"!==a)return r[t.fieldName];try{return JSON.stringify(JSON.parse(r[t.fieldName]),null,4)}catch(e){return r[t.fieldName]}})():""),placeholder:"json"==a?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:n,...o}),i&&t?.fieldName&&(l?.current.push({fieldName:t.fieldName,ref:i}),i.current=d);try{ace.require("ace/ext/beautify").beautify(d.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}},80830:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(8732),r=s(58526);function l({selectOptions:e,name:t,onChangeHandler:s,required:l,setAlert:i,title:n,defaultValue:c,info:o,id:d}){try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),s=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!s.classList.contains("hidden")){s.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&s.classList.contains("hidden"))){if(!t){s.classList.add("hidden");return}if(s.classList.contains("hidden")){s.classList.remove("hidden");return}s.classList.add("hidden")}}return(0,a.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[n&&(0,a.jsxs)("label",{htmlFor:t,children:[n,l?"":" (optional)"]}),(0,a.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,a.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:l,onChange:e=>{i&&i(null),e.target.classList.remove("warning"),s&&s(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:s,title:r}=e;return(0,a.jsx)("option",{value:s,selected:!!e.default,children:r},t+1)})}),(0,a.jsx)(r.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,a.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,a.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,a.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,a.jsx)("span",{children:o})}),(0,a.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,a.jsx)("div",{children:"Form Select Error"})}}s(82015)},84894:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>o});var r=s(8732);s(46169);var l=s(82015),i=s.n(l);s(6789);var n=s(75979),c=e([n]);function o({editorRef:e,content:t,readOnly:s,language:a="javascript",options:l,wrapperProps:c}){try{let e=i().useRef(),[t,s]=i().useState(0);return(0,r.jsx)("div",{...c,ref:e,className:(0,n.twMerge)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",c?.className)})}catch(e){return(0,r.jsx)(i().Fragment,{children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}n=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},59023:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(8732),r=s(23293);function l(){return(0,a.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,a.jsx)(r.A,{})})}s(82015)},64126:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(8732),r=s(82015),l=s.n(r),i=s(96089);function n({content:e,language:t,style:s,showCopy:r}){let[n,c]=l().useState(!1),o=()=>{c(!0)},d={};return(0,a.jsxs)("pre",{className:`language-${t||"javascript"} w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center`,style:s?{...s,...d}:d,children:[(0,a.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:e}),(0,a.jsx)("button",{className:"outlined copy-code "+(r?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:t=>{navigator.clipboard.writeText(e).then(()=>{o()})},children:(0,a.jsx)(i.A,{className:"text-white",size:20})})]})}},83180:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>x});var r=s(8732),l=s(82015),i=s.n(l),n=s(1360),c=s(59023),o=s(11201),d=s(46169),u=s(16757),h=s(58506),m=e([h]);function x({data:e}){let t=e.user,[s,a]=i().useState(0),[l,m]=i().useState(!1);return(0,r.jsxs)(i().Fragment,{children:[(0,r.jsxs)("div",{className:"w-full justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(c.A,{}),(0,r.jsxs)("h1",{className:"text-3xl m-0",children:[t.first_name," ",t.last_name]}),(0,r.jsx)("span",{className:"info w-auto gray font-normal",children:t.email})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("button",{onClick:e=>{window.confirm(`Create a new backup for ${t.first_name}?`)&&(m(!0),(0,d.A)("/api/admin/addUserBackup",{method:"post",body:{user:t}}).then(e=>{console.log(e),e.success&&a(e=>e+1),setTimeout(()=>{m(!1)},1e3)}))},className:"relative",children:[l&&(0,r.jsx)(u.A,{width:"20px"}),"Backup User"]})})]}),(0,r.jsx)(n.A,{userObject:t,userPage:!0}),(0,r.jsx)(o.A,{user:t,refresh:s,setRefresh:a}),(0,r.jsx)(h.A,{user:t,refresh:s,setRefresh:a})]})}h=(m.then?(await m)():m)[0],a()}catch(e){a(e)}})},11201:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(8732),r=s(82015),l=s.n(r),i=s(16757);s(46169);var n=s(47338);function c({user:e,refresh:t,setRefresh:s}){let[r,c]=l().useState(!1),[o,d]=l().useState([]);return(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"User Backups"}),!o&&(0,a.jsx)(i.A,{width:"20px",position:"relative"}),o&&!o[0]&&(0,a.jsx)("div",{children:"This user has no backups"}),o&&o[0]&&o.sort((e,t)=>parseInt(e)>parseInt(t)?-1:1).map((t,s)=>{let r=new Date(parseInt(t));return(0,a.jsxs)("a",{href:`/su/users/${e.id}/${t}`,className:"card w-full items-center",children:[(0,a.jsx)(n.A,{}),(0,a.jsx)("b",{children:"Backup:"}),(0,a.jsx)("span",{children:r.toString()})]},t)})]})}},1360:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8732),r=s(82015),l=s.n(r);function i({userObject:e,userPage:t}){let s=Object.keys(e),[r,i]=l().useState(!1),[n,c]=l().useState(0),[o,d]=l().useState(!t);return(0,a.jsxs)("div",{className:"card col green w-full overflow-hidden"+(o?t?" h-[100px]":" h-[85px]":" "),children:[(0,a.jsxs)("div",{className:"items-center w-full",children:[(0,a.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(t?" w-16 h-16":" w-12 h-12")}),!t&&(0,a.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,a.jsxs)("div",{className:"ml-auto",children:[(0,a.jsx)("button",{className:"outlined gray small-text",onClick:e=>{o?d(!1):d(!0)},children:o?"More Details":"Collapse"}),!t&&(0,a.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,a.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:s.map((t,r)=>(0,a.jsxs)(l().Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)("span",{style:{wordBreak:"break-all"},children:[t,":"," ",(0,a.jsx)("b",{children:e[t]})]})}),r{d(!0)},children:"Collapse"})]})}},58506:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>d});var r=s(8732),l=s(82015),i=s.n(l);s(46169);var n=s(50233),c=s(97012),o=e([c]);function d({user:e,refresh:t,setRefresh:s}){let[a,l]=i().useState(!1),[o,d]=i().useState(null),[u,h]=i().useState(null);return(0,r.jsxs)("div",{className:"paper w-full",children:[(0,r.jsx)("h2",{className:"text-xl m-0",children:"User Data"}),o&&(0,r.jsx)(n.A,{user:e,rootFilesArray:o}),u&&(0,r.jsx)(c.A,{user:e,databases:u})]})}c=(o.then?(await o)():o)[0],a()}catch(e){a(e)}})},97012:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>h});var r=s(8732),l=s(82015),i=s.n(l),n=s(16757),c=s(46169),o=s(64457),d=s(80830),u=e([o]);function h({user:e,databases:t}){try{let s=i().useRef(),a=i().useRef(),l=i().useRef(t[0]),[u,h]=i().useState(!1),[m,x]=i().useState(!1),[p,f]=i().useState(0),[j,g]=i().useState(t[0]),[y,v]=i().useState([]);return(0,r.jsxs)("div",{className:"paper w-full",children:[(0,r.jsx)("h3",{className:"text-lg m-0",children:(0,r.jsx)("span",{children:"Database Shell"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(d.A,{selectOptions:t.map(t=>({payload:t,title:t?.replace(RegExp(`datasquirel_user_${e.id}_`),"")})),name:"select-database",onChangeHandler:e=>{g(e.target.value),l.current=e.target.value},title:"Databases"}),j&&y&&(0,r.jsx)(d.A,{selectOptions:y.map(e=>({payload:e,title:e})),name:"select-database-table",title:"Tables"})]}),(0,r.jsxs)("div",{className:"w-full flex-col relative",children:[(0,r.jsx)("div",{ref:s,id:"ace-editor-wrapper",style:{height:"100px"}}),(0,r.jsxs)("button",{className:"absolute right-4 bottom-4"+(u?" pointer-events-none opacity-70":""),onClick:e=>{!function(){h(!0);let e=a.current?a.current.getValue():null;if(!e?.match(/./))return;let t=e.replace(/^--.*/gm,"").replace(/\n|\r|\n\r/gm,"").replace(/ {2,}/g," ");(0,c.A)("/api/admin/runUserDbQuery",{method:"post",body:{database:l.current,query:t}},!0).then(e=>{e.success?x(e.result):e.msg&&window.alert(e.msg),setTimeout(()=>{h(!1)},500)})}()},children:[u&&(0,r.jsx)(n.A,{position:"relative",width:"15px",borderWidth:"3px",style:{backgroundColor:"transparent"}}),u?"Running Query ...":"Run Query"]})]}),m&&!u&&(0,r.jsx)(o.A,{data:m,user:e})]})}catch(e){return console.log(e),(0,r.jsx)(i().Fragment,{children:(0,r.jsx)("section",{className:"card",children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Shell not available at this time"})})})}}o=(u.then?(await u)():u)[0],a()}catch(e){a(e)}})},64457:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>o});var r=s(8732),l=s(84894),i=s(82015),n=s.n(i),c=e([l]);function o({data:e,user:t}){try{return Object.keys(e[0]),(0,r.jsx)(n().Fragment,{children:(0,r.jsx)("div",{className:"p-4 bg-slate-200 rounded-md overflow-hidden w-full max-w-6xl",style:{width:"100%",height:"600px",overflow:"auto"},children:(0,r.jsx)(l.A,{content:JSON.stringify(e,null,4)})})})}catch(e){return(0,r.jsx)(n().Fragment,{children:(0,r.jsx)("span",{children:"No results"})})}}l=(c.then?(await c)():c)[0],a()}catch(e){a(e)}})},50233:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(8732),r=s(82015),l=s.n(r),i=s(64126),n=s(46169),c=s(66916);function o({user:e,file:t,activeFile:s,setActiveFile:r}){return(0,a.jsxs)("button",{className:"justify-start gap-4"+(s?.path===`${t.root}/${t.name}`?" dark":" light-gray"),onClick:s=>{(0,n.A)("/api/admin/grabFile",{method:"post",body:{user:e,type:"file",path:`${t.root}/${t.name}`}}).then(e=>{if(e.success)try{r({title:t.name,path:`${t.root}/${t.name}`,data:JSON.stringify(JSON.parse(e.data),null,4)})}catch(s){r({title:t.name,path:`${t.root}/${t.name}`,data:e.data})}})},children:[(0,a.jsx)(c.A,{}),t.name]})}var d=s(96089),u=s(54677);function h({user:e,file:t,activeFile:s,setActiveFile:r}){let[i,n]=l().useState(null),[c,m]=l().useState(!1);return(0,a.jsxs)("div",{className:"flex-col w-full items-start relative",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.A,{fontSize:"small",className:"text-slate-400"}),t.name,(0,a.jsx)(u.A,{className:"ml-auto absolute right-2"})]}),t.content&&(0,a.jsx)("div",{className:"flex-col w-full pl-4 items-start ml-2",style:{borderLeft:"1px solid var(--slate-200)"},children:t.content.map((t,l)=>t?.type?.match(/file/i)?(0,a.jsx)(o,{user:e,file:t,activeFile:s,setActiveFile:r},l):(0,a.jsx)(h,{user:e,file:t,activeFile:s,setActiveFile:r},l))})]})}function m({user:e,rootFilesArray:t}){let[s,r]=l().useState(null);return(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("h3",{className:"text-lg m-0",children:"User Files"}),(0,a.jsxs)("div",{className:"w-full items-start max-w-7xl",children:[(0,a.jsx)("div",{className:"flex-col items-stretch w-[40%]",children:t.map((t,l)=>t?.type?.match(/file/)?(0,a.jsx)(o,{user:e,file:t,activeFile:s||void 0,setActiveFile:r},l):(0,a.jsx)(h,{user:e,file:t,activeFile:s||void 0,setActiveFile:r},l))}),(0,a.jsx)("div",{className:"grow flex-col items-start justify-start w-[60%] h-full -mt-4",children:s&&(0,a.jsx)(i.A,{content:s.data||"",language:"javascript"})})]})]})}},23293:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},96089:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},47338:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]])},66916:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},54677:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(82544).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},71934:(e,t,s)=>{s.d(t,{A:()=>a});async function a(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let s=await t.query(...e);return JSON.parse(JSON.stringify(s))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},24747:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.r(t),s.d(t,{default:()=>h,getServerSideProps:()=>m});var r=s(8732),l=s(82015),i=s.n(l),n=s(61197),c=s(40778),o=s(83180),d=s(71934),u=e([o]);function h({user:e,data:t}){let s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"}),(0,r.jsxs)(i().Fragment,{children:[(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]});return(0,r.jsx)(c.A,{head:s,user:e,children:(0,r.jsx)(o.A,{data:t})})}async function m({req:e,res:t,query:s}){let a=await (0,n.A)(e);if(!a?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let r=await (0,d.A)(`SELECT * FROM users WHERE id='${s.single}'`);return r?.[0]?{props:{user:a,data:{user:r?.[0]||{}}}}:{redirect:{destination:"/su/users",permanent:!1}}}o=(u.then?(await u)():u)[0],a()}catch(e){a(e)}})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[883,9821,9796,6622],()=>s(17981));module.exports=a})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/users/[single].js.nft.json b/dsql-app/.local_dist/server/pages/su/users/[single].js.nft.json index 0669205..68cc884 100644 --- a/dsql-app/.local_dist/server/pages/su/users/[single].js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/users/[single].js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/core-util-is/lib/util.js","../../../../../node_modules/core-util-is/package.json","../../../../../node_modules/inherits/inherits.js","../../../../../node_modules/inherits/inherits_browser.js","../../../../../node_modules/inherits/package.json","../../../../../node_modules/isarray/index.js","../../../../../node_modules/isarray/package.json","../../../../../node_modules/mysql/index.js","../../../../../node_modules/mysql/lib/Connection.js","../../../../../node_modules/mysql/lib/ConnectionConfig.js","../../../../../node_modules/mysql/lib/Pool.js","../../../../../node_modules/mysql/lib/PoolCluster.js","../../../../../node_modules/mysql/lib/PoolConfig.js","../../../../../node_modules/mysql/lib/PoolConnection.js","../../../../../node_modules/mysql/lib/PoolNamespace.js","../../../../../node_modules/mysql/lib/PoolSelector.js","../../../../../node_modules/mysql/lib/protocol/Auth.js","../../../../../node_modules/mysql/lib/protocol/BufferList.js","../../../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../../../node_modules/mysql/lib/protocol/Parser.js","../../../../../node_modules/mysql/lib/protocol/Protocol.js","../../../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../../../node_modules/mysql/lib/protocol/SqlString.js","../../../../../node_modules/mysql/lib/protocol/Timer.js","../../../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../../../node_modules/mysql/lib/protocol/constants/client.js","../../../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../../../node_modules/mysql/lib/protocol/constants/types.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../../../node_modules/mysql/lib/protocol/packets/index.js","../../../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../../../node_modules/mysql/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/process-nextick-args/index.js","../../../../../node_modules/process-nextick-args/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../../../node_modules/readable-stream/lib/_stream_readable.js","../../../../../node_modules/readable-stream/lib/_stream_transform.js","../../../../../node_modules/readable-stream/lib/_stream_writable.js","../../../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../../../node_modules/readable-stream/package.json","../../../../../node_modules/readable-stream/readable.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/serverless-mysql/index.js","../../../../../node_modules/serverless-mysql/package.json","../../../../../node_modules/sqlstring/index.js","../../../../../node_modules/sqlstring/lib/SqlString.js","../../../../../node_modules/sqlstring/package.json","../../../../../node_modules/string_decoder/lib/string_decoder.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../../../node_modules/string_decoder/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../node_modules/tailwind-merge/package.json","../../../../../node_modules/util-deprecate/node.js","../../../../../node_modules/util-deprecate/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../node_modules/tailwind-merge/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/users/new.js b/dsql-app/.local_dist/server/pages/su/users/new.js index fb55618..65a1016 100644 --- a/dsql-app/.local_dist/server/pages/su/users/new.js +++ b/dsql-app/.local_dist/server/pages/su/users/new.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=5682,e.ids=[5682],e.modules={45158:(e,t,s)=>{s.r(t),s.d(t,{config:()=>P,default:()=>f,getServerSideProps:()=>v,getStaticPaths:()=>S,getStaticProps:()=>b,reportWebVitals:()=>w,routeModule:()=>k,unstable_getServerProps:()=>q,unstable_getServerSideProps:()=>y,unstable_getStaticParams:()=>M,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>N});var r={};s.r(r),s.d(r,{default:()=>g,getServerSideProps:()=>j});var a=s(63865),l=s(9455),i=s(30671),n=s(49407),c=s(89600),o=s(8732),u=s(82015),d=s.n(u),m=s(93615),p=s.n(m),x=s(49888);function h({data:e}){return(0,o.jsx)(d().Fragment,{children:(0,o.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,o.jsx)("div",{className:"flex flex-row items-center w-full gap-20 mb-6 justify-between",children:(0,o.jsx)("h2",{className:"text-xl m-0",children:"New User"})}),(0,o.jsx)("section",{className:"paper",children:(0,o.jsx)("h2",{className:"text-base m-0",children:"Info"})})]})})}function g({user:e,data:t}){let s=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,o.jsx)(x.A,{head:s,user:e,children:(0,o.jsx)(h,{data:t})})}async function j({req:e,res:t,query:s}){let r=await p()(e);return r?.logged_in_status?{props:{user:r}}:{redirect:{destination:"/su/login",permanent:!1}}}s(21498);let f=(0,i.M)(r,"default"),b=(0,i.M)(r,"getStaticProps"),S=(0,i.M)(r,"getStaticPaths"),v=(0,i.M)(r,"getServerSideProps"),P=(0,i.M)(r,"config"),w=(0,i.M)(r,"reportWebVitals"),N=(0,i.M)(r,"unstable_getStaticProps"),_=(0,i.M)(r,"unstable_getStaticPaths"),M=(0,i.M)(r,"unstable_getStaticParams"),q=(0,i.M)(r,"unstable_getServerProps"),y=(0,i.M)(r,"unstable_getServerSideProps"),k=new a.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/su/users/new",pathname:"/su/users/new",bundlePath:"",filename:""},components:{App:c.default,Document:n.default},userland:r})},21498:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(8732),a=s(82015),l=s.n(a);function i({userObject:e,userPage:t}){let s=Object.keys(e),[a,i]=l().useState(!1),[n,c]=l().useState(0),[o,u]=l().useState(!t);return(0,r.jsxs)("div",{className:"card col green w-full overflow-hidden"+(o?t?" h-[100px]":" h-[85px]":" "),children:[(0,r.jsxs)("div",{className:"items-center w-full",children:[(0,r.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(t?" w-16 h-16":" w-12 h-12")}),!t&&(0,r.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,r.jsxs)("div",{className:"ml-auto",children:[(0,r.jsx)("button",{className:"outlined gray small-text",onClick:e=>{o?u(!1):u(!0)},children:o?"More Details":"Collapse"}),!t&&(0,r.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,r.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:s.map((t,a)=>(0,r.jsxs)(l().Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("span",{style:{wordBreak:"break-all"},children:[t,":"," ",(0,r.jsx)("b",{children:e[t]})]})}),a{u(!0)},children:"Collapse"})]})}},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600,3932],()=>s(45158));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=5682,e.ids=[5682],e.modules={92982:(e,t,r)=>{r.r(t),r.d(t,{config:()=>j,default:()=>h,getServerSideProps:()=>b,getStaticPaths:()=>P,getStaticProps:()=>f,reportWebVitals:()=>v,routeModule:()=>y,unstable_getServerProps:()=>w,unstable_getServerSideProps:()=>N,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>q,unstable_getStaticProps:()=>M});var s={};r.r(s),r.d(s,{default:()=>g,getServerSideProps:()=>S});var a=r(63865),i=r(9455),n=r(30671),u=r(5583),o=r(19796),l=r(8732),c=r(82015),d=r.n(c),p=r(61197),m=r(40778);function x({data:e}){return(0,l.jsx)(d().Fragment,{children:(0,l.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,l.jsx)("div",{className:"flex flex-row items-center w-full gap-20 mb-6 justify-between",children:(0,l.jsx)("h2",{className:"text-xl m-0",children:"New User"})}),(0,l.jsx)("section",{className:"paper",children:(0,l.jsx)("h2",{className:"text-base m-0",children:"Info"})})]})})}function g({user:e,data:t}){let r=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,l.jsx)(m.A,{head:r,user:e,children:(0,l.jsx)(x,{data:t})})}async function S({req:e,res:t,query:r}){let s=await (0,p.A)(e);return s?.logged_in_status?{props:{user:s}}:{redirect:{destination:"/su/login",permanent:!1}}}let h=(0,n.M)(s,"default"),f=(0,n.M)(s,"getStaticProps"),P=(0,n.M)(s,"getStaticPaths"),b=(0,n.M)(s,"getServerSideProps"),j=(0,n.M)(s,"config"),v=(0,n.M)(s,"reportWebVitals"),M=(0,n.M)(s,"unstable_getStaticProps"),q=(0,n.M)(s,"unstable_getStaticPaths"),_=(0,n.M)(s,"unstable_getStaticParams"),w=(0,n.M)(s,"unstable_getServerProps"),N=(0,n.M)(s,"unstable_getServerSideProps"),y=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/users/new",pathname:"/su/users/new",bundlePath:"",filename:""},components:{App:o.default,Document:u.default},userland:s})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,6622],()=>r(92982));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/su/users/new.js.nft.json b/dsql-app/.local_dist/server/pages/su/users/new.js.nft.json index 54c0808..b068359 100644 --- a/dsql-app/.local_dist/server/pages/su/users/new.js.nft.json +++ b/dsql-app/.local_dist/server/pages/su/users/new.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1614.js","../../../chunks/2414.js","../../../chunks/2451.js","../../../chunks/2996.js","../../../chunks/3247.js","../../../chunks/3460.js","../../../chunks/3737.js","../../../chunks/3932.js","../../../chunks/4050.js","../../../chunks/4312.js","../../../chunks/4333.js","../../../chunks/4385.js","../../../chunks/45.js","../../../chunks/5134.js","../../../chunks/5212.js","../../../chunks/5264.js","../../../chunks/5421.js","../../../chunks/5664.js","../../../chunks/5674.js","../../../chunks/6521.js","../../../chunks/7070.js","../../../chunks/7640.js","../../../chunks/8540.js","../../../chunks/8613.js","../../../chunks/883.js","../../../chunks/8842.js","../../../chunks/9600.js","../../../chunks/9621.js","../../../chunks/9732.js","../../../chunks/9821.js","../../../chunks/9914.js","../../../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../../../node_modules/@moduletrace/datasquirel/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../../../node_modules/next/dist/shared/lib/head.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/side-effect.js","../../../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../../../node_modules/next/head.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.min.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/scheduler/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1251.js","../../../chunks/1579.js","../../../chunks/194.js","../../../chunks/2282.js","../../../chunks/3155.js","../../../chunks/3474.js","../../../chunks/3496.js","../../../chunks/3634.js","../../../chunks/3704.js","../../../chunks/3791.js","../../../chunks/4627.js","../../../chunks/5392.js","../../../chunks/5839.js","../../../chunks/5954.js","../../../chunks/6160.js","../../../chunks/6202.js","../../../chunks/6521.js","../../../chunks/6622.js","../../../chunks/6903.js","../../../chunks/725.js","../../../chunks/7713.js","../../../chunks/8704.js","../../../chunks/8760.js","../../../chunks/883.js","../../../chunks/9796.js","../../../chunks/9821.js","../../../chunks/9901.js","../../../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/terms.html b/dsql-app/.local_dist/server/pages/terms.html index 4bea594..b0bb177 100644 --- a/dsql-app/.local_dist/server/pages/terms.html +++ b/dsql-app/.local_dist/server/pages/terms.html @@ -1 +1 @@ -Terms and Conditions | Datasquirel

Terms and Conditions

Welcome to datasquirel.com!
Dotted image background

These terms and conditions outline the rules and regulations for the use of Datasquirel's Website, located at https://datasquirel.com.

By accessing this website we assume you accept these terms and conditions. Do not continue to use datasquirel.com if you do not agree to take all of the terms and conditions stated on this page.

The following terminology applies to these Terms and Conditions, Privacy Statement and Disclaimer Notice and all Agreements: "Client", "You" and "Your" refers to you, the person log on this website and compliant to the Company’s terms and conditions. "The Company", "Ourselves", "We", "Our" and "Us", refers to our Company. "Party", "Parties", or "Us", refers to both the Client and ourselves. All terms refer to the offer, acceptance and consideration of payment necessary to undertake the process of our assistance to the Client in the most appropriate manner for the express purpose of meeting the Client’s needs in respect of provision of the Company’s stated services, in accordance with and subject to, prevailing law of Netherlands. Any use of the above terminology or other words in the singular, plural, capitalization and/or he/she or they, are taken as interchangeable and therefore as referring to same.

Cookies

We employ the use of cookies. By accessing datasquirel.com, you agreed to use cookies in agreement with the Datasquirel's Privacy Policy.

Most interactive websites use cookies to let us retrieve the user’s details for each visit. Cookies are used by our website to enable the functionality of certain areas to make it easier for people visiting our website. Some of our affiliate/advertising partners may also use cookies.

License

Unless otherwise stated, Datasquirel and/or its licensors own the intellectual property rights for all material on datasquirel.com. All intellectual property rights are reserved. You may access this from datasquirel.com for your own personal use subjected to restrictions set in these terms and conditions.

You must not:

  • Republish material from datasquirel.com
  • Sell, rent or sub-license material from datasquirel.com
  • Reproduce, duplicate or copy material from datasquirel.com
  • Redistribute content from datasquirel.com

This Agreement shall begin on the date hereof.

Parts of this website offer an opportunity for users to post and exchange opinions and information in certain areas of the website. Datasquirel does not filter, edit, publish or review Comments prior to their presence on the website. Comments do not reflect the views and opinions of Datasquirel,its agents and/or affiliates. Comments reflect the views and opinions of the person who post their views and opinions. To the extent permitted by applicable laws, Datasquirel shall not be liable for the Comments or for any liability, damages or expenses caused and/or suffered as a result of any use of and/or posting of and/or appearance of the Comments on this website.

Datasquirel reserves the right to monitor all Comments and to remove any Comments which can be considered inappropriate, offensive or causes breach of these Terms and Conditions.

You warrant and represent that:

  • You are entitled to post the Comments on our website and have all necessary licenses and consents to do so;
  • The Comments do not invade any intellectual property right, including without limitation copyright, patent or trademark of any third party;
  • The Comments do not contain any defamatory, libelous, offensive, indecent or otherwise unlawful material which is an invasion of privacy
  • The Comments will not be used to solicit or promote business or custom or present commercial activities or unlawful activity.

You hereby grant Datasquirel a non-exclusive license to use, reproduce, edit and authorize others to use, reproduce and edit any of your Comments in any and all forms, formats or media.

Hyperlinking to our Content

The following organizations may link to our Website without prior written approval:

  • Government agencies;
  • Search engines;
  • News organizations;
  • Online directory distributors may link to our Website in the same manner as they hyperlink to the Websites of other listed businesses; and
  • System wide Accredited Businesses except soliciting non-profit organizations, charity shopping malls, and charity fundraising groups which may not hyperlink to our Web site.

These organizations may link to our home page, to publications or to other Website information so long as the link: (a) is not in any way deceptive; (b) does not falsely imply sponsorship, endorsement or approval of the linking party and its products and/or services; and (c) fits within the context of the linking party’s site.

We may consider and approve other link requests from the following types of organizations:

  • commonly-known consumer and/or business information sources;
  • dot.com community sites;
  • associations or other groups representing charities;
  • online directory distributors;
  • internet portals;
  • accounting, law and consulting firms; and
  • educational institutions and trade associations.

We will approve link requests from these organizations if we decide that: (a) the link would not make us look unfavorably to ourselves or to our accredited businesses; (b) the organization does not have any negative records with us; (c) the benefit to us from the visibility of the hyperlink compensates the absence of Datasquirel; and (d) the link is in the context of general resource information.

These organizations may link to our home page so long as the link: (a) is not in any way deceptive; (b) does not falsely imply sponsorship, endorsement or approval of the linking party and its products or services; and (c) fits within the context of the linking party’s site.

If you are one of the organizations listed in paragraph 2 above and are interested in linking to our website, you must inform us by sending an e-mail to Datasquirel. Please include your name, your organization name, contact information as well as the URL of your site, a list of any URLs from which you intend to link to our Website, and a list of the URLs on our site to which you would like to link. Wait 2-3 weeks for a response.

Approved organizations may hyperlink to our Website as follows:

  • By use of our corporate name; or
  • By use of the uniform resource locator being linked to; or
  • By use of any other description of our Website being linked to that makes sense within the context and format of content on the linking party’s site.

No use of Datasquirel's logo or other artwork will be allowed for linking absent a trademark license agreement.

iFrames

Without prior approval and written permission, you may not create frames around our Webpages that alter in any way the visual presentation or appearance of our Website.

Content Liability

We shall not be hold responsible for any content that appears on your Website. You agree to protect and defend us against all claims that is rising on your Website. No link(s) should appear on any Website that may be interpreted as libelous, obscene or criminal, or which infringes, otherwise violates, or advocates the infringement or other violation of, any third party rights.

Your Privacy

Please read Privacy Policy

Reservation of Rights

We reserve the right to request that you remove all links or any particular link to our Website. You approve to immediately remove all links to our Website upon request. We also reserve the right to amen these terms and conditions and it’s linking policy at any time. By continuously linking to our Website, you agree to be bound to and follow these linking terms and conditions.

Removal of links from our website

If you find any link on our Website that is offensive for any reason, you are free to contact and inform us any moment. We will consider requests to remove links but we are not obligated to or so or to respond to you directly.

We do not ensure that the information on this website is correct, we do not warrant its completeness or accuracy; nor do we promise to ensure that the website remains available or that the material on the website is kept up to date.

Disclaimer

To the maximum extent permitted by applicable law, we exclude all representations, warranties and conditions relating to our website and the use of this website. Nothing in this disclaimer will:

  • limit or exclude our or your liability for death or personal injury;
  • limit or exclude our or your liability for fraud or fraudulent misrepresentation;
  • limit any of our or your liabilities in any way that is not permitted under applicable law; or
  • exclude any of our or your liabilities that may not be excluded under applicable law.

The limitations and prohibitions of liability set in this Section and elsewhere in this disclaimer: (a) are subject to the preceding paragraph; and (b) govern all liabilities arising under the disclaimer, including liabilities arising in contract, in tort and for breach of statutory duty.

As long as the website and the information and services on the website are provided free of charge, we will not be liable for any loss or damage of any nature.

\ No newline at end of file +Terms and Conditions | Datasquirel

Terms and Conditions

Welcome to datasquirel.com!
Dotted image background

These terms and conditions outline the rules and regulations for the use of Datasquirel's Website, located at https://datasquirel.com.

By accessing this website we assume you accept these terms and conditions. Do not continue to use datasquirel.com if you do not agree to take all of the terms and conditions stated on this page.

The following terminology applies to these Terms and Conditions, Privacy Statement and Disclaimer Notice and all Agreements: "Client", "You" and "Your" refers to you, the person log on this website and compliant to the Company’s terms and conditions. "The Company", "Ourselves", "We", "Our" and "Us", refers to our Company. "Party", "Parties", or "Us", refers to both the Client and ourselves. All terms refer to the offer, acceptance and consideration of payment necessary to undertake the process of our assistance to the Client in the most appropriate manner for the express purpose of meeting the Client’s needs in respect of provision of the Company’s stated services, in accordance with and subject to, prevailing law of Netherlands. Any use of the above terminology or other words in the singular, plural, capitalization and/or he/she or they, are taken as interchangeable and therefore as referring to same.

Cookies

We employ the use of cookies. By accessing datasquirel.com, you agreed to use cookies in agreement with the Datasquirel's Privacy Policy.

Most interactive websites use cookies to let us retrieve the user’s details for each visit. Cookies are used by our website to enable the functionality of certain areas to make it easier for people visiting our website. Some of our affiliate/advertising partners may also use cookies.

License

Unless otherwise stated, Datasquirel and/or its licensors own the intellectual property rights for all material on datasquirel.com. All intellectual property rights are reserved. You may access this from datasquirel.com for your own personal use subjected to restrictions set in these terms and conditions.

You must not:

  • Republish material from datasquirel.com
  • Sell, rent or sub-license material from datasquirel.com
  • Reproduce, duplicate or copy material from datasquirel.com
  • Redistribute content from datasquirel.com

This Agreement shall begin on the date hereof.

Parts of this website offer an opportunity for users to post and exchange opinions and information in certain areas of the website. Datasquirel does not filter, edit, publish or review Comments prior to their presence on the website. Comments do not reflect the views and opinions of Datasquirel,its agents and/or affiliates. Comments reflect the views and opinions of the person who post their views and opinions. To the extent permitted by applicable laws, Datasquirel shall not be liable for the Comments or for any liability, damages or expenses caused and/or suffered as a result of any use of and/or posting of and/or appearance of the Comments on this website.

Datasquirel reserves the right to monitor all Comments and to remove any Comments which can be considered inappropriate, offensive or causes breach of these Terms and Conditions.

You warrant and represent that:

  • You are entitled to post the Comments on our website and have all necessary licenses and consents to do so;
  • The Comments do not invade any intellectual property right, including without limitation copyright, patent or trademark of any third party;
  • The Comments do not contain any defamatory, libelous, offensive, indecent or otherwise unlawful material which is an invasion of privacy
  • The Comments will not be used to solicit or promote business or custom or present commercial activities or unlawful activity.

You hereby grant Datasquirel a non-exclusive license to use, reproduce, edit and authorize others to use, reproduce and edit any of your Comments in any and all forms, formats or media.

Hyperlinking to our Content

The following organizations may link to our Website without prior written approval:

  • Government agencies;
  • Search engines;
  • News organizations;
  • Online directory distributors may link to our Website in the same manner as they hyperlink to the Websites of other listed businesses; and
  • System wide Accredited Businesses except soliciting non-profit organizations, charity shopping malls, and charity fundraising groups which may not hyperlink to our Web site.

These organizations may link to our home page, to publications or to other Website information so long as the link: (a) is not in any way deceptive; (b) does not falsely imply sponsorship, endorsement or approval of the linking party and its products and/or services; and (c) fits within the context of the linking party’s site.

We may consider and approve other link requests from the following types of organizations:

  • commonly-known consumer and/or business information sources;
  • dot.com community sites;
  • associations or other groups representing charities;
  • online directory distributors;
  • internet portals;
  • accounting, law and consulting firms; and
  • educational institutions and trade associations.

We will approve link requests from these organizations if we decide that: (a) the link would not make us look unfavorably to ourselves or to our accredited businesses; (b) the organization does not have any negative records with us; (c) the benefit to us from the visibility of the hyperlink compensates the absence of Datasquirel; and (d) the link is in the context of general resource information.

These organizations may link to our home page so long as the link: (a) is not in any way deceptive; (b) does not falsely imply sponsorship, endorsement or approval of the linking party and its products or services; and (c) fits within the context of the linking party’s site.

If you are one of the organizations listed in paragraph 2 above and are interested in linking to our website, you must inform us by sending an e-mail to Datasquirel. Please include your name, your organization name, contact information as well as the URL of your site, a list of any URLs from which you intend to link to our Website, and a list of the URLs on our site to which you would like to link. Wait 2-3 weeks for a response.

Approved organizations may hyperlink to our Website as follows:

  • By use of our corporate name; or
  • By use of the uniform resource locator being linked to; or
  • By use of any other description of our Website being linked to that makes sense within the context and format of content on the linking party’s site.

No use of Datasquirel's logo or other artwork will be allowed for linking absent a trademark license agreement.

iFrames

Without prior approval and written permission, you may not create frames around our Webpages that alter in any way the visual presentation or appearance of our Website.

Content Liability

We shall not be hold responsible for any content that appears on your Website. You agree to protect and defend us against all claims that is rising on your Website. No link(s) should appear on any Website that may be interpreted as libelous, obscene or criminal, or which infringes, otherwise violates, or advocates the infringement or other violation of, any third party rights.

Your Privacy

Please read Privacy Policy

Reservation of Rights

We reserve the right to request that you remove all links or any particular link to our Website. You approve to immediately remove all links to our Website upon request. We also reserve the right to amen these terms and conditions and it’s linking policy at any time. By continuously linking to our Website, you agree to be bound to and follow these linking terms and conditions.

Removal of links from our website

If you find any link on our Website that is offensive for any reason, you are free to contact and inform us any moment. We will consider requests to remove links but we are not obligated to or so or to respond to you directly.

We do not ensure that the information on this website is correct, we do not warrant its completeness or accuracy; nor do we promise to ensure that the website remains available or that the material on the website is kept up to date.

Disclaimer

To the maximum extent permitted by applicable law, we exclude all representations, warranties and conditions relating to our website and the use of this website. Nothing in this disclaimer will:

  • limit or exclude our or your liability for death or personal injury;
  • limit or exclude our or your liability for fraud or fraudulent misrepresentation;
  • limit any of our or your liabilities in any way that is not permitted under applicable law; or
  • exclude any of our or your liabilities that may not be excluded under applicable law.

The limitations and prohibitions of liability set in this Section and elsewhere in this disclaimer: (a) are subject to the preceding paragraph; and (b) govern all liabilities arising under the disclaimer, including liabilities arising in contract, in tort and for breach of statutory duty.

As long as the website and the information and services on the website are provided free of charge, we will not be liable for any loss or damage of any nature.

\ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/terms.js.nft.json b/dsql-app/.local_dist/server/pages/terms.js.nft.json index b0e24b8..4d801bf 100644 --- a/dsql-app/.local_dist/server/pages/terms.js.nft.json +++ b/dsql-app/.local_dist/server/pages/terms.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9600.js","../../../package.json"]} \ No newline at end of file +{"version":1,"files":["../webpack-runtime.js","../chunks/883.js","../chunks/9821.js","../chunks/9796.js","../../../package.json"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/unsubscribe.js b/dsql-app/.local_dist/server/pages/unsubscribe.js index 07ac43e..192b5c2 100644 --- a/dsql-app/.local_dist/server/pages/unsubscribe.js +++ b/dsql-app/.local_dist/server/pages/unsubscribe.js @@ -1 +1 @@ -"use strict";(()=>{var e={};e.id=3751,e.ids=[3220,3751],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},76048:(e,t,s)=>{s.r(t),s.d(t,{config:()=>D,default:()=>v,getServerSideProps:()=>y,getStaticPaths:()=>P,getStaticProps:()=>j,reportWebVitals:()=>A,routeModule:()=>k,unstable_getServerProps:()=>M,unstable_getServerSideProps:()=>I,unstable_getStaticParams:()=>L,unstable_getStaticPaths:()=>O,unstable_getStaticProps:()=>N});var r={};s.r(r),s.d(r,{default:()=>b,getServerSideProps:()=>E});var n=s(63865),a=s(9455),i=s(30671),o=s(49407),c=s(89600),l=s(8732),u=s(82015),p=s.n(u),m=s(32415),d=s(87472),_=s(20048),x=s.n(_),h=s(63715),f=s(71457),S=s(67216),g=s.n(S);function b({user:e,email:t,productionEnvironment:s,existingAlerts:r}){let n="Unsubscribe | Datasquirel",a="Unsubscribe from email alerts",i=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:n}),(0,l.jsx)("meta",{name:"description",content:a}),(0,l.jsx)(d.A,{pageTitle:n,pageDescription:a,pagePathname:"/unsubscribe"})]}),[o,c]=p().useState(!1);return(0,l.jsx)(p().Fragment,{children:(0,l.jsx)(f.A,{head:i,user:e,productionEnvironment:s,children:(0,l.jsx)("main",{children:(0,l.jsxs)("section",{children:[o&&(0,l.jsx)(m.A,{}),(0,l.jsxs)("div",{className:"flex-col",children:[(0,l.jsx)("h1",{className:"text-2xl",children:"Unsubscribe from Email alerts"}),!t&&(0,l.jsxs)("p",{className:"max-w-md",children:["No email please ",(0,l.jsx)("a",{href:"/login",children:"Login"})," ","to Access Email Subscriptions or click on"," ",(0,l.jsx)("i",{children:'"unsubscribe"'})," from your mail box"]}),t&&(0,l.jsxs)("form",{className:"flex flex-col items-start gap-4",onSubmit:s=>{s.preventDefault(),c(!0);let r=s.target;(0,h.A)("/api/unsubscribe",{method:"post",body:{email:t,alerts:r.alerts_checkbox.checked,userId:e?.id?e.id:null}}).then(e=>{console.log(e),c(!1)})},children:[(0,l.jsx)("span",{className:"bg-slate-100 py-1 px-3 rounded-full",children:t}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)("input",{type:"checkbox",name:"alerts_checkbox",id:"alerts_checkbox",defaultChecked:!!r,className:"w-6 h-6"}),(0,l.jsx)("label",{htmlFor:"alerts_checkbox",className:"text-base whitespace-nowrap text-slate-800",children:"Alerts"})]}),(0,l.jsx)("button",{children:"Save Settings"})]})]})]})})})})}async function E({req:e,res:t,query:s}){let r=process.env.DSQL_HOST_ENV,n=await x()(e,t),a=s.email?s.email:n?.email?n.email:null,i=await g()(`SELECT email FROM unsubscribes WHERE email='${a}' AND type='alerts'`);return{props:{user:n,email:a,productionEnvironment:r,existingAlerts:!i[0]}}}let v=(0,i.M)(r,"default"),j=(0,i.M)(r,"getStaticProps"),P=(0,i.M)(r,"getStaticPaths"),y=(0,i.M)(r,"getServerSideProps"),D=(0,i.M)(r,"config"),A=(0,i.M)(r,"reportWebVitals"),N=(0,i.M)(r,"unstable_getStaticProps"),O=(0,i.M)(r,"unstable_getStaticPaths"),L=(0,i.M)(r,"unstable_getStaticParams"),M=(0,i.M)(r,"unstable_getServerProps"),I=(0,i.M)(r,"unstable_getServerSideProps"),k=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/unsubscribe",pathname:"/unsubscribe",bundlePath:"",filename:""},components:{App:c.default,Document:o.default},userland:r})},20048:(e,t,s)=>{s(81630);let r=s(67216),n=s(77463),a=s(29021),i=s(6505);async function o(e,t,s,o){let{keyCookieName:c,csrfCookieName:l}=i();if(!e.cookies?.[c]?.match(/./))return null;let u=n({encryptedString:e.cookies[c]});if(!u)return null;let p=JSON.parse(u);if(!p.csrf_k||s&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))return null;let m=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!m)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(s&&!a.existsSync(`${m}/${p.csrf_k}`))return null;if(0==p.verification_status&&!s){let e=await r(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return p?.date&&Date.now()-p.date>6048e5?null:p}e.exports=o},6505:e=>{e.exports=function(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",r=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=s;let o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=r;let c=t;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:c+=n}}},77463:(e,t,s)=>{let{scryptSync:r,createDecipheriv:n}=s(55511),{Buffer:a}=s(79428);e.exports=({encryptedString:e,encryptionKey:t,encryptionSalt:s})=>{if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let i=t||process.env.DSQL_ENCRYPTION_PASSWORD,o=s||process.env.DSQL_ENCRYPTION_SALT,c=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!o?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let l=n("aes-192-cbc",r(i,o,c),a.alloc(16,0));try{let t=l.update(e,"hex","utf8");return t+=l.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},67216:(e,t,s)=>{let r=s(9973),n=s(31976),a=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let t=await a.query(...e);return await a.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},31976:(e,t,s)=>{let r=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!r.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},49407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(8732);s(82015);var n=s(20883);function a(e){return(0,r.jsxs)(n.Html,{lang:"en",children:[(0,r.jsxs)(n.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(n.Main,{}),(0,r.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},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")}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9600],()=>s(76048));module.exports=r})(); \ No newline at end of file +"use strict";(()=>{var e={};e.id=3751,e.ids=[3220,3751],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},41531:(e,t,r)=>{r.r(t),r.d(t,{config:()=>E,default:()=>S,getServerSideProps:()=>P,getStaticPaths:()=>y,getStaticProps:()=>b,reportWebVitals:()=>v,routeModule:()=>M,unstable_getServerProps:()=>O,unstable_getServerSideProps:()=>I,unstable_getStaticParams:()=>D,unstable_getStaticPaths:()=>N,unstable_getStaticProps:()=>A});var s={};r.r(s),r.d(s,{default:()=>_,getServerSideProps:()=>j});var n=r(63865),a=r(9455),i=r(30671),o=r(5583),c=r(19796),l=r(8732),u=r(82015),p=r.n(u),m=r(16757),d=r(91258),x=r(92702),h=r(46169),f=r(1013),g=r(71934);function _({user:e,email:t,productionEnvironment:r,existingAlerts:s}){let n="Unsubscribe | Datasquirel",a="Unsubscribe from email alerts",i=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:n}),(0,l.jsx)("meta",{name:"description",content:a}),(0,l.jsx)(d.A,{pageTitle:n,pageDescription:a,pagePathname:"/unsubscribe"})]}),[o,c]=p().useState(!1);return(0,l.jsx)(p().Fragment,{children:(0,l.jsx)(f.A,{head:i,user:e,productionEnvironment:r,children:(0,l.jsx)("main",{children:(0,l.jsxs)("section",{children:[o&&(0,l.jsx)(m.A,{}),(0,l.jsxs)("div",{className:"flex-col",children:[(0,l.jsx)("h1",{className:"text-2xl",children:"Unsubscribe from Email alerts"}),!t&&(0,l.jsxs)("p",{className:"max-w-md",children:["No email please ",(0,l.jsx)("a",{href:"/login",children:"Login"})," ","to Access Email Subscriptions or click on"," ",(0,l.jsx)("i",{children:'"unsubscribe"'})," from your mail box"]}),t&&(0,l.jsxs)("form",{className:"flex flex-col items-start gap-4",onSubmit:r=>{r.preventDefault(),c(!0);let s=r.target;(0,h.A)("/api/unsubscribe",{method:"post",body:{email:t,alerts:s.alerts_checkbox.checked,userId:e?.id?e.id:null}}).then(e=>{console.log(e),c(!1)})},children:[(0,l.jsx)("span",{className:"bg-slate-100 py-1 px-3 rounded-full",children:t}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)("input",{type:"checkbox",name:"alerts_checkbox",id:"alerts_checkbox",defaultChecked:!!s,className:"w-6 h-6"}),(0,l.jsx)("label",{htmlFor:"alerts_checkbox",className:"text-base whitespace-nowrap text-slate-800",children:"Alerts"})]}),(0,l.jsx)("button",{children:"Save Settings"})]})]})]})})})})}async function j({req:e,res:t,query:r}){let s=process.env.DSQL_HOST_ENV,n=await (0,x.default)(e,t),a=r.email?r.email:n?.email?n.email:null,i=await (0,g.A)(`SELECT email FROM unsubscribes WHERE email='${a}' AND type='alerts'`);return{props:{user:n,email:a,productionEnvironment:s,existingAlerts:!i[0]}}}let S=(0,i.M)(s,"default"),b=(0,i.M)(s,"getStaticProps"),y=(0,i.M)(s,"getStaticPaths"),P=(0,i.M)(s,"getServerSideProps"),E=(0,i.M)(s,"config"),v=(0,i.M)(s,"reportWebVitals"),A=(0,i.M)(s,"unstable_getStaticProps"),N=(0,i.M)(s,"unstable_getStaticPaths"),D=(0,i.M)(s,"unstable_getStaticParams"),O=(0,i.M)(s,"unstable_getServerProps"),I=(0,i.M)(s,"unstable_getServerSideProps"),M=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/unsubscribe",pathname:"/unsubscribe",bundlePath:"",filename:""},components:{App:c.default,Document:o.default},userland:s})},91258:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(8732),n=r(82015),a=r.n(n);function i({pageTitle:e,pageDescription:t,pagePathname:r,aceEditor:n}){return(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:title",content:e}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{itemProp:"name",content:e}),(0,s.jsx)("meta",{itemProp:"description",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:e}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),n&&(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},92702:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var s=r(71934),n=r(71205),a=r(29021),i=r.n(a),o=r(41939);async function c(e,t,r){let{keyCookieName:a,csrfCookieName:c}=(0,o.A)();if(!e.cookies?.[a]?.match(/./))return null;let l=(0,n.A)({encryptedString:e.cookies[a]});if(!l)return null;let u=JSON.parse(l);if(!u.csrf_k||r&&!Object.keys(e.headers).find(e=>e.includes(u.csrf_k)))return null;let p=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)return console.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(r&&!i().existsSync(`${p}/${u.csrf_k}`))return null;if(0==u.verification_status&&!r){let e=await (0,s.A)(`SELECT verification_status FROM users WHERE id='${u.id}'`);e&&e[0]&&1==e[0].verification_status&&t.setHeader("Set-Cookie",["user_refresh=1"])}return u?.date&&Date.now()-u.date>6048e5?null:u}},41939:(e,t,r)=>{r.d(t,{A:()=>s});function s(e){let t=process.env.DSQL_COOKIES_PREFIX||"dsql_",r=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),i=t;e?.userId&&(i+=`user_${e.userId}_`),a&&(i+=`${a}_`),i+=r;let o=t;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=s;let c=t;return e?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:i,csrfCookieName:o,oneTimeCodeName:c+=n}}},71205:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(55511),n=r(79428);function a({encryptedString:e,encryptionKey:t,encryptionSalt:r}){if(!e?.match(/./))return console.log("Encrypted string is invalid"),e;let a=t||process.env.DSQL_ENCRYPTION_PASSWORD,i=r||process.env.DSQL_ENCRYPTION_SALT,o=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))return console.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))return console.log("Decrption salt is invalid"),e;let c=(0,s.scryptSync)(a,i,o),l=n.Buffer.alloc(16,0),u=(0,s.createDecipheriv)("aes-192-cbc",c,l);try{let t=u.update(e,"hex","utf8");return t+=u.final("utf8")}catch(t){return console.log("Error in decrypting =>",t.message),e}}},71934:(e,t,r)=>{r.d(t,{A:()=>s});async function s(...e){let t=global.DSQL_DB_CONN;try{if(!t)throw Error("No Connection provided to DB_HANDLER function!");let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}finally{await t?.end()}}},5583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(8732);r(82015);var n=r(20883);function a(){return(0,s.jsxs)(n.Html,{lang:"en",children:[(0,s.jsxs)(n.Head,{children:[(0,s.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,s.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,s.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,s.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,s.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,s.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,s.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,s.jsx)("meta",{property:"og:type",content:"website"}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,s.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,s.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,s.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,s.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,s.jsxs)("body",{children:[(0,s.jsx)(n.Main,{}),(0,s.jsx)(n.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}});var r=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796],()=>r(41531));module.exports=s})(); \ No newline at end of file diff --git a/dsql-app/.local_dist/server/pages/unsubscribe.js.nft.json b/dsql-app/.local_dist/server/pages/unsubscribe.js.nft.json index 679446f..bf812fc 100644 --- a/dsql-app/.local_dist/server/pages/unsubscribe.js.nft.json +++ b/dsql-app/.local_dist/server/pages/unsubscribe.js.nft.json @@ -1 +1 @@ -{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/core-util-is/lib/util.js","../../../node_modules/core-util-is/package.json","../../../node_modules/inherits/inherits.js","../../../node_modules/inherits/inherits_browser.js","../../../node_modules/inherits/package.json","../../../node_modules/isarray/index.js","../../../node_modules/isarray/package.json","../../../node_modules/mysql/index.js","../../../node_modules/mysql/lib/Connection.js","../../../node_modules/mysql/lib/ConnectionConfig.js","../../../node_modules/mysql/lib/Pool.js","../../../node_modules/mysql/lib/PoolCluster.js","../../../node_modules/mysql/lib/PoolConfig.js","../../../node_modules/mysql/lib/PoolConnection.js","../../../node_modules/mysql/lib/PoolNamespace.js","../../../node_modules/mysql/lib/PoolSelector.js","../../../node_modules/mysql/lib/protocol/Auth.js","../../../node_modules/mysql/lib/protocol/BufferList.js","../../../node_modules/mysql/lib/protocol/PacketHeader.js","../../../node_modules/mysql/lib/protocol/PacketWriter.js","../../../node_modules/mysql/lib/protocol/Parser.js","../../../node_modules/mysql/lib/protocol/Protocol.js","../../../node_modules/mysql/lib/protocol/ResultSet.js","../../../node_modules/mysql/lib/protocol/SqlString.js","../../../node_modules/mysql/lib/protocol/Timer.js","../../../node_modules/mysql/lib/protocol/constants/charsets.js","../../../node_modules/mysql/lib/protocol/constants/client.js","../../../node_modules/mysql/lib/protocol/constants/errors.js","../../../node_modules/mysql/lib/protocol/constants/server_status.js","../../../node_modules/mysql/lib/protocol/constants/ssl_profiles.js","../../../node_modules/mysql/lib/protocol/constants/types.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/AuthSwitchResponsePacket.js","../../../node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComPingPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQueryPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComQuitPacket.js","../../../node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/EmptyPacket.js","../../../node_modules/mysql/lib/protocol/packets/EofPacket.js","../../../node_modules/mysql/lib/protocol/packets/ErrorPacket.js","../../../node_modules/mysql/lib/protocol/packets/Field.js","../../../node_modules/mysql/lib/protocol/packets/FieldPacket.js","../../../node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js","../../../node_modules/mysql/lib/protocol/packets/LocalInfileRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/OkPacket.js","../../../node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js","../../../node_modules/mysql/lib/protocol/packets/RowDataPacket.js","../../../node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js","../../../node_modules/mysql/lib/protocol/packets/StatisticsPacket.js","../../../node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js","../../../node_modules/mysql/lib/protocol/packets/index.js","../../../node_modules/mysql/lib/protocol/sequences/ChangeUser.js","../../../node_modules/mysql/lib/protocol/sequences/Handshake.js","../../../node_modules/mysql/lib/protocol/sequences/Ping.js","../../../node_modules/mysql/lib/protocol/sequences/Query.js","../../../node_modules/mysql/lib/protocol/sequences/Quit.js","../../../node_modules/mysql/lib/protocol/sequences/Sequence.js","../../../node_modules/mysql/lib/protocol/sequences/Statistics.js","../../../node_modules/mysql/lib/protocol/sequences/index.js","../../../node_modules/mysql/node_modules/bignumber.js/bignumber.js","../../../node_modules/mysql/node_modules/bignumber.js/package.json","../../../node_modules/mysql/node_modules/safe-buffer/index.js","../../../node_modules/mysql/node_modules/safe-buffer/package.json","../../../node_modules/mysql/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/process-nextick-args/index.js","../../../node_modules/process-nextick-args/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/readable-stream/lib/internal/streams/BufferList.js","../../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/readable-stream/lib/internal/streams/stream.js","../../../node_modules/readable-stream/node_modules/safe-buffer/index.js","../../../node_modules/readable-stream/node_modules/safe-buffer/package.json","../../../node_modules/readable-stream/package.json","../../../node_modules/readable-stream/readable.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/serverless-mysql/index.js","../../../node_modules/serverless-mysql/package.json","../../../node_modules/sqlstring/index.js","../../../node_modules/sqlstring/lib/SqlString.js","../../../node_modules/sqlstring/package.json","../../../node_modules/string_decoder/lib/string_decoder.js","../../../node_modules/string_decoder/node_modules/safe-buffer/index.js","../../../node_modules/string_decoder/node_modules/safe-buffer/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/util-deprecate/node.js","../../../node_modules/util-deprecate/package.json","../../../package.json","../../package.json","../chunks/1614.js","../chunks/2414.js","../chunks/2451.js","../chunks/2996.js","../chunks/3247.js","../chunks/3460.js","../chunks/3737.js","../chunks/3932.js","../chunks/4050.js","../chunks/4312.js","../chunks/4333.js","../chunks/4385.js","../chunks/45.js","../chunks/5134.js","../chunks/5212.js","../chunks/5264.js","../chunks/5421.js","../chunks/5664.js","../chunks/5674.js","../chunks/6521.js","../chunks/7070.js","../chunks/7640.js","../chunks/8540.js","../chunks/8613.js","../chunks/883.js","../chunks/8842.js","../chunks/9600.js","../chunks/9621.js","../chunks/9732.js","../chunks/9821.js","../chunks/9914.js","../webpack-runtime.js"]} \ No newline at end of file +{"version":1,"files":["../../../node_modules/@moduletrace/datasquirel/dist/client/fetch/index.js","../../../node_modules/@moduletrace/datasquirel/package.json","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/lodash/lodash.js","../../../node_modules/lodash/package.json","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/head.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/1251.js","../chunks/1579.js","../chunks/194.js","../chunks/2282.js","../chunks/3155.js","../chunks/3474.js","../chunks/3496.js","../chunks/3634.js","../chunks/3704.js","../chunks/3791.js","../chunks/4627.js","../chunks/5392.js","../chunks/5839.js","../chunks/5954.js","../chunks/6160.js","../chunks/6202.js","../chunks/6521.js","../chunks/6622.js","../chunks/6903.js","../chunks/725.js","../chunks/7713.js","../chunks/8704.js","../chunks/8760.js","../chunks/883.js","../chunks/9796.js","../chunks/9821.js","../chunks/9901.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/dsql-app/.local_dist/server/vendor-chunks/lucide-react.js b/dsql-app/.local_dist/server/vendor-chunks/lucide-react.js deleted file mode 100644 index 79d0222..0000000 --- a/dsql-app/.local_dist/server/vendor-chunks/lucide-react.js +++ /dev/null @@ -1,385 +0,0 @@ -"use strict"; -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -exports.id = "vendor-chunks/lucide-react"; -exports.ids = ["vendor-chunks/lucide-react"]; -exports.modules = { - -/***/ "./node_modules/lucide-react/dist/esm/createLucideIcon.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/createLucideIcon.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ createLucideIcon)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _defaultAttributes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultAttributes.js */ \"./node_modules/lucide-react/dist/esm/defaultAttributes.js\");\n/* harmony import */ var _shared_src_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/src/utils.js */ \"./node_modules/lucide-react/dist/esm/shared/src/utils.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \n\n\nconst createLucideIcon = (iconName, iconNode)=>{\n const Component = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({ color = \"currentColor\", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = \"\", children, ...rest }, ref)=>{\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(\"svg\", {\n ref,\n ..._defaultAttributes_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: [\n \"lucide\",\n `lucide-${(0,_shared_src_utils_js__WEBPACK_IMPORTED_MODULE_2__.toKebabCase)(iconName)}`,\n className\n ].join(\" \"),\n ...rest\n }, [\n ...iconNode.map(([tag, attrs])=>/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(tag, attrs)),\n ...Array.isArray(children) ? children : [\n children\n ]\n ]);\n });\n Component.displayName = `${iconName}`;\n return Component;\n};\n //# sourceMappingURL=createLucideIcon.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2NyZWF0ZUx1Y2lkZUljb24uanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQXVCTSx1QkFBbUIsR0FBQyxVQUFrQixRQUFtQztJQUM3RSxNQUFNLENBQVksNEVBRWQsRUFDRSxLQUFRLG1CQUNSLElBQU8sT0FDUCxXQUFjLE1BQ2QscUJBQ0EsU0FBWSxPQUNaLFVBQ0EsR0FBRyxRQUVMLEdBQ0c7UUFDSSwyRUFDTCxNQUNBO1lBQ0U7WUFDQSxHQUFHO1lBQ0gsS0FBTztZQUNQLE1BQVE7WUFDUixNQUFRO1lBQ1IsWUFBYSxxQkFDUixRQUFPLEVBQVcsWUFBSSxJQUFNLFVBQU8sQ0FBSSxJQUN4QztZQUNKLFdBQVc7Z0JBQUM7Z0JBQVUsQ0FBVSwyRUFBWSxRQUFRLENBQUMsQ0FBSTtnQkFBQSxTQUFTO2FBQUUsTUFBSyxHQUFHO1lBQzVFLEdBQUc7UUFDTCxHQUNBO2VBQ0ssQ0FBUyxZQUFJLENBQUMsQ0FBQyxDQUFLLEtBQUssS0FBTSxzRUFBYyxHQUFLLE9BQUssQ0FBQztlQUN2RCxLQUFNLFNBQVEsUUFBUSxDQUFJLGNBQVc7Z0JBQUMsUUFBUTthQUFBO1NBQ3BEO0lBRUo7SUFHUSx3QkFBYyxFQUFHLFNBQVE7SUFFNUI7QUFDVCIsInNvdXJjZXMiOlsiL3NyYy9jcmVhdGVMdWNpZGVJY29uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIGZvcndhcmRSZWYsXG4gIGNyZWF0ZUVsZW1lbnQsXG4gIFJlYWN0U1ZHLFxuICBTVkdQcm9wcyxcbiAgRm9yd2FyZFJlZkV4b3RpY0NvbXBvbmVudCxcbiAgUmVmQXR0cmlidXRlcyxcbn0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IGRlZmF1bHRBdHRyaWJ1dGVzIGZyb20gJy4vZGVmYXVsdEF0dHJpYnV0ZXMnO1xuaW1wb3J0IHsgdG9LZWJhYkNhc2UgfSBmcm9tICdAbHVjaWRlL3NoYXJlZCc7XG5cbmV4cG9ydCB0eXBlIEljb25Ob2RlID0gW2VsZW1lbnROYW1lOiBrZXlvZiBSZWFjdFNWRywgYXR0cnM6IFJlY29yZDxzdHJpbmcsIHN0cmluZz5dW107XG5cbmV4cG9ydCB0eXBlIFNWR0F0dHJpYnV0ZXMgPSBQYXJ0aWFsPFNWR1Byb3BzPFNWR1NWR0VsZW1lbnQ+PjtcbnR5cGUgQ29tcG9uZW50QXR0cmlidXRlcyA9IFJlZkF0dHJpYnV0ZXM8U1ZHU1ZHRWxlbWVudD4gJiBTVkdBdHRyaWJ1dGVzO1xuXG5leHBvcnQgaW50ZXJmYWNlIEx1Y2lkZVByb3BzIGV4dGVuZHMgQ29tcG9uZW50QXR0cmlidXRlcyB7XG4gIHNpemU/OiBzdHJpbmcgfCBudW1iZXI7XG4gIGFic29sdXRlU3Ryb2tlV2lkdGg/OiBib29sZWFuO1xufVxuXG5leHBvcnQgdHlwZSBMdWNpZGVJY29uID0gRm9yd2FyZFJlZkV4b3RpY0NvbXBvbmVudDxMdWNpZGVQcm9wcz47XG5cbmNvbnN0IGNyZWF0ZUx1Y2lkZUljb24gPSAoaWNvbk5hbWU6IHN0cmluZywgaWNvbk5vZGU6IEljb25Ob2RlKTogTHVjaWRlSWNvbiA9PiB7XG4gIGNvbnN0IENvbXBvbmVudCA9IGZvcndhcmRSZWY8U1ZHU1ZHRWxlbWVudCwgTHVjaWRlUHJvcHM+KFxuICAgIChcbiAgICAgIHtcbiAgICAgICAgY29sb3IgPSAnY3VycmVudENvbG9yJyxcbiAgICAgICAgc2l6ZSA9IDI0LFxuICAgICAgICBzdHJva2VXaWR0aCA9IDIsXG4gICAgICAgIGFic29sdXRlU3Ryb2tlV2lkdGgsXG4gICAgICAgIGNsYXNzTmFtZSA9ICcnLFxuICAgICAgICBjaGlsZHJlbixcbiAgICAgICAgLi4ucmVzdFxuICAgICAgfSxcbiAgICAgIHJlZixcbiAgICApID0+IHtcbiAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50KFxuICAgICAgICAnc3ZnJyxcbiAgICAgICAge1xuICAgICAgICAgIHJlZixcbiAgICAgICAgICAuLi5kZWZhdWx0QXR0cmlidXRlcyxcbiAgICAgICAgICB3aWR0aDogc2l6ZSxcbiAgICAgICAgICBoZWlnaHQ6IHNpemUsXG4gICAgICAgICAgc3Ryb2tlOiBjb2xvcixcbiAgICAgICAgICBzdHJva2VXaWR0aDogYWJzb2x1dGVTdHJva2VXaWR0aFxuICAgICAgICAgICAgPyAoTnVtYmVyKHN0cm9rZVdpZHRoKSAqIDI0KSAvIE51bWJlcihzaXplKVxuICAgICAgICAgICAgOiBzdHJva2VXaWR0aCxcbiAgICAgICAgICBjbGFzc05hbWU6IFsnbHVjaWRlJywgYGx1Y2lkZS0ke3RvS2ViYWJDYXNlKGljb25OYW1lKX1gLCBjbGFzc05hbWVdLmpvaW4oJyAnKSxcbiAgICAgICAgICAuLi5yZXN0LFxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgLi4uaWNvbk5vZGUubWFwKChbdGFnLCBhdHRyc10pID0+IGNyZWF0ZUVsZW1lbnQodGFnLCBhdHRycykpLFxuICAgICAgICAgIC4uLihBcnJheS5pc0FycmF5KGNoaWxkcmVuKSA/IGNoaWxkcmVuIDogW2NoaWxkcmVuXSksXG4gICAgICAgIF0sXG4gICAgICApO1xuICAgIH0sXG4gICk7XG5cbiAgQ29tcG9uZW50LmRpc3BsYXlOYW1lID0gYCR7aWNvbk5hbWV9YDtcblxuICByZXR1cm4gQ29tcG9uZW50O1xufTtcblxuZXhwb3J0IGRlZmF1bHQgY3JlYXRlTHVjaWRlSWNvbjtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/createLucideIcon.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/defaultAttributes.js": -/*!*****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/defaultAttributes.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ defaultAttributes)\n/* harmony export */ });\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ var defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n //# sourceMappingURL=defaultAttributes.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2RlZmF1bHRBdHRyaWJ1dGVzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7OztJQUFBLENBQWU7SUFDYixLQUFPO0lBQ1AsS0FBTztJQUNQLE1BQVE7SUFDUixPQUFTO0lBQ1QsSUFBTTtJQUNOLE1BQVE7SUFDUixXQUFhO0lBQ2IsYUFBZTtJQUNmLGNBQWdCO0FBQ2xCIiwic291cmNlcyI6WyIvc3JjL2RlZmF1bHRBdHRyaWJ1dGVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IHtcbiAgeG1sbnM6ICdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycsXG4gIHdpZHRoOiAyNCxcbiAgaGVpZ2h0OiAyNCxcbiAgdmlld0JveDogJzAgMCAyNCAyNCcsXG4gIGZpbGw6ICdub25lJyxcbiAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgc3Ryb2tlV2lkdGg6IDIsXG4gIHN0cm9rZUxpbmVjYXA6ICdyb3VuZCcsXG4gIHN0cm9rZUxpbmVqb2luOiAncm91bmQnLFxufTtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/defaultAttributes.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/arrow-left.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/arrow-left.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ArrowLeft)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst ArrowLeft = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"ArrowLeft\", [\n [\n \"path\",\n {\n d: \"m12 19-7-7 7-7\",\n key: \"1l729n\"\n }\n ],\n [\n \"path\",\n {\n d: \"M19 12H5\",\n key: \"x3x0zl\"\n }\n ]\n]);\n //# sourceMappingURL=arrow-left.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2Fycm93LWxlZnQuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxrQkFBWSxnRUFBZ0IsQ0FBQyxXQUFhO0lBQzlDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFrQjtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDL0M7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQVk7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQzFDIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2Fycm93LWxlZnQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBBcnJvd0xlZnRcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKdE1USWdNVGt0TnkwM0lEY3ROeUlnTHo0S0lDQThjR0YwYUNCa1BTSk5NVGtnTVRKSU5TSWdMejRLUEM5emRtYytDZz09KSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9hcnJvdy1sZWZ0XG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgQXJyb3dMZWZ0ID0gY3JlYXRlTHVjaWRlSWNvbignQXJyb3dMZWZ0JywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdtMTIgMTktNy03IDctNycsIGtleTogJzFsNzI5bicgfV0sXG4gIFsncGF0aCcsIHsgZDogJ00xOSAxMkg1Jywga2V5OiAneDN4MHpsJyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBBcnJvd0xlZnQ7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/arrow-left.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/blocks.js": -/*!************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/blocks.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Blocks)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Blocks = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Blocks\", [\n [\n \"rect\",\n {\n width: \"7\",\n height: \"7\",\n x: \"14\",\n y: \"3\",\n rx: \"1\",\n key: \"6d4xhi\"\n }\n ],\n [\n \"path\",\n {\n d: \"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3\",\n key: \"1fpvtg\"\n }\n ]\n]);\n //# sourceMappingURL=blocks.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2Jsb2Nrcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLGVBQVMsZ0VBQWdCLENBQUMsUUFBVTtJQUN4QztRQUFDLE9BQVE7UUFBQTtZQUFFLE9BQU87WUFBSyxDQUFRO1lBQUssQ0FBRztZQUFNLEdBQUcsQ0FBSztZQUFBLElBQUksQ0FBSztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDN0U7UUFDRTtRQUNBO1lBQ0UsQ0FBRztZQUNILEdBQUs7UUFDUDtLQUNGO0NBQ0QiLCJzb3VyY2VzIjpbIi9zcmMvaWNvbnMvYmxvY2tzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgQmxvY2tzXG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjbVZqZENCM2FXUjBhRDBpTnlJZ2FHVnBaMmgwUFNJM0lpQjRQU0l4TkNJZ2VUMGlNeUlnY25nOUlqRWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaVRURXdJREl4VmpoaE1TQXhJREFnTUNBd0xURXRNVWcwWVRFZ01TQXdJREFnTUMweElERjJNVEpoTVNBeElEQWdNQ0F3SURFZ01XZ3hNbUV4SURFZ01DQXdJREFnTVMweGRpMDFZVEVnTVNBd0lEQWdNQzB4TFRGSU15SWdMejRLUEM5emRtYytDZz09KSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9ibG9ja3NcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBCbG9ja3MgPSBjcmVhdGVMdWNpZGVJY29uKCdCbG9ja3MnLCBbXG4gIFsncmVjdCcsIHsgd2lkdGg6ICc3JywgaGVpZ2h0OiAnNycsIHg6ICcxNCcsIHk6ICczJywgcng6ICcxJywga2V5OiAnNmQ0eGhpJyB9XSxcbiAgW1xuICAgICdwYXRoJyxcbiAgICB7XG4gICAgICBkOiAnTTEwIDIxVjhhMSAxIDAgMCAwLTEtMUg0YTEgMSAwIDAgMC0xIDF2MTJhMSAxIDAgMCAwIDEgMWgxMmExIDEgMCAwIDAgMS0xdi01YTEgMSAwIDAgMC0xLTFIMycsXG4gICAgICBrZXk6ICcxZnB2dGcnLFxuICAgIH0sXG4gIF0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgQmxvY2tzO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/blocks.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/book-text.js": -/*!***************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/book-text.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ BookText)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst BookText = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"BookText\", [\n [\n \"path\",\n {\n d: \"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20\",\n key: \"t4utmx\"\n }\n ],\n [\n \"path\",\n {\n d: \"M8 7h6\",\n key: \"1f0q6e\"\n }\n ],\n [\n \"path\",\n {\n d: \"M8 11h8\",\n key: \"vwpz6n\"\n }\n ]\n]);\n //# sourceMappingURL=book-text.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2Jvb2stdGV4dC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLGlCQUFXLGdFQUFnQixDQUFDLFVBQVk7SUFDNUM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWtFO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUMvRjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBVTtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDdkM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQVc7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ3pDIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2Jvb2stdGV4dC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIEJvb2tUZXh0XG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjR0YwYUNCa1BTSk5OQ0F4T1M0MWRpMHhOVUV5TGpVZ01pNDFJREFnTUNBeElEWXVOU0F5U0RJd2RqSXdTRFl1TldFeUxqVWdNaTQxSURBZ01DQXhJREF0TlVneU1DSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk9DQTNhRFlpSUM4K0NpQWdQSEJoZEdnZ1pEMGlUVGdnTVRGb09DSWdMejRLUEM5emRtYytDZz09KSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9ib29rLXRleHRcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBCb29rVGV4dCA9IGNyZWF0ZUx1Y2lkZUljb24oJ0Jvb2tUZXh0JywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdNNCAxOS41di0xNUEyLjUgMi41IDAgMCAxIDYuNSAySDIwdjIwSDYuNWEyLjUgMi41IDAgMCAxIDAtNUgyMCcsIGtleTogJ3Q0dXRteCcgfV0sXG4gIFsncGF0aCcsIHsgZDogJ004IDdoNicsIGtleTogJzFmMHE2ZScgfV0sXG4gIFsncGF0aCcsIHsgZDogJ004IDExaDgnLCBrZXk6ICd2d3B6Nm4nIH1dLFxuXSk7XG5cbmV4cG9ydCBkZWZhdWx0IEJvb2tUZXh0O1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/book-text.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js": -/*!******************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/chevron-down.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ChevronDown)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst ChevronDown = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"ChevronDown\", [\n [\n \"path\",\n {\n d: \"m6 9 6 6 6-6\",\n key: \"qrunsl\"\n }\n ]\n]);\n //# sourceMappingURL=chevron-down.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2NoZXZyb24tZG93bi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLG9CQUFjLGdFQUFnQixDQUFDLGFBQWU7SUFDbEQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWdCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUM5QyIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9jaGV2cm9uLWRvd24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBDaGV2cm9uRG93blxuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4Y0dGMGFDQmtQU0p0TmlBNUlEWWdOaUEyTFRZaUlDOCtDand2YzNablBnbz0pIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL2NoZXZyb24tZG93blxuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IENoZXZyb25Eb3duID0gY3JlYXRlTHVjaWRlSWNvbignQ2hldnJvbkRvd24nLCBbXG4gIFsncGF0aCcsIHsgZDogJ202IDkgNiA2IDYtNicsIGtleTogJ3FydW5zbCcgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgQ2hldnJvbkRvd247XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/chevron-down.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/chevron-left.js": -/*!******************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/chevron-left.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ChevronLeft)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst ChevronLeft = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"ChevronLeft\", [\n [\n \"path\",\n {\n d: \"m15 18-6-6 6-6\",\n key: \"1wnfg3\"\n }\n ]\n]);\n //# sourceMappingURL=chevron-left.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2NoZXZyb24tbGVmdC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLG9CQUFjLGdFQUFnQixDQUFDLGFBQWU7SUFDbEQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWtCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUNoRCIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9jaGV2cm9uLWxlZnQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBDaGV2cm9uTGVmdFxuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4Y0dGMGFDQmtQU0p0TVRVZ01UZ3ROaTAySURZdE5pSWdMejRLUEM5emRtYytDZz09KSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9jaGV2cm9uLWxlZnRcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBDaGV2cm9uTGVmdCA9IGNyZWF0ZUx1Y2lkZUljb24oJ0NoZXZyb25MZWZ0JywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdtMTUgMTgtNi02IDYtNicsIGtleTogJzF3bmZnMycgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgQ2hldnJvbkxlZnQ7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/chevron-left.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/chevron-right.js": -/*!*******************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/chevron-right.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ChevronRight)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst ChevronRight = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"ChevronRight\", [\n [\n \"path\",\n {\n d: \"m9 18 6-6-6-6\",\n key: \"mthhwq\"\n }\n ]\n]);\n //# sourceMappingURL=chevron-right.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2NoZXZyb24tcmlnaHQuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxxQkFBZSxnRUFBZ0IsQ0FBQyxjQUFnQjtJQUNwRDtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBaUI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQy9DIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2NoZXZyb24tcmlnaHQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBDaGV2cm9uUmlnaHRcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKdE9TQXhPQ0EyTFRZdE5pMDJJaUF2UGdvOEwzTjJaejRLKSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9jaGV2cm9uLXJpZ2h0XG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgQ2hldnJvblJpZ2h0ID0gY3JlYXRlTHVjaWRlSWNvbignQ2hldnJvblJpZ2h0JywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdtOSAxOCA2LTYtNi02Jywga2V5OiAnbXRoaHdxJyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBDaGV2cm9uUmlnaHQ7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/chevron-right.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/chevron-up.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/chevron-up.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ChevronUp)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst ChevronUp = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"ChevronUp\", [\n [\n \"path\",\n {\n d: \"m18 15-6-6-6 6\",\n key: \"153udz\"\n }\n ]\n]);\n //# sourceMappingURL=chevron-up.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2NoZXZyb24tdXAuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhQSxDQUFNLGNBQVksb0VBQWlCLFdBQWE7SUFBQztRQUFDO1FBQVE7WUFBRSxHQUFHLGdCQUFrQjtZQUFBLEtBQUssQ0FBUztRQUFBLENBQUM7S0FBQztDQUFDIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2NoZXZyb24tdXAudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBDaGV2cm9uVXBcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKdE1UZ2dNVFV0TmkwMkxUWWdOaUlnTHo0S1BDOXpkbWMrQ2c9PSkgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvY2hldnJvbi11cFxuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IENoZXZyb25VcCA9IGNyZWF0ZUx1Y2lkZUljb24oJ0NoZXZyb25VcCcsIFtbJ3BhdGgnLCB7IGQ6ICdtMTggMTUtNi02LTYgNicsIGtleTogJzE1M3VkeicgfV1dKTtcblxuZXhwb3J0IGRlZmF1bHQgQ2hldnJvblVwO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/chevron-up.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/circle-gauge.js": -/*!******************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/circle-gauge.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CircleGauge)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst CircleGauge = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"CircleGauge\", [\n [\n \"path\",\n {\n d: \"M15.6 2.7a10 10 0 1 0 5.7 5.7\",\n key: \"1e0p6d\"\n }\n ],\n [\n \"circle\",\n {\n cx: \"12\",\n cy: \"12\",\n r: \"2\",\n key: \"1c9p78\"\n }\n ],\n [\n \"path\",\n {\n d: \"M13.4 10.6 19 5\",\n key: \"1kr7tw\"\n }\n ]\n]);\n //# sourceMappingURL=circle-gauge.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2NpcmNsZS1nYXVnZS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLG9CQUFjLGdFQUFnQixDQUFDLGFBQWU7SUFDbEQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWlDO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUM5RDtRQUFDLFFBQVU7UUFBQTtZQUFFLEVBQUk7WUFBTSxDQUFJLFFBQU07WUFBQSxDQUFHO1lBQUssR0FBSztRQUFBLENBQVU7S0FBQTtJQUN4RDtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBbUI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ2pEIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2NpcmNsZS1nYXVnZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIENpcmNsZUdhdWdlXG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjR0YwYUNCa1BTSk5NVFV1TmlBeUxqZGhNVEFnTVRBZ01DQXhJREFnTlM0M0lEVXVOeUlnTHo0S0lDQThZMmx5WTJ4bElHTjRQU0l4TWlJZ1kzazlJakV5SWlCeVBTSXlJaUF2UGdvZ0lEeHdZWFJvSUdROUlrMHhNeTQwSURFd0xqWWdNVGtnTlNJZ0x6NEtQQzl6ZG1jK0NnPT0pIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL2NpcmNsZS1nYXVnZVxuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IENpcmNsZUdhdWdlID0gY3JlYXRlTHVjaWRlSWNvbignQ2lyY2xlR2F1Z2UnLCBbXG4gIFsncGF0aCcsIHsgZDogJ00xNS42IDIuN2ExMCAxMCAwIDEgMCA1LjcgNS43Jywga2V5OiAnMWUwcDZkJyB9XSxcbiAgWydjaXJjbGUnLCB7IGN4OiAnMTInLCBjeTogJzEyJywgcjogJzInLCBrZXk6ICcxYzlwNzgnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMTMuNCAxMC42IDE5IDUnLCBrZXk6ICcxa3I3dHcnIH1dLFxuXSk7XG5cbmV4cG9ydCBkZWZhdWx0IENpcmNsZUdhdWdlO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/circle-gauge.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/copy-check.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/copy-check.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CopyCheck)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst CopyCheck = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"CopyCheck\", [\n [\n \"path\",\n {\n d: \"m12 15 2 2 4-4\",\n key: \"2c609p\"\n }\n ],\n [\n \"rect\",\n {\n width: \"14\",\n height: \"14\",\n x: \"8\",\n y: \"8\",\n rx: \"2\",\n ry: \"2\",\n key: \"17jyea\"\n }\n ],\n [\n \"path\",\n {\n d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\",\n key: \"zix9uf\"\n }\n ]\n]);\n //# sourceMappingURL=copy-check.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2NvcHktY2hlY2suanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxrQkFBWSxnRUFBZ0IsQ0FBQyxXQUFhO0lBQzlDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFrQjtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDL0M7UUFBQyxNQUFRO1FBQUE7WUFBRSxLQUFPLE9BQU07WUFBQSxPQUFRLEtBQU07WUFBQSxHQUFHLENBQUs7WUFBQSxHQUFHO1lBQUssQ0FBSSxPQUFLO1lBQUEsR0FBSSxJQUFLO1lBQUEsSUFBSztRQUFBLENBQVU7S0FBQTtJQUN2RjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBMkQ7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ3pGIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2NvcHktY2hlY2sudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBDb3B5Q2hlY2tcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKdE1USWdNVFVnTWlBeUlEUXROQ0lnTHo0S0lDQThjbVZqZENCM2FXUjBhRDBpTVRRaUlHaGxhV2RvZEQwaU1UUWlJSGc5SWpnaUlIazlJamdpSUhKNFBTSXlJaUJ5ZVQwaU1pSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk5DQXhObU10TVM0eElEQXRNaTB1T1MweUxUSldOR013TFRFdU1TNDVMVElnTWkweWFERXdZekV1TVNBd0lESWdMamtnTWlBeUlpQXZQZ284TDNOMlp6NEspIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL2NvcHktY2hlY2tcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBDb3B5Q2hlY2sgPSBjcmVhdGVMdWNpZGVJY29uKCdDb3B5Q2hlY2snLCBbXG4gIFsncGF0aCcsIHsgZDogJ20xMiAxNSAyIDIgNC00Jywga2V5OiAnMmM2MDlwJyB9XSxcbiAgWydyZWN0JywgeyB3aWR0aDogJzE0JywgaGVpZ2h0OiAnMTQnLCB4OiAnOCcsIHk6ICc4Jywgcng6ICcyJywgcnk6ICcyJywga2V5OiAnMTdqeWVhJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTQgMTZjLTEuMSAwLTItLjktMi0yVjRjMC0xLjEuOS0yIDItMmgxMGMxLjEgMCAyIC45IDIgMicsIGtleTogJ3ppeDl1ZicgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgQ29weUNoZWNrO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/copy-check.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/copy.js": -/*!**********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/copy.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Copy)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Copy = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Copy\", [\n [\n \"rect\",\n {\n width: \"14\",\n height: \"14\",\n x: \"8\",\n y: \"8\",\n rx: \"2\",\n ry: \"2\",\n key: \"17jyea\"\n }\n ],\n [\n \"path\",\n {\n d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\",\n key: \"zix9uf\"\n }\n ]\n]);\n //# sourceMappingURL=copy.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2NvcHkuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxhQUFPLGdFQUFnQixDQUFDLE1BQVE7SUFDcEM7UUFBQyxNQUFRO1FBQUE7WUFBRSxLQUFPLE9BQU07WUFBQSxPQUFRLEtBQU07WUFBQSxHQUFHLENBQUs7WUFBQSxHQUFHO1lBQUssQ0FBSSxPQUFLO1lBQUEsR0FBSSxJQUFLO1lBQUEsSUFBSztRQUFBLENBQVU7S0FBQTtJQUN2RjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBMkQ7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ3pGIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2NvcHkudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBDb3B5XG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjbVZqZENCM2FXUjBhRDBpTVRRaUlHaGxhV2RvZEQwaU1UUWlJSGc5SWpnaUlIazlJamdpSUhKNFBTSXlJaUJ5ZVQwaU1pSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk5DQXhObU10TVM0eElEQXRNaTB1T1MweUxUSldOR013TFRFdU1TNDVMVElnTWkweWFERXdZekV1TVNBd0lESWdMamtnTWlBeUlpQXZQZ284TDNOMlp6NEspIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL2NvcHlcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBDb3B5ID0gY3JlYXRlTHVjaWRlSWNvbignQ29weScsIFtcbiAgWydyZWN0JywgeyB3aWR0aDogJzE0JywgaGVpZ2h0OiAnMTQnLCB4OiAnOCcsIHk6ICc4Jywgcng6ICcyJywgcnk6ICcyJywga2V5OiAnMTdqeWVhJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTQgMTZjLTEuMSAwLTItLjktMi0yVjRjMC0xLjEuOS0yIDItMmgxMGMxLjEgMCAyIC45IDIgMicsIGtleTogJ3ppeDl1ZicgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgQ29weTtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/copy.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/database.js": -/*!**************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/database.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Database)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Database = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Database\", [\n [\n \"ellipse\",\n {\n cx: \"12\",\n cy: \"5\",\n rx: \"9\",\n ry: \"3\",\n key: \"msslwz\"\n }\n ],\n [\n \"path\",\n {\n d: \"M3 5V19A9 3 0 0 0 21 19V5\",\n key: \"1wlel7\"\n }\n ],\n [\n \"path\",\n {\n d: \"M3 12A9 3 0 0 0 21 12\",\n key: \"mv7ke4\"\n }\n ]\n]);\n //# sourceMappingURL=database.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2RhdGFiYXNlLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBYU0saUJBQVcsZ0VBQWdCLENBQUMsVUFBWTtJQUM1QztRQUFDO1FBQVcsQ0FBRTtZQUFBLElBQUksQ0FBTTtZQUFBLElBQUksQ0FBSztZQUFBLEdBQUksSUFBSztZQUFBLEdBQUksSUFBSztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDbEU7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQTZCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUMxRDtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBeUI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ3ZEIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2RhdGFiYXNlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgRGF0YWJhc2VcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOFpXeHNhWEJ6WlNCamVEMGlNVElpSUdONVBTSTFJaUJ5ZUQwaU9TSWdjbms5SWpNaUlDOCtDaUFnUEhCaGRHZ2daRDBpVFRNZ05WWXhPVUU1SURNZ01DQXdJREFnTWpFZ01UbFdOU0lnTHo0S0lDQThjR0YwYUNCa1BTSk5NeUF4TWtFNUlETWdNQ0F3SURBZ01qRWdNVElpSUM4K0Nqd3ZjM1puUGdvPSkgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvZGF0YWJhc2VcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBEYXRhYmFzZSA9IGNyZWF0ZUx1Y2lkZUljb24oJ0RhdGFiYXNlJywgW1xuICBbJ2VsbGlwc2UnLCB7IGN4OiAnMTInLCBjeTogJzUnLCByeDogJzknLCByeTogJzMnLCBrZXk6ICdtc3Nsd3onIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMyA1VjE5QTkgMyAwIDAgMCAyMSAxOVY1Jywga2V5OiAnMXdsZWw3JyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTMgMTJBOSAzIDAgMCAwIDIxIDEyJywga2V5OiAnbXY3a2U0JyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBEYXRhYmFzZTtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/database.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/earth-lock.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/earth-lock.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ EarthLock)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst EarthLock = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"EarthLock\", [\n [\n \"path\",\n {\n d: \"M7 3.34V5a3 3 0 0 0 3 3\",\n key: \"w732o8\"\n }\n ],\n [\n \"path\",\n {\n d: \"M11 21.95V18a2 2 0 0 0-2-2 2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05\",\n key: \"f02343\"\n }\n ],\n [\n \"path\",\n {\n d: \"M21.54 15H17a2 2 0 0 0-2 2v4.54\",\n key: \"1djwo0\"\n }\n ],\n [\n \"path\",\n {\n d: \"M12 2a10 10 0 1 0 9.54 13\",\n key: \"zjsr6q\"\n }\n ],\n [\n \"path\",\n {\n d: \"M20 6V4a2 2 0 1 0-4 0v2\",\n key: \"1of5e8\"\n }\n ],\n [\n \"rect\",\n {\n width: \"8\",\n height: \"5\",\n x: \"14\",\n y: \"6\",\n rx: \"1\",\n key: \"1fmf51\"\n }\n ]\n]);\n //# sourceMappingURL=earth-lock.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2VhcnRoLWxvY2suanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxrQkFBWSxnRUFBZ0IsQ0FBQyxXQUFhO0lBQzlDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUEyQjtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDeEQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWtFO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUMvRjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBbUM7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ2hFO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUE2QjtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDMUQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQTJCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUN4RDtRQUFDLE9BQVE7UUFBQTtZQUFFLE9BQU87WUFBSyxDQUFRO1lBQUssQ0FBRztZQUFNLEdBQUcsQ0FBSztZQUFBLElBQUksQ0FBSztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7Q0FDOUUiLCJzb3VyY2VzIjpbIi9zcmMvaWNvbnMvZWFydGgtbG9jay50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIEVhcnRoTG9ja1xuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4Y0dGMGFDQmtQU0pOTnlBekxqTTBWalZoTXlBeklEQWdNQ0F3SURNZ015SWdMejRLSUNBOGNHRjBhQ0JrUFNKTk1URWdNakV1T1RWV01UaGhNaUF5SURBZ01DQXdMVEl0TWlBeUlESWdNQ0F3SURFdE1pMHlkaTB4WVRJZ01pQXdJREFnTUMweUxUSklNaTR3TlNJZ0x6NEtJQ0E4Y0dGMGFDQmtQU0pOTWpFdU5UUWdNVFZJTVRkaE1pQXlJREFnTUNBd0xUSWdNblkwTGpVMElpQXZQZ29nSUR4d1lYUm9JR1E5SWsweE1pQXlZVEV3SURFd0lEQWdNU0F3SURrdU5UUWdNVE1pSUM4K0NpQWdQSEJoZEdnZ1pEMGlUVEl3SURaV05HRXlJRElnTUNBeElEQXROQ0F3ZGpJaUlDOCtDaUFnUEhKbFkzUWdkMmxrZEdnOUlqZ2lJR2hsYVdkb2REMGlOU0lnZUQwaU1UUWlJSGs5SWpZaUlISjRQU0l4SWlBdlBnbzhMM04yWno0SykgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvZWFydGgtbG9ja1xuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IEVhcnRoTG9jayA9IGNyZWF0ZUx1Y2lkZUljb24oJ0VhcnRoTG9jaycsIFtcbiAgWydwYXRoJywgeyBkOiAnTTcgMy4zNFY1YTMgMyAwIDAgMCAzIDMnLCBrZXk6ICd3NzMybzgnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMTEgMjEuOTVWMThhMiAyIDAgMCAwLTItMiAyIDIgMCAwIDEtMi0ydi0xYTIgMiAwIDAgMC0yLTJIMi4wNScsIGtleTogJ2YwMjM0MycgfV0sXG4gIFsncGF0aCcsIHsgZDogJ00yMS41NCAxNUgxN2EyIDIgMCAwIDAtMiAydjQuNTQnLCBrZXk6ICcxZGp3bzAnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMTIgMmExMCAxMCAwIDEgMCA5LjU0IDEzJywga2V5OiAnempzcjZxJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTIwIDZWNGEyIDIgMCAxIDAtNCAwdjInLCBrZXk6ICcxb2Y1ZTgnIH1dLFxuICBbJ3JlY3QnLCB7IHdpZHRoOiAnOCcsIGhlaWdodDogJzUnLCB4OiAnMTQnLCB5OiAnNicsIHJ4OiAnMScsIGtleTogJzFmbWY1MScgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgRWFydGhMb2NrO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/earth-lock.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/file-key-2.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/file-key-2.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ FileKey2)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst FileKey2 = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"FileKey2\", [\n [\n \"path\",\n {\n d: \"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6\",\n key: \"rc0qvx\"\n }\n ],\n [\n \"path\",\n {\n d: \"M14 2v4a2 2 0 0 0 2 2h4\",\n key: \"tnqrlb\"\n }\n ],\n [\n \"circle\",\n {\n cx: \"4\",\n cy: \"16\",\n r: \"2\",\n key: \"1ehqvc\"\n }\n ],\n [\n \"path\",\n {\n d: \"m10 10-4.5 4.5\",\n key: \"7fwrp6\"\n }\n ],\n [\n \"path\",\n {\n d: \"m9 11 1 1\",\n key: \"wa6s5q\"\n }\n ]\n]);\n //# sourceMappingURL=file-key-2.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2ZpbGUta2V5LTIuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxpQkFBVyxnRUFBZ0IsQ0FBQyxVQUFZO0lBQzVDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFtRDtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDaEY7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQTJCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUN4RDtRQUFDLFFBQVU7UUFBQTtZQUFFLEVBQUk7WUFBSyxDQUFJLFFBQU07WUFBQSxDQUFHO1lBQUssR0FBSztRQUFBLENBQVU7S0FBQTtJQUN2RDtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBa0I7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQy9DO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFhO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUMzQyIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9maWxlLWtleS0yLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgRmlsZUtleTJcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKTk5DQXlNbWd4TkdFeUlESWdNQ0F3SURBZ01pMHlWamRzTFRVdE5VZzJZVElnTWlBd0lEQWdNQzB5SURKMk5pSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk1UUWdNblkwWVRJZ01pQXdJREFnTUNBeUlESm9OQ0lnTHo0S0lDQThZMmx5WTJ4bElHTjRQU0kwSWlCamVUMGlNVFlpSUhJOUlqSWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaWJURXdJREV3TFRRdU5TQTBMalVpSUM4K0NpQWdQSEJoZEdnZ1pEMGliVGtnTVRFZ01TQXhJaUF2UGdvOEwzTjJaejRLKSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9maWxlLWtleS0yXG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgRmlsZUtleTIgPSBjcmVhdGVMdWNpZGVJY29uKCdGaWxlS2V5MicsIFtcbiAgWydwYXRoJywgeyBkOiAnTTQgMjJoMTRhMiAyIDAgMCAwIDItMlY3bC01LTVINmEyIDIgMCAwIDAtMiAydjYnLCBrZXk6ICdyYzBxdngnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMTQgMnY0YTIgMiAwIDAgMCAyIDJoNCcsIGtleTogJ3RucXJsYicgfV0sXG4gIFsnY2lyY2xlJywgeyBjeDogJzQnLCBjeTogJzE2JywgcjogJzInLCBrZXk6ICcxZWhxdmMnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdtMTAgMTAtNC41IDQuNScsIGtleTogJzdmd3JwNicgfV0sXG4gIFsncGF0aCcsIHsgZDogJ205IDExIDEgMScsIGtleTogJ3dhNnM1cScgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgRmlsZUtleTI7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/file-key-2.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/file-video-2.js": -/*!******************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/file-video-2.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ FileVideo2)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst FileVideo2 = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"FileVideo2\", [\n [\n \"path\",\n {\n d: \"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4\",\n key: \"1pf5j1\"\n }\n ],\n [\n \"path\",\n {\n d: \"M14 2v4a2 2 0 0 0 2 2h4\",\n key: \"tnqrlb\"\n }\n ],\n [\n \"rect\",\n {\n width: \"8\",\n height: \"6\",\n x: \"2\",\n y: \"12\",\n rx: \"1\",\n key: \"1a6c1e\"\n }\n ],\n [\n \"path\",\n {\n d: \"m10 15.5 4 2.5v-6l-4 2.5\",\n key: \"t7cp39\"\n }\n ]\n]);\n //# sourceMappingURL=file-video-2.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2ZpbGUtdmlkZW8tMi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLG1CQUFhLGdFQUFnQixDQUFDLFlBQWM7SUFDaEQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQW1EO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUNoRjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBMkI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ3hEO1FBQUMsT0FBUTtRQUFBO1lBQUUsT0FBTztZQUFLLENBQVE7WUFBSyxDQUFHO1lBQUssR0FBRyxDQUFNO1lBQUEsSUFBSSxDQUFLO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUM3RTtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBNEI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQzFEIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2ZpbGUtdmlkZW8tMi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIEZpbGVWaWRlbzJcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKTk5DQXlNbWd4TkdFeUlESWdNQ0F3SURBZ01pMHlWamRzTFRVdE5VZzJZVElnTWlBd0lEQWdNQzB5SURKMk5DSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk1UUWdNblkwWVRJZ01pQXdJREFnTUNBeUlESm9OQ0lnTHo0S0lDQThjbVZqZENCM2FXUjBhRDBpT0NJZ2FHVnBaMmgwUFNJMklpQjRQU0l5SWlCNVBTSXhNaUlnY25nOUlqRWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaWJURXdJREUxTGpVZ05DQXlMalYyTFRac0xUUWdNaTQxSWlBdlBnbzhMM04yWno0SykgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvZmlsZS12aWRlby0yXG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgRmlsZVZpZGVvMiA9IGNyZWF0ZUx1Y2lkZUljb24oJ0ZpbGVWaWRlbzInLCBbXG4gIFsncGF0aCcsIHsgZDogJ000IDIyaDE0YTIgMiAwIDAgMCAyLTJWN2wtNS01SDZhMiAyIDAgMCAwLTIgMnY0Jywga2V5OiAnMXBmNWoxJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTE0IDJ2NGEyIDIgMCAwIDAgMiAyaDQnLCBrZXk6ICd0bnFybGInIH1dLFxuICBbJ3JlY3QnLCB7IHdpZHRoOiAnOCcsIGhlaWdodDogJzYnLCB4OiAnMicsIHk6ICcxMicsIHJ4OiAnMScsIGtleTogJzFhNmMxZScgfV0sXG4gIFsncGF0aCcsIHsgZDogJ20xMCAxNS41IDQgMi41di02bC00IDIuNScsIGtleTogJ3Q3Y3AzOScgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgRmlsZVZpZGVvMjtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/file-video-2.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/files.js": -/*!***********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/files.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Files)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Files = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Files\", [\n [\n \"path\",\n {\n d: \"M20 7h-3a2 2 0 0 1-2-2V2\",\n key: \"x099mo\"\n }\n ],\n [\n \"path\",\n {\n d: \"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z\",\n key: \"18t6ie\"\n }\n ],\n [\n \"path\",\n {\n d: \"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8\",\n key: \"1nja0z\"\n }\n ]\n]);\n //# sourceMappingURL=files.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2ZpbGVzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBYU0sY0FBUSxnRUFBZ0IsQ0FBQyxPQUFTO0lBQ3RDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUE0QjtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDekQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQStEO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUM1RjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBd0M7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ3RFIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2ZpbGVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgRmlsZXNcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKTk1qQWdOMmd0TTJFeUlESWdNQ0F3SURFdE1pMHlWaklpSUM4K0NpQWdQSEJoZEdnZ1pEMGlUVGtnTVRoaE1pQXlJREFnTUNBeExUSXRNbFkwWVRJZ01pQXdJREFnTVNBeUxUSm9OMncwSURSMk1UQmhNaUF5SURBZ01DQXhMVElnTWxvaUlDOCtDaUFnUEhCaGRHZ2daRDBpVFRNZ055NDJkakV5TGpoQk1TNDJJREV1TmlBd0lEQWdNQ0EwTGpZZ01qSm9PUzQ0SWlBdlBnbzhMM04yWno0SykgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvZmlsZXNcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBGaWxlcyA9IGNyZWF0ZUx1Y2lkZUljb24oJ0ZpbGVzJywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdNMjAgN2gtM2EyIDIgMCAwIDEtMi0yVjInLCBrZXk6ICd4MDk5bW8nIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNOSAxOGEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg3bDQgNHYxMGEyIDIgMCAwIDEtMiAyWicsIGtleTogJzE4dDZpZScgfV0sXG4gIFsncGF0aCcsIHsgZDogJ00zIDcuNnYxMi44QTEuNiAxLjYgMCAwIDAgNC42IDIyaDkuOCcsIGtleTogJzFuamEweicgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgRmlsZXM7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/files.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/folder-output.js": -/*!*******************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/folder-output.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ FolderOutput)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst FolderOutput = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"FolderOutput\", [\n [\n \"path\",\n {\n d: \"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5\",\n key: \"1yk7aj\"\n }\n ],\n [\n \"path\",\n {\n d: \"M2 13h10\",\n key: \"pgb2dq\"\n }\n ],\n [\n \"path\",\n {\n d: \"m5 10-3 3 3 3\",\n key: \"1r8ie0\"\n }\n ]\n]);\n //# sourceMappingURL=folder-output.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2ZvbGRlci1vdXRwdXQuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxxQkFBZSxnRUFBZ0IsQ0FBQyxjQUFnQjtJQUNwRDtRQUNFO1FBQ0E7WUFDRSxDQUFHO1lBQ0gsR0FBSztRQUNQO0tBQ0Y7SUFDQTtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBWTtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDekM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWlCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUMvQyIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9mb2xkZXItb3V0cHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgRm9sZGVyT3V0cHV0XG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjR0YwYUNCa1BTSk5NaUEzTGpWV05XRXlJRElnTUNBd0lERWdNaTB5YURNdU9XRXlJRElnTUNBd0lERWdNUzQyT1M0NWJDNDRNU0F4TGpKaE1pQXlJREFnTUNBd0lERXVOamN1T1VneU1HRXlJRElnTUNBd0lERWdNaUF5ZGpFd1lUSWdNaUF3SURBZ01TMHlJREpJTkdFeUlESWdNQ0F3SURFdE1pMHhMalVpSUM4K0NpQWdQSEJoZEdnZ1pEMGlUVElnTVROb01UQWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaWJUVWdNVEF0TXlBeklETWdNeUlnTHo0S1BDOXpkbWMrQ2c9PSkgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvZm9sZGVyLW91dHB1dFxuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IEZvbGRlck91dHB1dCA9IGNyZWF0ZUx1Y2lkZUljb24oJ0ZvbGRlck91dHB1dCcsIFtcbiAgW1xuICAgICdwYXRoJyxcbiAgICB7XG4gICAgICBkOiAnTTIgNy41VjVhMiAyIDAgMCAxIDItMmgzLjlhMiAyIDAgMCAxIDEuNjkuOWwuODEgMS4yYTIgMiAwIDAgMCAxLjY3LjlIMjBhMiAyIDAgMCAxIDIgMnYxMGEyIDIgMCAwIDEtMiAySDRhMiAyIDAgMCAxLTItMS41JyxcbiAgICAgIGtleTogJzF5azdhaicsXG4gICAgfSxcbiAgXSxcbiAgWydwYXRoJywgeyBkOiAnTTIgMTNoMTAnLCBrZXk6ICdwZ2IyZHEnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdtNSAxMC0zIDMgMyAzJywga2V5OiAnMXI4aWUwJyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBGb2xkZXJPdXRwdXQ7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/folder-output.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/folder.js": -/*!************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/folder.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Folder)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Folder = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Folder\", [\n [\n \"path\",\n {\n d: \"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\",\n key: \"1kt360\"\n }\n ]\n]);\n //# sourceMappingURL=folder.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2ZvbGRlci5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLGVBQVMsZ0VBQWdCLENBQUMsUUFBVTtJQUN4QztRQUNFO1FBQ0E7WUFDRSxDQUFHO1lBQ0gsR0FBSztRQUNQO0tBQ0Y7Q0FDRCIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9mb2xkZXIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBGb2xkZXJcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKTk1qQWdNakJoTWlBeUlEQWdNQ0F3SURJdE1sWTRZVElnTWlBd0lEQWdNQzB5TFRKb0xUY3VPV0V5SURJZ01DQXdJREV0TVM0Mk9TMHVPVXc1TGpZZ015NDVRVElnTWlBd0lEQWdNQ0EzTGpreklETklOR0V5SURJZ01DQXdJREF0TWlBeWRqRXpZVElnTWlBd0lEQWdNQ0F5SURKYUlpQXZQZ284TDNOMlp6NEspIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL2ZvbGRlclxuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IEZvbGRlciA9IGNyZWF0ZUx1Y2lkZUljb24oJ0ZvbGRlcicsIFtcbiAgW1xuICAgICdwYXRoJyxcbiAgICB7XG4gICAgICBkOiAnTTIwIDIwYTIgMiAwIDAgMCAyLTJWOGEyIDIgMCAwIDAtMi0yaC03LjlhMiAyIDAgMCAxLTEuNjktLjlMOS42IDMuOUEyIDIgMCAwIDAgNy45MyAzSDRhMiAyIDAgMCAwLTIgMnYxM2EyIDIgMCAwIDAgMiAyWicsXG4gICAgICBrZXk6ICcxa3QzNjAnLFxuICAgIH0sXG4gIF0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgRm9sZGVyO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/folder.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/globe.js": -/*!***********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/globe.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Globe)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Globe = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Globe\", [\n [\n \"circle\",\n {\n cx: \"12\",\n cy: \"12\",\n r: \"10\",\n key: \"1mglay\"\n }\n ],\n [\n \"path\",\n {\n d: \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\",\n key: \"13o1zl\"\n }\n ],\n [\n \"path\",\n {\n d: \"M2 12h20\",\n key: \"9i4pu4\"\n }\n ]\n]);\n //# sourceMappingURL=globe.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2dsb2JlLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBYU0sY0FBUSxnRUFBZ0IsQ0FBQyxPQUFTO0lBQ3RDO1FBQUMsUUFBVTtRQUFBO1lBQUUsRUFBSTtZQUFNLENBQUksUUFBTTtZQUFBLENBQUc7WUFBTSxHQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ3pEO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFtRDtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDaEY7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQVk7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQzFDIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2dsb2JlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgR2xvYmVcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOFkybHlZMnhsSUdONFBTSXhNaUlnWTNrOUlqRXlJaUJ5UFNJeE1DSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk1USWdNbUV4TkM0MUlERTBMalVnTUNBd0lEQWdNQ0F5TUNBeE5DNDFJREUwTGpVZ01DQXdJREFnTUMweU1DSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk1pQXhNbWd5TUNJZ0x6NEtQQzl6ZG1jK0NnPT0pIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL2dsb2JlXG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgR2xvYmUgPSBjcmVhdGVMdWNpZGVJY29uKCdHbG9iZScsIFtcbiAgWydjaXJjbGUnLCB7IGN4OiAnMTInLCBjeTogJzEyJywgcjogJzEwJywga2V5OiAnMW1nbGF5JyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTEyIDJhMTQuNSAxNC41IDAgMCAwIDAgMjAgMTQuNSAxNC41IDAgMCAwIDAtMjAnLCBrZXk6ICcxM28xemwnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMiAxMmgyMCcsIGtleTogJzlpNHB1NCcgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgR2xvYmU7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/globe.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/hard-drive.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/hard-drive.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ HardDrive)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst HardDrive = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"HardDrive\", [\n [\n \"line\",\n {\n x1: \"22\",\n x2: \"2\",\n y1: \"12\",\n y2: \"12\",\n key: \"1y58io\"\n }\n ],\n [\n \"path\",\n {\n d: \"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\",\n key: \"oot6mr\"\n }\n ],\n [\n \"line\",\n {\n x1: \"6\",\n x2: \"6.01\",\n y1: \"16\",\n y2: \"16\",\n key: \"sgf278\"\n }\n ],\n [\n \"line\",\n {\n x1: \"10\",\n x2: \"10.01\",\n y1: \"16\",\n y2: \"16\",\n key: \"1l4acy\"\n }\n ]\n]);\n //# sourceMappingURL=hard-drive.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2hhcmQtZHJpdmUuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxrQkFBWSxnRUFBZ0IsQ0FBQyxXQUFhO0lBQzlDO1FBQUM7UUFBUSxDQUFFO1lBQUEsSUFBSSxDQUFNO1lBQUEsSUFBSSxDQUFLO1lBQUEsR0FBSSxLQUFNO1lBQUEsR0FBSSxLQUFNO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUNqRTtRQUNFO1FBQ0E7WUFDRSxDQUFHO1lBQ0gsR0FBSztRQUNQO0tBQ0Y7SUFDQTtRQUFDO1FBQVEsQ0FBRTtZQUFBLElBQUksQ0FBSztZQUFBLElBQUksQ0FBUTtZQUFBLEdBQUksS0FBTTtZQUFBLEdBQUksS0FBTTtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDbkU7UUFBQztRQUFRLENBQUU7WUFBQSxJQUFJLENBQU07WUFBQSxJQUFJLENBQVM7WUFBQSxHQUFJLEtBQU07WUFBQSxHQUFJLEtBQU07WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ3RFIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2hhcmQtZHJpdmUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBIYXJkRHJpdmVcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGJHbHVaU0I0TVQwaU1qSWlJSGd5UFNJeUlpQjVNVDBpTVRJaUlIa3lQU0l4TWlJZ0x6NEtJQ0E4Y0dGMGFDQmtQU0pOTlM0ME5TQTFMakV4SURJZ01USjJObUV5SURJZ01DQXdJREFnTWlBeWFERTJZVElnTWlBd0lEQWdNQ0F5TFRKMkxUWnNMVE11TkRVdE5pNDRPVUV5SURJZ01DQXdJREFnTVRZdU56WWdORWczTGpJMFlUSWdNaUF3SURBZ01DMHhMamM1SURFdU1URjZJaUF2UGdvZ0lEeHNhVzVsSUhneFBTSTJJaUI0TWowaU5pNHdNU0lnZVRFOUlqRTJJaUI1TWowaU1UWWlJQzgrQ2lBZ1BHeHBibVVnZURFOUlqRXdJaUI0TWowaU1UQXVNREVpSUhreFBTSXhOaUlnZVRJOUlqRTJJaUF2UGdvOEwzTjJaejRLKSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9oYXJkLWRyaXZlXG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgSGFyZERyaXZlID0gY3JlYXRlTHVjaWRlSWNvbignSGFyZERyaXZlJywgW1xuICBbJ2xpbmUnLCB7IHgxOiAnMjInLCB4MjogJzInLCB5MTogJzEyJywgeTI6ICcxMicsIGtleTogJzF5NThpbycgfV0sXG4gIFtcbiAgICAncGF0aCcsXG4gICAge1xuICAgICAgZDogJ001LjQ1IDUuMTEgMiAxMnY2YTIgMiAwIDAgMCAyIDJoMTZhMiAyIDAgMCAwIDItMnYtNmwtMy40NS02Ljg5QTIgMiAwIDAgMCAxNi43NiA0SDcuMjRhMiAyIDAgMCAwLTEuNzkgMS4xMXonLFxuICAgICAga2V5OiAnb290Nm1yJyxcbiAgICB9LFxuICBdLFxuICBbJ2xpbmUnLCB7IHgxOiAnNicsIHgyOiAnNi4wMScsIHkxOiAnMTYnLCB5MjogJzE2Jywga2V5OiAnc2dmMjc4JyB9XSxcbiAgWydsaW5lJywgeyB4MTogJzEwJywgeDI6ICcxMC4wMScsIHkxOiAnMTYnLCB5MjogJzE2Jywga2V5OiAnMWw0YWN5JyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBIYXJkRHJpdmU7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/hard-drive.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/images.js": -/*!************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/images.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Images)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Images = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Images\", [\n [\n \"path\",\n {\n d: \"M18 22H4a2 2 0 0 1-2-2V6\",\n key: \"pblm9e\"\n }\n ],\n [\n \"path\",\n {\n d: \"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18\",\n key: \"nf6bnh\"\n }\n ],\n [\n \"circle\",\n {\n cx: \"12\",\n cy: \"8\",\n r: \"2\",\n key: \"1822b1\"\n }\n ],\n [\n \"rect\",\n {\n width: \"16\",\n height: \"16\",\n x: \"6\",\n y: \"2\",\n rx: \"2\",\n key: \"12espp\"\n }\n ]\n]);\n //# sourceMappingURL=images.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2ltYWdlcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLGVBQVMsZ0VBQWdCLENBQUMsUUFBVTtJQUN4QztRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBNEI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ3pEO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFvRDtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDakY7UUFBQyxRQUFVO1FBQUE7WUFBRSxFQUFJO1lBQU0sQ0FBSSxPQUFLO1lBQUEsQ0FBRztZQUFLLEdBQUs7UUFBQSxDQUFVO0tBQUE7SUFDdkQ7UUFBQyxPQUFRO1FBQUE7WUFBRSxPQUFPO1lBQU0sQ0FBUTtZQUFNLENBQUc7WUFBSyxHQUFHLENBQUs7WUFBQSxJQUFJLENBQUs7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQy9FIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2ltYWdlcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIEltYWdlc1xuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4Y0dGMGFDQmtQU0pOTVRnZ01qSklOR0V5SURJZ01DQXdJREV0TWkweVZqWWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaWJUSXlJREV6TFRFdU1qazJMVEV1TWprMllUSXVOREVnTWk0ME1TQXdJREFnTUMwekxqUXdPQ0F3VERFeElERTRJaUF2UGdvZ0lEeGphWEpqYkdVZ1kzZzlJakV5SWlCamVUMGlPQ0lnY2owaU1pSWdMejRLSUNBOGNtVmpkQ0IzYVdSMGFEMGlNVFlpSUdobGFXZG9kRDBpTVRZaUlIZzlJallpSUhrOUlqSWlJSEo0UFNJeUlpQXZQZ284TDNOMlp6NEspIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL2ltYWdlc1xuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IEltYWdlcyA9IGNyZWF0ZUx1Y2lkZUljb24oJ0ltYWdlcycsIFtcbiAgWydwYXRoJywgeyBkOiAnTTE4IDIySDRhMiAyIDAgMCAxLTItMlY2Jywga2V5OiAncGJsbTllJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnbTIyIDEzLTEuMjk2LTEuMjk2YTIuNDEgMi40MSAwIDAgMC0zLjQwOCAwTDExIDE4Jywga2V5OiAnbmY2Ym5oJyB9XSxcbiAgWydjaXJjbGUnLCB7IGN4OiAnMTInLCBjeTogJzgnLCByOiAnMicsIGtleTogJzE4MjJiMScgfV0sXG4gIFsncmVjdCcsIHsgd2lkdGg6ICcxNicsIGhlaWdodDogJzE2JywgeDogJzYnLCB5OiAnMicsIHJ4OiAnMicsIGtleTogJzEyZXNwcCcgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgSW1hZ2VzO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/images.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/key.js": -/*!*********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/key.js ***! - \*********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Key)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Key = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Key\", [\n [\n \"circle\",\n {\n cx: \"7.5\",\n cy: \"15.5\",\n r: \"5.5\",\n key: \"yqb3hr\"\n }\n ],\n [\n \"path\",\n {\n d: \"m21 2-9.6 9.6\",\n key: \"1j0ho8\"\n }\n ],\n [\n \"path\",\n {\n d: \"m15.5 7.5 3 3L22 7l-3-3\",\n key: \"1rn1fs\"\n }\n ]\n]);\n //# sourceMappingURL=key.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2tleS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLFlBQU0sZ0VBQWdCLENBQUMsS0FBTztJQUNsQztRQUFDLFFBQVU7UUFBQTtZQUFFLEVBQUk7WUFBTyxDQUFJLFVBQVE7WUFBQSxDQUFHO1lBQU8sR0FBSztRQUFBLENBQVU7S0FBQTtJQUM3RDtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBaUI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQzlDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUEyQjtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7Q0FDekQiLCJzb3VyY2VzIjpbIi9zcmMvaWNvbnMva2V5LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgS2V5XG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThZMmx5WTJ4bElHTjRQU0kzTGpVaUlHTjVQU0l4TlM0MUlpQnlQU0kxTGpVaUlDOCtDaUFnUEhCaGRHZ2daRDBpYlRJeElESXRPUzQySURrdU5pSWdMejRLSUNBOGNHRjBhQ0JrUFNKdE1UVXVOU0EzTGpVZ015QXpUREl5SURkc0xUTXRNeUlnTHo0S1BDOXpkbWMrQ2c9PSkgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMva2V5XG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgS2V5ID0gY3JlYXRlTHVjaWRlSWNvbignS2V5JywgW1xuICBbJ2NpcmNsZScsIHsgY3g6ICc3LjUnLCBjeTogJzE1LjUnLCByOiAnNS41Jywga2V5OiAneXFiM2hyJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnbTIxIDItOS42IDkuNicsIGtleTogJzFqMGhvOCcgfV0sXG4gIFsncGF0aCcsIHsgZDogJ20xNS41IDcuNSAzIDNMMjIgN2wtMy0zJywga2V5OiAnMXJuMWZzJyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBLZXk7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/key.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/lock-keyhole-open.js": -/*!***********************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/lock-keyhole-open.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ LockKeyholeOpen)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst LockKeyholeOpen = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"LockKeyholeOpen\", [\n [\n \"circle\",\n {\n cx: \"12\",\n cy: \"16\",\n r: \"1\",\n key: \"1au0dj\"\n }\n ],\n [\n \"rect\",\n {\n width: \"18\",\n height: \"12\",\n x: \"3\",\n y: \"10\",\n rx: \"2\",\n key: \"l0tzu3\"\n }\n ],\n [\n \"path\",\n {\n d: \"M7 10V7a5 5 0 0 1 9.33-2.5\",\n key: \"car5b7\"\n }\n ]\n]);\n //# sourceMappingURL=lock-keyhole-open.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2xvY2sta2V5aG9sZS1vcGVuLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBYU0sd0JBQWtCLGdFQUFnQixDQUFDLGlCQUFtQjtJQUMxRDtRQUFDLFFBQVU7UUFBQTtZQUFFLEVBQUk7WUFBTSxDQUFJLFFBQU07WUFBQSxDQUFHO1lBQUssR0FBSztRQUFBLENBQVU7S0FBQTtJQUN4RDtRQUFDLE9BQVE7UUFBQTtZQUFFLE9BQU87WUFBTSxDQUFRO1lBQU0sQ0FBRztZQUFLLEdBQUcsQ0FBTTtZQUFBLElBQUksQ0FBSztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDL0U7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQThCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUM1RCIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9sb2NrLWtleWhvbGUtb3Blbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIExvY2tLZXlob2xlT3BlblxuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4WTJseVkyeGxJR040UFNJeE1pSWdZM2s5SWpFMklpQnlQU0l4SWlBdlBnb2dJRHh5WldOMElIZHBaSFJvUFNJeE9DSWdhR1ZwWjJoMFBTSXhNaUlnZUQwaU15SWdlVDBpTVRBaUlISjRQU0l5SWlBdlBnb2dJRHh3WVhSb0lHUTlJazAzSURFd1ZqZGhOU0ExSURBZ01DQXhJRGt1TXpNdE1pNDFJaUF2UGdvOEwzTjJaejRLKSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9sb2NrLWtleWhvbGUtb3BlblxuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IExvY2tLZXlob2xlT3BlbiA9IGNyZWF0ZUx1Y2lkZUljb24oJ0xvY2tLZXlob2xlT3BlbicsIFtcbiAgWydjaXJjbGUnLCB7IGN4OiAnMTInLCBjeTogJzE2JywgcjogJzEnLCBrZXk6ICcxYXUwZGonIH1dLFxuICBbJ3JlY3QnLCB7IHdpZHRoOiAnMTgnLCBoZWlnaHQ6ICcxMicsIHg6ICczJywgeTogJzEwJywgcng6ICcyJywga2V5OiAnbDB0enUzJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTcgMTBWN2E1IDUgMCAwIDEgOS4zMy0yLjUnLCBrZXk6ICdjYXI1YjcnIH1dLFxuXSk7XG5cbmV4cG9ydCBkZWZhdWx0IExvY2tLZXlob2xlT3BlbjtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/lock-keyhole-open.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/lock-open.js": -/*!***************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/lock-open.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ LockOpen)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst LockOpen = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"LockOpen\", [\n [\n \"rect\",\n {\n width: \"18\",\n height: \"11\",\n x: \"3\",\n y: \"11\",\n rx: \"2\",\n ry: \"2\",\n key: \"1w4ew1\"\n }\n ],\n [\n \"path\",\n {\n d: \"M7 11V7a5 5 0 0 1 9.9-1\",\n key: \"1mm8w8\"\n }\n ]\n]);\n //# sourceMappingURL=lock-open.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2xvY2stb3Blbi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLGlCQUFXLGdFQUFnQixDQUFDLFVBQVk7SUFDNUM7UUFBQyxNQUFRO1FBQUE7WUFBRSxLQUFPLE9BQU07WUFBQSxPQUFRLEtBQU07WUFBQSxHQUFHLENBQUs7WUFBQSxHQUFHO1lBQU0sQ0FBSSxPQUFLO1lBQUEsR0FBSSxJQUFLO1lBQUEsSUFBSztRQUFBLENBQVU7S0FBQTtJQUN4RjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBMkI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ3pEIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2xvY2stb3Blbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIExvY2tPcGVuXG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjbVZqZENCM2FXUjBhRDBpTVRnaUlHaGxhV2RvZEQwaU1URWlJSGc5SWpNaUlIazlJakV4SWlCeWVEMGlNaUlnY25rOUlqSWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaVRUY2dNVEZXTjJFMUlEVWdNQ0F3SURFZ09TNDVMVEVpSUM4K0Nqd3ZjM1puUGdvPSkgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvbG9jay1vcGVuXG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgTG9ja09wZW4gPSBjcmVhdGVMdWNpZGVJY29uKCdMb2NrT3BlbicsIFtcbiAgWydyZWN0JywgeyB3aWR0aDogJzE4JywgaGVpZ2h0OiAnMTEnLCB4OiAnMycsIHk6ICcxMScsIHJ4OiAnMicsIHJ5OiAnMicsIGtleTogJzF3NGV3MScgfV0sXG4gIFsncGF0aCcsIHsgZDogJ003IDExVjdhNSA1IDAgMCAxIDkuOS0xJywga2V5OiAnMW1tOHc4JyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBMb2NrT3BlbjtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/lock-open.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/lock.js": -/*!**********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/lock.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Lock)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Lock = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Lock\", [\n [\n \"rect\",\n {\n width: \"18\",\n height: \"11\",\n x: \"3\",\n y: \"11\",\n rx: \"2\",\n ry: \"2\",\n key: \"1w4ew1\"\n }\n ],\n [\n \"path\",\n {\n d: \"M7 11V7a5 5 0 0 1 10 0v4\",\n key: \"fwvmzm\"\n }\n ]\n]);\n //# sourceMappingURL=lock.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL2xvY2suanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxhQUFPLGdFQUFnQixDQUFDLE1BQVE7SUFDcEM7UUFBQyxNQUFRO1FBQUE7WUFBRSxLQUFPLE9BQU07WUFBQSxPQUFRLEtBQU07WUFBQSxHQUFHLENBQUs7WUFBQSxHQUFHO1lBQU0sQ0FBSSxPQUFLO1lBQUEsR0FBSSxJQUFLO1lBQUEsSUFBSztRQUFBLENBQVU7S0FBQTtJQUN4RjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBNEI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQzFEIiwic291cmNlcyI6WyIvc3JjL2ljb25zL2xvY2sudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBMb2NrXG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjbVZqZENCM2FXUjBhRDBpTVRnaUlHaGxhV2RvZEQwaU1URWlJSGc5SWpNaUlIazlJakV4SWlCeWVEMGlNaUlnY25rOUlqSWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaVRUY2dNVEZXTjJFMUlEVWdNQ0F3SURFZ01UQWdNSFkwSWlBdlBnbzhMM04yWno0SykgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvbG9ja1xuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IExvY2sgPSBjcmVhdGVMdWNpZGVJY29uKCdMb2NrJywgW1xuICBbJ3JlY3QnLCB7IHdpZHRoOiAnMTgnLCBoZWlnaHQ6ICcxMScsIHg6ICczJywgeTogJzExJywgcng6ICcyJywgcnk6ICcyJywga2V5OiAnMXc0ZXcxJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTcgMTFWN2E1IDUgMCAwIDEgMTAgMHY0Jywga2V5OiAnZnd2bXptJyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBMb2NrO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/lock.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/menu.js": -/*!**********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/menu.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Menu)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Menu = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Menu\", [\n [\n \"line\",\n {\n x1: \"4\",\n x2: \"20\",\n y1: \"12\",\n y2: \"12\",\n key: \"1e0a9i\"\n }\n ],\n [\n \"line\",\n {\n x1: \"4\",\n x2: \"20\",\n y1: \"6\",\n y2: \"6\",\n key: \"1owob3\"\n }\n ],\n [\n \"line\",\n {\n x1: \"4\",\n x2: \"20\",\n y1: \"18\",\n y2: \"18\",\n key: \"yk5zj1\"\n }\n ]\n]);\n //# sourceMappingURL=menu.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL21lbnUuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxhQUFPLGdFQUFnQixDQUFDLE1BQVE7SUFDcEM7UUFBQztRQUFRLENBQUU7WUFBQSxJQUFJLENBQUs7WUFBQSxJQUFJLENBQU07WUFBQSxHQUFJLEtBQU07WUFBQSxHQUFJLEtBQU07WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ2pFO1FBQUM7UUFBUSxDQUFFO1lBQUEsSUFBSSxDQUFLO1lBQUEsSUFBSSxDQUFNO1lBQUEsR0FBSSxJQUFLO1lBQUEsR0FBSSxJQUFLO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUMvRDtRQUFDO1FBQVEsQ0FBRTtZQUFBLElBQUksQ0FBSztZQUFBLElBQUksQ0FBTTtZQUFBLEdBQUksS0FBTTtZQUFBLEdBQUksS0FBTTtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7Q0FDbEUiLCJzb3VyY2VzIjpbIi9zcmMvaWNvbnMvbWVudS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIE1lbnVcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGJHbHVaU0I0TVQwaU5DSWdlREk5SWpJd0lpQjVNVDBpTVRJaUlIa3lQU0l4TWlJZ0x6NEtJQ0E4YkdsdVpTQjRNVDBpTkNJZ2VESTlJakl3SWlCNU1UMGlOaUlnZVRJOUlqWWlJQzgrQ2lBZ1BHeHBibVVnZURFOUlqUWlJSGd5UFNJeU1DSWdlVEU5SWpFNElpQjVNajBpTVRnaUlDOCtDand2YzNablBnbz0pIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL21lbnVcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBNZW51ID0gY3JlYXRlTHVjaWRlSWNvbignTWVudScsIFtcbiAgWydsaW5lJywgeyB4MTogJzQnLCB4MjogJzIwJywgeTE6ICcxMicsIHkyOiAnMTInLCBrZXk6ICcxZTBhOWknIH1dLFxuICBbJ2xpbmUnLCB7IHgxOiAnNCcsIHgyOiAnMjAnLCB5MTogJzYnLCB5MjogJzYnLCBrZXk6ICcxb3dvYjMnIH1dLFxuICBbJ2xpbmUnLCB7IHgxOiAnNCcsIHgyOiAnMjAnLCB5MTogJzE4JywgeTI6ICcxOCcsIGtleTogJ3lrNXpqMScgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgTWVudTtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/menu.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/package-plus.js": -/*!******************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/package-plus.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ PackagePlus)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst PackagePlus = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"PackagePlus\", [\n [\n \"path\",\n {\n d: \"M16 16h6\",\n key: \"100bgy\"\n }\n ],\n [\n \"path\",\n {\n d: \"M19 13v6\",\n key: \"85cyf1\"\n }\n ],\n [\n \"path\",\n {\n d: \"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14\",\n key: \"e7tb2h\"\n }\n ],\n [\n \"path\",\n {\n d: \"m7.5 4.27 9 5.15\",\n key: \"1c824w\"\n }\n ],\n [\n \"polyline\",\n {\n points: \"3.29 7 12 12 20.71 7\",\n key: \"ousv84\"\n }\n ],\n [\n \"line\",\n {\n x1: \"12\",\n x2: \"12\",\n y1: \"22\",\n y2: \"12\",\n key: \"a4e8g8\"\n }\n ]\n]);\n //# sourceMappingURL=package-plus.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3BhY2thZ2UtcGx1cy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLG9CQUFjLGdFQUFnQixDQUFDLGFBQWU7SUFDbEQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQVk7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ3pDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFZO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUN6QztRQUNFO1FBQ0E7WUFDRSxDQUFHO1lBQ0gsR0FBSztRQUNQO0tBQ0Y7SUFDQTtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBb0I7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ2pEO1FBQUMsVUFBWTtRQUFBO1lBQUUsUUFBUSxDQUF3QjtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDOUQ7UUFBQztRQUFRLENBQUU7WUFBQSxJQUFJLENBQU07WUFBQSxJQUFJLENBQU07WUFBQSxHQUFJLEtBQU07WUFBQSxHQUFJLEtBQU07WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ25FIiwic291cmNlcyI6WyIvc3JjL2ljb25zL3BhY2thZ2UtcGx1cy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIFBhY2thZ2VQbHVzXG4gKiBAZGVzY3JpcHRpb24gTHVjaWRlIFNWRyBpY29uIGNvbXBvbmVudCwgcmVuZGVycyBTVkcgRWxlbWVudCB3aXRoIGNoaWxkcmVuLlxuICpcbiAqIEBwcmV2aWV3ICFbaW1nXShkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LFBITjJaeUFnZUcxc2JuTTlJbWgwZEhBNkx5OTNkM2N1ZHpNdWIzSm5Mekl3TURBdmMzWm5JZ29nSUhkcFpIUm9QU0l5TkNJS0lDQm9aV2xuYUhROUlqSTBJZ29nSUhacFpYZENiM2c5SWpBZ01DQXlOQ0F5TkNJS0lDQm1hV3hzUFNKdWIyNWxJZ29nSUhOMGNtOXJaVDBpSXpBd01DSWdjM1I1YkdVOUltSmhZMnRuY205MWJtUXRZMjlzYjNJNklDTm1abVk3SUdKdmNtUmxjaTF5WVdScGRYTTZJREp3ZUNJS0lDQnpkSEp2YTJVdGQybGtkR2c5SWpJaUNpQWdjM1J5YjJ0bExXeHBibVZqWVhBOUluSnZkVzVrSWdvZ0lITjBjbTlyWlMxc2FXNWxhbTlwYmowaWNtOTFibVFpQ2o0S0lDQThjR0YwYUNCa1BTSk5NVFlnTVRab05pSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk1Ua2dNVE4yTmlJZ0x6NEtJQ0E4Y0dGMGFDQmtQU0pOTWpFZ01UQldPR0V5SURJZ01DQXdJREF0TVMweExqY3piQzAzTFRSaE1pQXlJREFnTUNBd0xUSWdNR3d0TnlBMFFUSWdNaUF3SURBZ01DQXpJRGgyT0dFeUlESWdNQ0F3SURBZ01TQXhMamN6YkRjZ05HRXlJRElnTUNBd0lEQWdNaUF3YkRJdE1TNHhOQ0lnTHo0S0lDQThjR0YwYUNCa1BTSnROeTQxSURRdU1qY2dPU0ExTGpFMUlpQXZQZ29nSUR4d2IyeDViR2x1WlNCd2IybHVkSE05SWpNdU1qa2dOeUF4TWlBeE1pQXlNQzQzTVNBM0lpQXZQZ29nSUR4c2FXNWxJSGd4UFNJeE1pSWdlREk5SWpFeUlpQjVNVDBpTWpJaUlIa3lQU0l4TWlJZ0x6NEtQQzl6ZG1jK0NnPT0pIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL3BhY2thZ2UtcGx1c1xuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IFBhY2thZ2VQbHVzID0gY3JlYXRlTHVjaWRlSWNvbignUGFja2FnZVBsdXMnLCBbXG4gIFsncGF0aCcsIHsgZDogJ00xNiAxNmg2Jywga2V5OiAnMTAwYmd5JyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTE5IDEzdjYnLCBrZXk6ICc4NWN5ZjEnIH1dLFxuICBbXG4gICAgJ3BhdGgnLFxuICAgIHtcbiAgICAgIGQ6ICdNMjEgMTBWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDItMS4xNCcsXG4gICAgICBrZXk6ICdlN3RiMmgnLFxuICAgIH0sXG4gIF0sXG4gIFsncGF0aCcsIHsgZDogJ203LjUgNC4yNyA5IDUuMTUnLCBrZXk6ICcxYzgyNHcnIH1dLFxuICBbJ3BvbHlsaW5lJywgeyBwb2ludHM6ICczLjI5IDcgMTIgMTIgMjAuNzEgNycsIGtleTogJ291c3Y4NCcgfV0sXG4gIFsnbGluZScsIHsgeDE6ICcxMicsIHgyOiAnMTInLCB5MTogJzIyJywgeTI6ICcxMicsIGtleTogJ2E0ZThnOCcgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFja2FnZVBsdXM7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/package-plus.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/plug-2.js": -/*!************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/plug-2.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Plug2)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Plug2 = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Plug2\", [\n [\n \"path\",\n {\n d: \"M9 2v6\",\n key: \"17ngun\"\n }\n ],\n [\n \"path\",\n {\n d: \"M15 2v6\",\n key: \"s7yy2p\"\n }\n ],\n [\n \"path\",\n {\n d: \"M12 17v5\",\n key: \"bb1du9\"\n }\n ],\n [\n \"path\",\n {\n d: \"M5 8h14\",\n key: \"pcz4l3\"\n }\n ],\n [\n \"path\",\n {\n d: \"M6 11V8h12v3a6 6 0 1 1-12 0v0Z\",\n key: \"nd4hoy\"\n }\n ]\n]);\n //# sourceMappingURL=plug-2.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3BsdWctMi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLGNBQVEsZ0VBQWdCLENBQUMsT0FBUztJQUN0QztRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBVTtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDdkM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQVc7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ3hDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFZO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUN6QztRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBVztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDeEM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWtDO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUNoRSIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9wbHVnLTIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyZWF0ZUx1Y2lkZUljb24gZnJvbSAnLi4vY3JlYXRlTHVjaWRlSWNvbic7XG5cbi8qKlxuICogQGNvbXBvbmVudCBAbmFtZSBQbHVnMlxuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4Y0dGMGFDQmtQU0pOT1NBeWRqWWlJQzgrQ2lBZ1BIQmhkR2dnWkQwaVRURTFJREoyTmlJZ0x6NEtJQ0E4Y0dGMGFDQmtQU0pOTVRJZ01UZDJOU0lnTHo0S0lDQThjR0YwYUNCa1BTSk5OU0E0YURFMElpQXZQZ29nSUR4d1lYUm9JR1E5SWswMklERXhWamhvTVRKMk0yRTJJRFlnTUNBeElERXRNVElnTUhZd1dpSWdMejRLUEM5emRtYytDZz09KSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9wbHVnLTJcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBQbHVnMiA9IGNyZWF0ZUx1Y2lkZUljb24oJ1BsdWcyJywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdNOSAydjYnLCBrZXk6ICcxN25ndW4nIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMTUgMnY2Jywga2V5OiAnczd5eTJwJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTEyIDE3djUnLCBrZXk6ICdiYjFkdTknIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNNSA4aDE0Jywga2V5OiAncGN6NGwzJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTYgMTFWOGgxMnYzYTYgNiAwIDEgMS0xMiAwdjBaJywga2V5OiAnbmQ0aG95JyB9XSxcbl0pO1xuXG5leHBvcnQgZGVmYXVsdCBQbHVnMjtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/plug-2.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/plus.js": -/*!**********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/plus.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Plus)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Plus = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Plus\", [\n [\n \"path\",\n {\n d: \"M5 12h14\",\n key: \"1ays0h\"\n }\n ],\n [\n \"path\",\n {\n d: \"M12 5v14\",\n key: \"s699le\"\n }\n ]\n]);\n //# sourceMappingURL=plus.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3BsdXMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxhQUFPLGdFQUFnQixDQUFDLE1BQVE7SUFDcEM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQVk7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQ3pDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFZO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUMxQyIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy9wbHVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgUGx1c1xuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4Y0dGMGFDQmtQU0pOTlNBeE1tZ3hOQ0lnTHo0S0lDQThjR0YwYUNCa1BTSk5NVElnTlhZeE5DSWdMejRLUEM5emRtYytDZz09KSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9wbHVzXG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgUGx1cyA9IGNyZWF0ZUx1Y2lkZUljb24oJ1BsdXMnLCBbXG4gIFsncGF0aCcsIHsgZDogJ001IDEyaDE0Jywga2V5OiAnMWF5czBoJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTEyIDV2MTQnLCBrZXk6ICdzNjk5bGUnIH1dLFxuXSk7XG5cbmV4cG9ydCBkZWZhdWx0IFBsdXM7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/plus.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/rotate-cw.js": -/*!***************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/rotate-cw.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ RotateCw)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst RotateCw = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"RotateCw\", [\n [\n \"path\",\n {\n d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\",\n key: \"1p45f6\"\n }\n ],\n [\n \"path\",\n {\n d: \"M21 3v5h-5\",\n key: \"1q7to0\"\n }\n ]\n]);\n //# sourceMappingURL=rotate-cw.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3JvdGF0ZS1jdy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLGlCQUFXLGdFQUFnQixDQUFDLFVBQVk7SUFDNUM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQXFEO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUNsRjtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBYztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7Q0FDNUMiLCJzb3VyY2VzIjpbIi9zcmMvaWNvbnMvcm90YXRlLWN3LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgUm90YXRlQ3dcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKTk1qRWdNVEpoT1NBNUlEQWdNU0F4TFRrdE9XTXlMalV5SURBZ05DNDVNeUF4SURZdU56UWdNaTQzTkV3eU1TQTRJaUF2UGdvZ0lEeHdZWFJvSUdROUlrMHlNU0F6ZGpWb0xUVWlJQzgrQ2p3dmMzWm5QZ289KSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy9yb3RhdGUtY3dcbiAqIEBzZWUgaHR0cHM6Ly9sdWNpZGUuZGV2L2d1aWRlL3BhY2thZ2VzL2x1Y2lkZS1yZWFjdCAtIERvY3VtZW50YXRpb25cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgLSBMdWNpZGUgaWNvbnMgcHJvcHMgYW5kIGFueSB2YWxpZCBTVkcgYXR0cmlidXRlXG4gKiBAcmV0dXJucyB7SlNYLkVsZW1lbnR9IEpTWCBFbGVtZW50XG4gKlxuICovXG5jb25zdCBSb3RhdGVDdyA9IGNyZWF0ZUx1Y2lkZUljb24oJ1JvdGF0ZUN3JywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdNMjEgMTJhOSA5IDAgMSAxLTktOWMyLjUyIDAgNC45MyAxIDYuNzQgMi43NEwyMSA4Jywga2V5OiAnMXA0NWY2JyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTIxIDN2NWgtNScsIGtleTogJzFxN3RvMCcgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgUm90YXRlQ3c7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/rotate-cw.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/sheet.js": -/*!***********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/sheet.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Sheet)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Sheet = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Sheet\", [\n [\n \"rect\",\n {\n width: \"18\",\n height: \"18\",\n x: \"3\",\n y: \"3\",\n rx: \"2\",\n ry: \"2\",\n key: \"1m3agn\"\n }\n ],\n [\n \"line\",\n {\n x1: \"3\",\n x2: \"21\",\n y1: \"9\",\n y2: \"9\",\n key: \"1vqk6q\"\n }\n ],\n [\n \"line\",\n {\n x1: \"3\",\n x2: \"21\",\n y1: \"15\",\n y2: \"15\",\n key: \"o2sbyz\"\n }\n ],\n [\n \"line\",\n {\n x1: \"9\",\n x2: \"9\",\n y1: \"9\",\n y2: \"21\",\n key: \"1ib60c\"\n }\n ],\n [\n \"line\",\n {\n x1: \"15\",\n x2: \"15\",\n y1: \"9\",\n y2: \"21\",\n key: \"1n26ft\"\n }\n ]\n]);\n //# sourceMappingURL=sheet.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3NoZWV0LmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBYU0sY0FBUSxnRUFBZ0IsQ0FBQyxPQUFTO0lBQ3RDO1FBQUMsTUFBUTtRQUFBO1lBQUUsS0FBTyxPQUFNO1lBQUEsT0FBUSxLQUFNO1lBQUEsR0FBRyxDQUFLO1lBQUEsR0FBRztZQUFLLENBQUksT0FBSztZQUFBLEdBQUksSUFBSztZQUFBLElBQUs7UUFBQSxDQUFVO0tBQUE7SUFDdkY7UUFBQztRQUFRLENBQUU7WUFBQSxJQUFJLENBQUs7WUFBQSxJQUFJLENBQU07WUFBQSxHQUFJLElBQUs7WUFBQSxHQUFJLElBQUs7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQy9EO1FBQUM7UUFBUSxDQUFFO1lBQUEsSUFBSSxDQUFLO1lBQUEsSUFBSSxDQUFNO1lBQUEsR0FBSSxLQUFNO1lBQUEsR0FBSSxLQUFNO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUNqRTtRQUFDO1FBQVEsQ0FBRTtZQUFBLElBQUksQ0FBSztZQUFBLElBQUksQ0FBSztZQUFBLEdBQUksSUFBSztZQUFBLEdBQUksS0FBTTtZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDL0Q7UUFBQztRQUFRLENBQUU7WUFBQSxJQUFJLENBQU07WUFBQSxJQUFJLENBQU07WUFBQSxHQUFJLElBQUs7WUFBQSxHQUFJLEtBQU07WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQ2xFIiwic291cmNlcyI6WyIvc3JjL2ljb25zL3NoZWV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgU2hlZXRcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNtVmpkQ0IzYVdSMGFEMGlNVGdpSUdobGFXZG9kRDBpTVRnaUlIZzlJak1pSUhrOUlqTWlJSEo0UFNJeUlpQnllVDBpTWlJZ0x6NEtJQ0E4YkdsdVpTQjRNVDBpTXlJZ2VESTlJakl4SWlCNU1UMGlPU0lnZVRJOUlqa2lJQzgrQ2lBZ1BHeHBibVVnZURFOUlqTWlJSGd5UFNJeU1TSWdlVEU5SWpFMUlpQjVNajBpTVRVaUlDOCtDaUFnUEd4cGJtVWdlREU5SWpraUlIZ3lQU0k1SWlCNU1UMGlPU0lnZVRJOUlqSXhJaUF2UGdvZ0lEeHNhVzVsSUhneFBTSXhOU0lnZURJOUlqRTFJaUI1TVQwaU9TSWdlVEk5SWpJeElpQXZQZ284TDNOMlp6NEspIC0gaHR0cHM6Ly9sdWNpZGUuZGV2L2ljb25zL3NoZWV0XG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgU2hlZXQgPSBjcmVhdGVMdWNpZGVJY29uKCdTaGVldCcsIFtcbiAgWydyZWN0JywgeyB3aWR0aDogJzE4JywgaGVpZ2h0OiAnMTgnLCB4OiAnMycsIHk6ICczJywgcng6ICcyJywgcnk6ICcyJywga2V5OiAnMW0zYWduJyB9XSxcbiAgWydsaW5lJywgeyB4MTogJzMnLCB4MjogJzIxJywgeTE6ICc5JywgeTI6ICc5Jywga2V5OiAnMXZxazZxJyB9XSxcbiAgWydsaW5lJywgeyB4MTogJzMnLCB4MjogJzIxJywgeTE6ICcxNScsIHkyOiAnMTUnLCBrZXk6ICdvMnNieXonIH1dLFxuICBbJ2xpbmUnLCB7IHgxOiAnOScsIHgyOiAnOScsIHkxOiAnOScsIHkyOiAnMjEnLCBrZXk6ICcxaWI2MGMnIH1dLFxuICBbJ2xpbmUnLCB7IHgxOiAnMTUnLCB4MjogJzE1JywgeTE6ICc5JywgeTI6ICcyMScsIGtleTogJzFuMjZmdCcgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgU2hlZXQ7XG4iXSwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/sheet.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/shield-ellipsis.js": -/*!*********************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/shield-ellipsis.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ShieldEllipsis)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst ShieldEllipsis = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"ShieldEllipsis\", [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\"\n }\n ],\n [\n \"path\",\n {\n d: \"M8 12h.01\",\n key: \"czm47f\"\n }\n ],\n [\n \"path\",\n {\n d: \"M12 12h.01\",\n key: \"1mp3jc\"\n }\n ],\n [\n \"path\",\n {\n d: \"M16 12h.01\",\n key: \"1l6xoz\"\n }\n ]\n]);\n //# sourceMappingURL=shield-ellipsis.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3NoaWVsZC1lbGxpcHNpcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLHVCQUFpQixnRUFBZ0IsQ0FBQyxnQkFBa0I7SUFDeEQ7UUFDRTtRQUNBO1lBQ0UsQ0FBRztZQUNILEdBQUs7UUFDUDtLQUNGO0lBQ0E7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWE7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQzFDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFjO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUMzQztRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBYztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7Q0FDNUMiLCJzb3VyY2VzIjpbIi9zcmMvaWNvbnMvc2hpZWxkLWVsbGlwc2lzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgU2hpZWxkRWxsaXBzaXNcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKTk1qQWdNVE5qTUNBMUxUTXVOU0EzTGpVdE55NDJOaUE0TGprMVlURWdNU0F3SURBZ01TMHVOamN0TGpBeFF6Y3VOU0F5TUM0MUlEUWdNVGdnTkNBeE0xWTJZVEVnTVNBd0lEQWdNU0F4TFRGak1pQXdJRFF1TlMweExqSWdOaTR5TkMweUxqY3lZVEV1TVRjZ01TNHhOeUF3SURBZ01TQXhMalV5SURCRE1UUXVOVEVnTXk0NE1TQXhOeUExSURFNUlEVmhNU0F4SURBZ01DQXhJREVnTVhvaUlDOCtDaUFnUEhCaGRHZ2daRDBpVFRnZ01USm9MakF4SWlBdlBnb2dJRHh3WVhSb0lHUTlJazB4TWlBeE1tZ3VNREVpSUM4K0NpQWdQSEJoZEdnZ1pEMGlUVEUySURFeWFDNHdNU0lnTHo0S1BDOXpkbWMrQ2c9PSkgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvc2hpZWxkLWVsbGlwc2lzXG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgU2hpZWxkRWxsaXBzaXMgPSBjcmVhdGVMdWNpZGVJY29uKCdTaGllbGRFbGxpcHNpcycsIFtcbiAgW1xuICAgICdwYXRoJyxcbiAgICB7XG4gICAgICBkOiAnTTIwIDEzYzAgNS0zLjUgNy41LTcuNjYgOC45NWExIDEgMCAwIDEtLjY3LS4wMUM3LjUgMjAuNSA0IDE4IDQgMTNWNmExIDEgMCAwIDEgMS0xYzIgMCA0LjUtMS4yIDYuMjQtMi43MmExLjE3IDEuMTcgMCAwIDEgMS41MiAwQzE0LjUxIDMuODEgMTcgNSAxOSA1YTEgMSAwIDAgMSAxIDF6JyxcbiAgICAgIGtleTogJ29lbDQxeScsXG4gICAgfSxcbiAgXSxcbiAgWydwYXRoJywgeyBkOiAnTTggMTJoLjAxJywga2V5OiAnY3ptNDdmJyB9XSxcbiAgWydwYXRoJywgeyBkOiAnTTEyIDEyaC4wMScsIGtleTogJzFtcDNqYycgfV0sXG4gIFsncGF0aCcsIHsgZDogJ00xNiAxMmguMDEnLCBrZXk6ICcxbDZ4b3onIH1dLFxuXSk7XG5cbmV4cG9ydCBkZWZhdWx0IFNoaWVsZEVsbGlwc2lzO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/shield-ellipsis.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/square-gantt-chart.js": -/*!************************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/square-gantt-chart.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ SquareGanttChart)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst SquareGanttChart = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"SquareGanttChart\", [\n [\n \"rect\",\n {\n width: \"18\",\n height: \"18\",\n x: \"3\",\n y: \"3\",\n rx: \"2\",\n key: \"afitv7\"\n }\n ],\n [\n \"path\",\n {\n d: \"M9 8h7\",\n key: \"kbo1nt\"\n }\n ],\n [\n \"path\",\n {\n d: \"M8 12h6\",\n key: \"ikassy\"\n }\n ],\n [\n \"path\",\n {\n d: \"M11 16h5\",\n key: \"oq65wt\"\n }\n ]\n]);\n //# sourceMappingURL=square-gantt-chart.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3NxdWFyZS1nYW50dC1jaGFydC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQWFNLHlCQUFtQixnRUFBZ0IsQ0FBQyxrQkFBb0I7SUFDNUQ7UUFBQyxPQUFRO1FBQUE7WUFBRSxPQUFPO1lBQU0sQ0FBUTtZQUFNLENBQUc7WUFBSyxHQUFHLENBQUs7WUFBQSxJQUFJLENBQUs7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQzlFO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFVO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUN2QztRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBVztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDeEM7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQVk7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQzFDIiwic291cmNlcyI6WyIvc3JjL2ljb25zL3NxdWFyZS1nYW50dC1jaGFydC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTHVjaWRlSWNvbiBmcm9tICcuLi9jcmVhdGVMdWNpZGVJY29uJztcblxuLyoqXG4gKiBAY29tcG9uZW50IEBuYW1lIFNxdWFyZUdhbnR0Q2hhcnRcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNtVmpkQ0IzYVdSMGFEMGlNVGdpSUdobGFXZG9kRDBpTVRnaUlIZzlJak1pSUhrOUlqTWlJSEo0UFNJeUlpQXZQZ29nSUR4d1lYUm9JR1E5SWswNUlEaG9OeUlnTHo0S0lDQThjR0YwYUNCa1BTSk5PQ0F4TW1nMklpQXZQZ29nSUR4d1lYUm9JR1E5SWsweE1TQXhObWcxSWlBdlBnbzhMM04yWno0SykgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMvc3F1YXJlLWdhbnR0LWNoYXJ0XG4gKiBAc2VlIGh0dHBzOi8vbHVjaWRlLmRldi9ndWlkZS9wYWNrYWdlcy9sdWNpZGUtcmVhY3QgLSBEb2N1bWVudGF0aW9uXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IHByb3BzIC0gTHVjaWRlIGljb25zIHByb3BzIGFuZCBhbnkgdmFsaWQgU1ZHIGF0dHJpYnV0ZVxuICogQHJldHVybnMge0pTWC5FbGVtZW50fSBKU1ggRWxlbWVudFxuICpcbiAqL1xuY29uc3QgU3F1YXJlR2FudHRDaGFydCA9IGNyZWF0ZUx1Y2lkZUljb24oJ1NxdWFyZUdhbnR0Q2hhcnQnLCBbXG4gIFsncmVjdCcsIHsgd2lkdGg6ICcxOCcsIGhlaWdodDogJzE4JywgeDogJzMnLCB5OiAnMycsIHJ4OiAnMicsIGtleTogJ2FmaXR2NycgfV0sXG4gIFsncGF0aCcsIHsgZDogJ005IDhoNycsIGtleTogJ2tibzFudCcgfV0sXG4gIFsncGF0aCcsIHsgZDogJ004IDEyaDYnLCBrZXk6ICdpa2Fzc3knIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMTEgMTZoNScsIGtleTogJ29xNjV3dCcgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgU3F1YXJlR2FudHRDaGFydDtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/square-gantt-chart.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/users.js": -/*!***********************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/users.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Users)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst Users = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"Users\", [\n [\n \"path\",\n {\n d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\",\n key: \"1yyitq\"\n }\n ],\n [\n \"circle\",\n {\n cx: \"9\",\n cy: \"7\",\n r: \"4\",\n key: \"nufk8\"\n }\n ],\n [\n \"path\",\n {\n d: \"M22 21v-2a4 4 0 0 0-3-3.87\",\n key: \"kshegd\"\n }\n ],\n [\n \"path\",\n {\n d: \"M16 3.13a4 4 0 0 1 0 7.75\",\n key: \"1da9ce\"\n }\n ]\n]);\n //# sourceMappingURL=users.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3VzZXJzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBYU0sY0FBUSxnRUFBZ0IsQ0FBQyxPQUFTO0lBQ3RDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUE2QztZQUFBLEtBQUs7UUFBQSxDQUFVO0tBQUE7SUFDMUU7UUFBQyxRQUFVO1FBQUE7WUFBRSxFQUFJO1lBQUssQ0FBSSxPQUFLO1lBQUEsQ0FBRztZQUFLLEdBQUs7UUFBQSxDQUFTO0tBQUE7SUFDckQ7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQThCO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtJQUMzRDtRQUFDLE1BQVE7UUFBQTtZQUFFLEdBQUcsQ0FBNkI7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0NBQzNEIiwic291cmNlcyI6WyIvc3JjL2ljb25zL3VzZXJzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgVXNlcnNcbiAqIEBkZXNjcmlwdGlvbiBMdWNpZGUgU1ZHIGljb24gY29tcG9uZW50LCByZW5kZXJzIFNWRyBFbGVtZW50IHdpdGggY2hpbGRyZW4uXG4gKlxuICogQHByZXZpZXcgIVtpbWddKGRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QWdlRzFzYm5NOUltaDBkSEE2THk5M2QzY3Vkek11YjNKbkx6SXdNREF2YzNabklnb2dJSGRwWkhSb1BTSXlOQ0lLSUNCb1pXbG5hSFE5SWpJMElnb2dJSFpwWlhkQ2IzZzlJakFnTUNBeU5DQXlOQ0lLSUNCbWFXeHNQU0p1YjI1bElnb2dJSE4wY205clpUMGlJekF3TUNJZ2MzUjViR1U5SW1KaFkydG5jbTkxYm1RdFkyOXNiM0k2SUNObVptWTdJR0p2Y21SbGNpMXlZV1JwZFhNNklESndlQ0lLSUNCemRISnZhMlV0ZDJsa2RHZzlJaklpQ2lBZ2MzUnliMnRsTFd4cGJtVmpZWEE5SW5KdmRXNWtJZ29nSUhOMGNtOXJaUzFzYVc1bGFtOXBiajBpY205MWJtUWlDajRLSUNBOGNHRjBhQ0JrUFNKTk1UWWdNakYyTFRKaE5DQTBJREFnTUNBd0xUUXRORWcyWVRRZ05DQXdJREFnTUMwMElEUjJNaUlnTHo0S0lDQThZMmx5WTJ4bElHTjRQU0k1SWlCamVUMGlOeUlnY2owaU5DSWdMejRLSUNBOGNHRjBhQ0JrUFNKTk1qSWdNakYyTFRKaE5DQTBJREFnTUNBd0xUTXRNeTQ0TnlJZ0x6NEtJQ0E4Y0dGMGFDQmtQU0pOTVRZZ015NHhNMkUwSURRZ01DQXdJREVnTUNBM0xqYzFJaUF2UGdvOEwzTjJaejRLKSAtIGh0dHBzOi8vbHVjaWRlLmRldi9pY29ucy91c2Vyc1xuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IFVzZXJzID0gY3JlYXRlTHVjaWRlSWNvbignVXNlcnMnLCBbXG4gIFsncGF0aCcsIHsgZDogJ00xNiAyMXYtMmE0IDQgMCAwIDAtNC00SDZhNCA0IDAgMCAwLTQgNHYyJywga2V5OiAnMXl5aXRxJyB9XSxcbiAgWydjaXJjbGUnLCB7IGN4OiAnOScsIGN5OiAnNycsIHI6ICc0Jywga2V5OiAnbnVmazgnIH1dLFxuICBbJ3BhdGgnLCB7IGQ6ICdNMjIgMjF2LTJhNCA0IDAgMCAwLTMtMy44NycsIGtleTogJ2tzaGVnZCcgfV0sXG4gIFsncGF0aCcsIHsgZDogJ00xNiAzLjEzYTQgNCAwIDAgMSAwIDcuNzUnLCBrZXk6ICcxZGE5Y2UnIH1dLFxuXSk7XG5cbmV4cG9ydCBkZWZhdWx0IFVzZXJzO1xuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/users.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/icons/x.js": -/*!*******************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/icons/x.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ X)\n/* harmony export */ });\n/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ \"./node_modules/lucide-react/dist/esm/createLucideIcon.js\");\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ \nconst X = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"X\", [\n [\n \"path\",\n {\n d: \"M18 6 6 18\",\n key: \"1bl5f8\"\n }\n ],\n [\n \"path\",\n {\n d: \"m6 6 12 12\",\n key: \"d8bk6v\"\n }\n ]\n]);\n //# sourceMappingURL=x.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL2ljb25zL3guanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFhTSxVQUFJLGdFQUFnQixDQUFDLEdBQUs7SUFDOUI7UUFBQyxNQUFRO1FBQUE7WUFBRSxHQUFHLENBQWM7WUFBQSxLQUFLO1FBQUEsQ0FBVTtLQUFBO0lBQzNDO1FBQUMsTUFBUTtRQUFBO1lBQUUsR0FBRyxDQUFjO1lBQUEsS0FBSztRQUFBLENBQVU7S0FBQTtDQUM1QyIsInNvdXJjZXMiOlsiL3NyYy9pY29ucy94LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjcmVhdGVMdWNpZGVJY29uIGZyb20gJy4uL2NyZWF0ZUx1Y2lkZUljb24nO1xuXG4vKipcbiAqIEBjb21wb25lbnQgQG5hbWUgWFxuICogQGRlc2NyaXB0aW9uIEx1Y2lkZSBTVkcgaWNvbiBjb21wb25lbnQsIHJlbmRlcnMgU1ZHIEVsZW1lbnQgd2l0aCBjaGlsZHJlbi5cbiAqXG4gKiBAcHJldmlldyAhW2ltZ10oZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCxQSE4yWnlBZ2VHMXNibk05SW1oMGRIQTZMeTkzZDNjdWR6TXViM0puTHpJd01EQXZjM1puSWdvZ0lIZHBaSFJvUFNJeU5DSUtJQ0JvWldsbmFIUTlJakkwSWdvZ0lIWnBaWGRDYjNnOUlqQWdNQ0F5TkNBeU5DSUtJQ0JtYVd4c1BTSnViMjVsSWdvZ0lITjBjbTlyWlQwaUl6QXdNQ0lnYzNSNWJHVTlJbUpoWTJ0bmNtOTFibVF0WTI5c2IzSTZJQ05tWm1ZN0lHSnZjbVJsY2kxeVlXUnBkWE02SURKd2VDSUtJQ0J6ZEhKdmEyVXRkMmxrZEdnOUlqSWlDaUFnYzNSeWIydGxMV3hwYm1WallYQTlJbkp2ZFc1a0lnb2dJSE4wY205clpTMXNhVzVsYW05cGJqMGljbTkxYm1RaUNqNEtJQ0E4Y0dGMGFDQmtQU0pOTVRnZ05pQTJJREU0SWlBdlBnb2dJRHh3WVhSb0lHUTlJbTAySURZZ01USWdNVElpSUM4K0Nqd3ZjM1puUGdvPSkgLSBodHRwczovL2x1Y2lkZS5kZXYvaWNvbnMveFxuICogQHNlZSBodHRwczovL2x1Y2lkZS5kZXYvZ3VpZGUvcGFja2FnZXMvbHVjaWRlLXJlYWN0IC0gRG9jdW1lbnRhdGlvblxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyAtIEx1Y2lkZSBpY29ucyBwcm9wcyBhbmQgYW55IHZhbGlkIFNWRyBhdHRyaWJ1dGVcbiAqIEByZXR1cm5zIHtKU1guRWxlbWVudH0gSlNYIEVsZW1lbnRcbiAqXG4gKi9cbmNvbnN0IFggPSBjcmVhdGVMdWNpZGVJY29uKCdYJywgW1xuICBbJ3BhdGgnLCB7IGQ6ICdNMTggNiA2IDE4Jywga2V5OiAnMWJsNWY4JyB9XSxcbiAgWydwYXRoJywgeyBkOiAnbTYgNiAxMiAxMicsIGtleTogJ2Q4Yms2dicgfV0sXG5dKTtcblxuZXhwb3J0IGRlZmF1bHQgWDtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/icons/x.js\n"); - -/***/ }), - -/***/ "./node_modules/lucide-react/dist/esm/shared/src/utils.js": -/*!****************************************************************!*\ - !*** ./node_modules/lucide-react/dist/esm/shared/src/utils.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toKebabCase: () => (/* binding */ toKebabCase)\n/* harmony export */ });\n/**\n * @license lucide-react v0.366.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */ const toKebabCase = (string)=>string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n //# sourceMappingURL=utils.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbHVjaWRlLXJlYWN0L2Rpc3QvZXNtL3NoYXJlZC9zcmMvdXRpbHMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0lBTWEsb0JBQWMsQ0FBQyxNQUMxQixVQUFPLFFBQVEsQ0FBc0Isc0JBQU8sUUFBRSxDQUFZIiwic291cmNlcyI6WyIvc2hhcmVkL3NyYy91dGlscy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvbnZlcnRzIHN0cmluZyB0byBLZWJhYkNhc2VcbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gc3RyaW5nXG4gKiBAcmV0dXJucyB7c3RyaW5nfSBBIGtlYmFiaXplZCBzdHJpbmdcbiAqL1xuZXhwb3J0IGNvbnN0IHRvS2ViYWJDYXNlID0gKHN0cmluZzogc3RyaW5nKSA9PlxuICBzdHJpbmcucmVwbGFjZSgvKFthLXowLTldKShbQS1aXSkvZywgJyQxLSQyJykudG9Mb3dlckNhc2UoKTtcbiJdLCJuYW1lcyI6W10sImlnbm9yZUxpc3QiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/lucide-react/dist/esm/shared/src/utils.js\n"); - -/***/ }) - -}; -; \ No newline at end of file diff --git a/dsql-app/.local_dist/server/vendor-chunks/next.js b/dsql-app/.local_dist/server/vendor-chunks/next.js deleted file mode 100644 index b53d4e4..0000000 --- a/dsql-app/.local_dist/server/vendor-chunks/next.js +++ /dev/null @@ -1,473 +0,0 @@ -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -exports.id = "vendor-chunks/next"; -exports.ids = ["vendor-chunks/next"]; -exports.modules = { - -/***/ "./node_modules/next/dist/build/templates/helpers.js": -/*!***********************************************************!*\ - !*** ./node_modules/next/dist/build/templates/helpers.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -eval("/**\n * Hoists a name from a module or promised module.\n *\n * @param module the module to hoist the name from\n * @param name the name to hoist\n * @returns the value on the module (or promised module)\n */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"hoist\", ({\n enumerable: true,\n get: function() {\n return hoist;\n }\n}));\nfunction hoist(module, name) {\n // If the name is available in the module, return it.\n if (name in module) {\n return module[name];\n }\n // If a property called `then` exists, assume it's a promise and\n // return a promise that resolves to the name.\n if ('then' in module && typeof module.then === 'function') {\n return module.then((mod)=>hoist(mod, name));\n }\n // If we're trying to hoise the default export, and the module is a function,\n // return the module itself.\n if (typeof module === 'function' && name === 'default') {\n return module;\n }\n // Otherwise, return undefined.\n return undefined;\n}\n\n//# sourceMappingURL=helpers.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3RlbXBsYXRlcy9oZWxwZXJzLmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQWlCO0FBQ2pCLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLHlDQUF3QztBQUN4QztBQUNBO0FBQ0E7QUFDQTtBQUNBLENBQUMsRUFBQztBQUNGO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSIsInNvdXJjZXMiOlsiL2FwcC9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3RlbXBsYXRlcy9oZWxwZXJzLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSG9pc3RzIGEgbmFtZSBmcm9tIGEgbW9kdWxlIG9yIHByb21pc2VkIG1vZHVsZS5cbiAqXG4gKiBAcGFyYW0gbW9kdWxlIHRoZSBtb2R1bGUgdG8gaG9pc3QgdGhlIG5hbWUgZnJvbVxuICogQHBhcmFtIG5hbWUgdGhlIG5hbWUgdG8gaG9pc3RcbiAqIEByZXR1cm5zIHRoZSB2YWx1ZSBvbiB0aGUgbW9kdWxlIChvciBwcm9taXNlZCBtb2R1bGUpXG4gKi8gXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgICB2YWx1ZTogdHJ1ZVxufSk7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJob2lzdFwiLCB7XG4gICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICBnZXQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gaG9pc3Q7XG4gICAgfVxufSk7XG5mdW5jdGlvbiBob2lzdChtb2R1bGUsIG5hbWUpIHtcbiAgICAvLyBJZiB0aGUgbmFtZSBpcyBhdmFpbGFibGUgaW4gdGhlIG1vZHVsZSwgcmV0dXJuIGl0LlxuICAgIGlmIChuYW1lIGluIG1vZHVsZSkge1xuICAgICAgICByZXR1cm4gbW9kdWxlW25hbWVdO1xuICAgIH1cbiAgICAvLyBJZiBhIHByb3BlcnR5IGNhbGxlZCBgdGhlbmAgZXhpc3RzLCBhc3N1bWUgaXQncyBhIHByb21pc2UgYW5kXG4gICAgLy8gcmV0dXJuIGEgcHJvbWlzZSB0aGF0IHJlc29sdmVzIHRvIHRoZSBuYW1lLlxuICAgIGlmICgndGhlbicgaW4gbW9kdWxlICYmIHR5cGVvZiBtb2R1bGUudGhlbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICByZXR1cm4gbW9kdWxlLnRoZW4oKG1vZCk9PmhvaXN0KG1vZCwgbmFtZSkpO1xuICAgIH1cbiAgICAvLyBJZiB3ZSdyZSB0cnlpbmcgdG8gaG9pc2UgdGhlIGRlZmF1bHQgZXhwb3J0LCBhbmQgdGhlIG1vZHVsZSBpcyBhIGZ1bmN0aW9uLFxuICAgIC8vIHJldHVybiB0aGUgbW9kdWxlIGl0c2VsZi5cbiAgICBpZiAodHlwZW9mIG1vZHVsZSA9PT0gJ2Z1bmN0aW9uJyAmJiBuYW1lID09PSAnZGVmYXVsdCcpIHtcbiAgICAgICAgcmV0dXJuIG1vZHVsZTtcbiAgICB9XG4gICAgLy8gT3RoZXJ3aXNlLCByZXR1cm4gdW5kZWZpbmVkLlxuICAgIHJldHVybiB1bmRlZmluZWQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWhlbHBlcnMuanMubWFwIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6WzBdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/next/dist/build/templates/helpers.js\n"); - -/***/ }), - -/***/ "./node_modules/next/dist/client/request-idle-callback.js": -/*!****************************************************************!*\ - !*** ./node_modules/next/dist/client/request-idle-callback.js ***! - \****************************************************************/ -/***/ ((module, exports) => { - -"use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n cancelIdleCallback: function() {\n return cancelIdleCallback;\n },\n requestIdleCallback: function() {\n return requestIdleCallback;\n }\n});\nconst requestIdleCallback = typeof self !== 'undefined' && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {\n let start = Date.now();\n return self.setTimeout(function() {\n cb({\n didTimeout: false,\n timeRemaining: function() {\n return Math.max(0, 50 - (Date.now() - start));\n }\n });\n }, 1);\n};\nconst cancelIdleCallback = typeof self !== 'undefined' && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {\n return clearTimeout(id);\n};\nif ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=request-idle-callback.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NsaWVudC9yZXF1ZXN0LWlkbGUtY2FsbGJhY2suanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0lBZ0JhQSxrQkFBa0I7ZUFBbEJBOztJQWhCQUMsbUJBQW1CO2VBQW5CQTs7O0FBQU4sTUFBTUEsc0JBQ1YsT0FBT0MsU0FBUyxlQUNmQSxLQUFLRCxtQkFBbUIsSUFDeEJDLEtBQUtELG1CQUFtQixDQUFDRSxJQUFJLENBQUNDLFdBQ2hDLFNBQVVDLEVBQXVCO0lBQy9CLElBQUlDLFFBQVFDLEtBQUtDLEdBQUc7SUFDcEIsT0FBT04sS0FBS08sVUFBVSxDQUFDO1FBQ3JCSixHQUFHO1lBQ0RLLFlBQVk7WUFDWkMsZUFBZTtnQkFDYixPQUFPQyxLQUFLQyxHQUFHLENBQUMsR0FBRyxLQUFNTixDQUFBQSxLQUFLQyxHQUFHLEtBQUtGLEtBQUFBLENBQUk7WUFDNUM7UUFDRjtJQUNGLEdBQUc7QUFDTDtBQUVLLE1BQU1OLHFCQUNWLE9BQU9FLFNBQVMsZUFDZkEsS0FBS0Ysa0JBQWtCLElBQ3ZCRSxLQUFLRixrQkFBa0IsQ0FBQ0csSUFBSSxDQUFDQyxXQUMvQixTQUFVVSxFQUFVO0lBQ2xCLE9BQU9DLGFBQWFEO0FBQ3RCIiwic291cmNlcyI6WyIvc3JjL2NsaWVudC9yZXF1ZXN0LWlkbGUtY2FsbGJhY2sudHMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IHJlcXVlc3RJZGxlQ2FsbGJhY2sgPVxuICAodHlwZW9mIHNlbGYgIT09ICd1bmRlZmluZWQnICYmXG4gICAgc2VsZi5yZXF1ZXN0SWRsZUNhbGxiYWNrICYmXG4gICAgc2VsZi5yZXF1ZXN0SWRsZUNhbGxiYWNrLmJpbmQod2luZG93KSkgfHxcbiAgZnVuY3Rpb24gKGNiOiBJZGxlUmVxdWVzdENhbGxiYWNrKTogbnVtYmVyIHtcbiAgICBsZXQgc3RhcnQgPSBEYXRlLm5vdygpXG4gICAgcmV0dXJuIHNlbGYuc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICBjYih7XG4gICAgICAgIGRpZFRpbWVvdXQ6IGZhbHNlLFxuICAgICAgICB0aW1lUmVtYWluaW5nOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIE1hdGgubWF4KDAsIDUwIC0gKERhdGUubm93KCkgLSBzdGFydCkpXG4gICAgICAgIH0sXG4gICAgICB9KVxuICAgIH0sIDEpXG4gIH1cblxuZXhwb3J0IGNvbnN0IGNhbmNlbElkbGVDYWxsYmFjayA9XG4gICh0eXBlb2Ygc2VsZiAhPT0gJ3VuZGVmaW5lZCcgJiZcbiAgICBzZWxmLmNhbmNlbElkbGVDYWxsYmFjayAmJlxuICAgIHNlbGYuY2FuY2VsSWRsZUNhbGxiYWNrLmJpbmQod2luZG93KSkgfHxcbiAgZnVuY3Rpb24gKGlkOiBudW1iZXIpIHtcbiAgICByZXR1cm4gY2xlYXJUaW1lb3V0KGlkKVxuICB9XG4iXSwibmFtZXMiOlsiY2FuY2VsSWRsZUNhbGxiYWNrIiwicmVxdWVzdElkbGVDYWxsYmFjayIsInNlbGYiLCJiaW5kIiwid2luZG93IiwiY2IiLCJzdGFydCIsIkRhdGUiLCJub3ciLCJzZXRUaW1lb3V0IiwiZGlkVGltZW91dCIsInRpbWVSZW1haW5pbmciLCJNYXRoIiwibWF4IiwiaWQiLCJjbGVhclRpbWVvdXQiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/next/dist/client/request-idle-callback.js\n"); - -/***/ }), - -/***/ "./node_modules/next/dist/client/script.js": -/*!*************************************************!*\ - !*** ./node_modules/next/dist/client/script.js ***! - \*************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -"use strict"; -eval("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n default: function() {\n return _default;\n },\n handleClientScriptLoad: function() {\n return handleClientScriptLoad;\n },\n initScriptLoader: function() {\n return initScriptLoader;\n }\n});\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"./node_modules/@swc/helpers/cjs/_interop_require_default.cjs\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"./node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs\");\nconst _jsxruntime = __webpack_require__(/*! react/jsx-runtime */ \"react/jsx-runtime\");\nconst _reactdom = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react-dom */ \"react-dom\"));\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"react\"));\nconst _headmanagercontextsharedruntime = __webpack_require__(/*! ../shared/lib/head-manager-context.shared-runtime */ \"./node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js\");\nconst _setattributesfromprops = __webpack_require__(/*! ./set-attributes-from-props */ \"./node_modules/next/dist/client/set-attributes-from-props.js\");\nconst _requestidlecallback = __webpack_require__(/*! ./request-idle-callback */ \"./node_modules/next/dist/client/request-idle-callback.js\");\nconst ScriptCache = new Map();\nconst LoadCache = new Set();\nconst insertStylesheets = (stylesheets)=>{\n // Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad\n //\n // Using ReactDOM.preinit to feature detect appDir and inject styles\n // Stylesheets might have already been loaded if initialized with Script component\n // Re-inject styles here to handle scripts loaded via handleClientScriptLoad\n // ReactDOM.preinit handles dedup and ensures the styles are loaded only once\n if (_reactdom.default.preinit) {\n stylesheets.forEach((stylesheet)=>{\n _reactdom.default.preinit(stylesheet, {\n as: 'style'\n });\n });\n return;\n }\n // Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad\n //\n // We use this function to load styles when appdir is not detected\n // TODO: Use React float APIs to load styles once available for pages dir\n if (false) {}\n};\nconst loadScript = (props)=>{\n const { src, id, onLoad = ()=>{}, onReady = null, dangerouslySetInnerHTML, children = '', strategy = 'afterInteractive', onError, stylesheets } = props;\n const cacheKey = id || src;\n // Script has already loaded\n if (cacheKey && LoadCache.has(cacheKey)) {\n return;\n }\n // Contents of this script are already loading/loaded\n if (ScriptCache.has(src)) {\n LoadCache.add(cacheKey);\n // It is possible that multiple `next/script` components all have same \"src\", but has different \"onLoad\"\n // This is to make sure the same remote script will only load once, but \"onLoad\" are executed in order\n ScriptCache.get(src).then(onLoad, onError);\n return;\n }\n /** Execute after the script first loaded */ const afterLoad = ()=>{\n // Run onReady for the first time after load event\n if (onReady) {\n onReady();\n }\n // add cacheKey to LoadCache when load successfully\n LoadCache.add(cacheKey);\n };\n const el = document.createElement('script');\n const loadPromise = new Promise((resolve, reject)=>{\n el.addEventListener('load', function(e) {\n resolve();\n if (onLoad) {\n onLoad.call(this, e);\n }\n afterLoad();\n });\n el.addEventListener('error', function(e) {\n reject(e);\n });\n }).catch(function(e) {\n if (onError) {\n onError(e);\n }\n });\n if (dangerouslySetInnerHTML) {\n // Casting since lib.dom.d.ts doesn't have TrustedHTML yet.\n el.innerHTML = dangerouslySetInnerHTML.__html || '';\n afterLoad();\n } else if (children) {\n el.textContent = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : '';\n afterLoad();\n } else if (src) {\n el.src = src;\n // do not add cacheKey into LoadCache for remote script here\n // cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above)\n ScriptCache.set(src, loadPromise);\n }\n (0, _setattributesfromprops.setAttributesFromProps)(el, props);\n if (strategy === 'worker') {\n el.setAttribute('type', 'text/partytown');\n }\n el.setAttribute('data-nscript', strategy);\n // Load styles associated with this script\n if (stylesheets) {\n insertStylesheets(stylesheets);\n }\n document.body.appendChild(el);\n};\nfunction handleClientScriptLoad(props) {\n const { strategy = 'afterInteractive' } = props;\n if (strategy === 'lazyOnload') {\n window.addEventListener('load', ()=>{\n (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props));\n });\n } else {\n loadScript(props);\n }\n}\nfunction loadLazyScript(props) {\n if (document.readyState === 'complete') {\n (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props));\n } else {\n window.addEventListener('load', ()=>{\n (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props));\n });\n }\n}\nfunction addBeforeInteractiveToCache() {\n const scripts = [\n ...document.querySelectorAll('[data-nscript=\"beforeInteractive\"]'),\n ...document.querySelectorAll('[data-nscript=\"beforePageRender\"]')\n ];\n scripts.forEach((script)=>{\n const cacheKey = script.id || script.getAttribute('src');\n LoadCache.add(cacheKey);\n });\n}\nfunction initScriptLoader(scriptLoaderItems) {\n scriptLoaderItems.forEach(handleClientScriptLoad);\n addBeforeInteractiveToCache();\n}\n/**\n * Load a third-party scripts in an optimized way.\n *\n * Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script)\n */ function Script(props) {\n const { id, src = '', onLoad = ()=>{}, onReady = null, strategy = 'afterInteractive', onError, stylesheets, ...restProps } = props;\n // Context is available only during SSR\n const { updateScripts, scripts, getIsSsr, appDir, nonce } = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);\n /**\n * - First mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache)\n * onReady is skipped, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. hasLoadScriptEffectCalled.current is false, loadScript executes\n * Once the script is loaded, the onLoad and onReady will be called by then\n * [If strict mode is enabled / is wrapped in component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n *\n * - Second mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache)\n * onReady is called, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. The script is already loaded, loadScript bails out\n * [If strict mode is enabled / is wrapped in component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n */ const hasOnReadyEffectCalled = (0, _react.useRef)(false);\n (0, _react.useEffect)(()=>{\n const cacheKey = id || src;\n if (!hasOnReadyEffectCalled.current) {\n // Run onReady if script has loaded before but component is re-mounted\n if (onReady && cacheKey && LoadCache.has(cacheKey)) {\n onReady();\n }\n hasOnReadyEffectCalled.current = true;\n }\n }, [\n onReady,\n id,\n src\n ]);\n const hasLoadScriptEffectCalled = (0, _react.useRef)(false);\n (0, _react.useEffect)(()=>{\n if (!hasLoadScriptEffectCalled.current) {\n if (strategy === 'afterInteractive') {\n loadScript(props);\n } else if (strategy === 'lazyOnload') {\n loadLazyScript(props);\n }\n hasLoadScriptEffectCalled.current = true;\n }\n }, [\n props,\n strategy\n ]);\n if (strategy === 'beforeInteractive' || strategy === 'worker') {\n if (updateScripts) {\n scripts[strategy] = (scripts[strategy] || []).concat([\n {\n id,\n src,\n onLoad,\n onReady,\n onError,\n ...restProps\n }\n ]);\n updateScripts(scripts);\n } else if (getIsSsr && getIsSsr()) {\n // Script has already loaded during SSR\n LoadCache.add(id || src);\n } else if (getIsSsr && !getIsSsr()) {\n loadScript(props);\n }\n }\n // For the app directory, we need React Float to preload these scripts.\n if (appDir) {\n // Injecting stylesheets here handles beforeInteractive and worker scripts correctly\n // For other strategies injecting here ensures correct stylesheet order\n // ReactDOM.preinit handles loading the styles in the correct order,\n // also ensures the stylesheet is loaded only once and in a consistent manner\n //\n // Case 1: Styles for beforeInteractive/worker with appDir - handled here\n // Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet\n // Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here\n // Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function\n if (stylesheets) {\n stylesheets.forEach((styleSrc)=>{\n _reactdom.default.preinit(styleSrc, {\n as: 'style'\n });\n });\n }\n // Before interactive scripts need to be loaded by Next.js' runtime instead\n // of native ",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(t,{is:r.is}):(e=c.createElement(t),"select"===t&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,t),e[rN]=n,e[rz]=r,l(e,n,!1,!1),n.stateNode=e;e:{switch(c=ew(t,r),t){case"dialog":rn("cancel",e),rn("close",e),i=r;break;case"iframe":case"object":case"embed":rn("load",e),i=r;break;case"video":case"audio":for(i=0;ioa&&(n.flags|=128,r=!0,uC(s,!1),n.lanes=4194304)}}else{if(!r){if(null!==(e=l5(c))){if(n.flags|=128,r=!0,null!==(t=e.updateQueue)&&(n.updateQueue=t,n.flags|=4),uC(s,!0),null===s.tail&&"hidden"===s.tailMode&&!c.alternate&&!lc)return uP(n),null}else 2*eZ()-s.renderingStartTime>oa&&0x40000000!==t&&(n.flags|=128,r=!0,uC(s,!1),n.lanes=4194304)}s.isBackwards?(c.sibling=n.child,n.child=c):(null!==(t=s.last)?t.sibling=c:n.child=c,s.last=c)}if(null!==s.tail)return n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=eZ(),n.sibling=null,t=l8.current,rj(l8,r?1&t|2:1&t),n;return uP(n),null;case 22:case 23:return oN(),r=null!==n.memoizedState,null!==e&&null!==e.memoizedState!==r&&(n.flags|=8192),r&&0!=(1&n.mode)?0!=(0x40000000&u8)&&(uP(n),6&n.subtreeFlags&&(n.flags|=8192)):uP(n),null;case 24:case 25:return null}throw Error(f(156,n.tag))}(t,n,u8))){u3=t;return}}else{if(null!==(t=function(e,n){switch(lo(n),n.tag){case 1:return rK(n.type)&&rY(),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return l2(),rA(rW),rA(rH),l9(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 5:return l4(n),null;case 13:if(rA(l8),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(f(340));lb()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return rA(l8),null;case 4:return l2(),null;case 10:return lM(n.type._context),null;case 22:case 23:return oN(),null;default:return null}}(t,n))){t.flags&=32767,u3=t;return}if(null!==e)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{u6=6,u3=null;return}}if(null!==(n=n.sibling)){u3=n;return}u3=n=e}while(null!==n);0===u6&&(u6=5)}function oD(e,n,t){var r=ns,l=u0.transition;try{u0.transition=null,ns=1,function(e,n,t,r){do oI();while(null!==of);if(0!=(6&u1))throw Error(f(327));t=e.finishedWork;var l=e.finishedLanes;if(null!==t){if(e.finishedWork=null,e.finishedLanes=0,t===e.current)throw Error(f(177));e.callbackNode=null,e.callbackPriority=0;var a=t.lanes|t.childLanes;if(function(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0r&&(l=r,r=a,a=l),l=tU(t,a);var u=tU(t,r);l&&u&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&((n=n.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(n),e.extend(u.node,u.offset)):(n.setEnd(u.node,u.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)1===e.nodeType&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;te?16:e,null===of)var r=!1;else{if(e=of,of=null,od=0,0!=(6&u1))throw Error(f(331));var l=u1;for(u1|=4,uL=e.current;null!==uL;){var a=uL,u=a.child;if(0!=(16&uL.flags)){var o=a.deletions;if(null!==o){for(var i=0;ieZ()-ol?oz(e,0):on|=t),ok(e,n)}function oA(e,n){0===n&&(0==(1&e.mode)?n=1:(n=nn,0==(0x7c00000&(nn<<=1))&&(nn=4194304)));var t=ov();null!==(e=l$(e,n))&&(no(e,n,t),ok(e,t))}function oj(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),oA(e,t)}function oB(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(f(314))}null!==r&&r.delete(n),oA(e,t)}function oH(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oW(e,n,t,r){return new oH(e,n,t,r)}function oQ(e){return!(!(e=e.prototype)||!e.isReactComponent)}function oq(e,n){var t=e.alternate;return null===t?((t=oW(e.tag,n,e.key,e.mode)).elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=0xe00000&e.flags,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function oK(e,n,t,r,l,a){var u=2;if(r=e,"function"==typeof e)oQ(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case z:return oY(t.children,l,a,n);case T:u=8,l|=8;break;case L:return(e=oW(12,t,n,2|l)).elementType=L,e.lanes=a,e;case O:return(e=oW(13,t,n,l)).elementType=O,e.lanes=a,e;case D:return(e=oW(19,t,n,l)).elementType=D,e.lanes=a,e;case V:return oX(t,l,a,n);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case R:u=10;break e;case M:u=9;break e;case F:u=11;break e;case I:u=14;break e;case U:u=16,r=null;break e}throw Error(f(130,null==e?e:typeof e,""))}return(n=oW(u,t,n,l)).elementType=e,n.type=r,n.lanes=a,n}function oY(e,n,t,r){return(e=oW(7,e,r,n)).lanes=t,e}function oX(e,n,t,r){return(e=oW(22,e,r,n)).elementType=V,e.lanes=t,e.stateNode={isHidden:!1},e}function oG(e,n,t){return(e=oW(6,e,null,n)).lanes=t,e}function oZ(e,n,t){return(n=oW(4,null!==e.children?e.children:[],e.key,n)).lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function oJ(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nu(0),this.expirationTimes=nu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function o0(e,n,t,r,l,a,u,o,i){return e=new oJ(e,n,t,o,i),1===n?(n=1,!0===a&&(n|=8)):n=0,a=oW(3,null,null,n),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},lj(a),e}function o1(e){if(!e)return rB;e=e._reactInternals;e:{if(eH(e)!==e||1!==e.tag)throw Error(f(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(rK(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(null!==n);throw Error(f(171))}if(1===e.tag){var t=e.type;if(rK(t))return rG(e,t,n)}return n}function o2(e,n,t,r,l,a,u,o,i){return(e=o0(t,r,!0,e,l,a,u,o,i)).context=o1(null),t=e.current,(a=lH(r=ov(),l=oy(t))).callback=null!=n?n:null,lW(t,a,l),e.current.lanes=l,no(e,l,r),ok(e,r),e}function o3(e,n,t,r){var l=n.current,a=ov(),u=oy(l);return t=o1(t),null===n.context?n.context=t:n.pendingContext=t,(n=lH(a,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(n.callback=r),null!==(e=lW(l,n,u))&&(ob(e,l,u,a),lQ(e,l,u)),u}function o4(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function o8(e,n){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var t=e.retryLane;e.retryLane=0!==t&&t{var r=t(961);n.createRoot=r.createRoot,n.hydrateRoot=r.hydrateRoot},961:(e,n,t)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=t(2551)},1020:(e,n,t)=>{var r=t(6540),l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,t){var r,a={},s=null,c=null;for(r in void 0!==t&&(s=""+t),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(c=n.ref),n)u.call(n,r)&&!i.hasOwnProperty(r)&&(a[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===a[r]&&(a[r]=n[r]);return{$$typeof:l,type:e,key:s,ref:c,props:a,_owner:o.current}}n.Fragment=a,n.jsx=s,n.jsxs=s},5287:(e,n)=>{var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function v(e,n,t){this.props=e,this.context=n,this.refs=g,this.updater=t||m}function y(){}function b(e,n,t){this.props=e,this.context=n,this.refs=g,this.updater=t||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,n){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var k=b.prototype=new y;k.constructor=b,h(k,v.prototype),k.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,x={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function _(e,n,r){var l,a={},u=null,o=null;if(null!=n)for(l in void 0!==n.ref&&(o=n.ref),void 0!==n.key&&(u=""+n.key),n)S.call(n,l)&&!E.hasOwnProperty(l)&&(a[l]=n[l]);var i=arguments.length-2;if(1===i)a.children=r;else if(1{e.exports=t(5287)},4848:(e,n,t)=>{e.exports=t(1020)},7463:(e,n)=>{function t(e,n){var t=e.length;for(e.push(n);0>>1,l=e[r];if(0>>1;ra(i,t))sa(c,i)?(e[r]=c,e[s]=t,r=s):(e[r]=i,e[o]=t,r=o);else if(sa(c,t))e[r]=c,e[s]=t,r=s;else break}}return n}function a(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if("object"==typeof performance&&"function"==typeof performance.now){var u,o=performance;n.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();n.unstable_now=function(){return i.now()-s}}var c=[],f=[],d=1,p=null,m=3,h=!1,g=!1,v=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,k="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var n=r(f);null!==n;){if(null===n.callback)l(f);else if(n.startTime<=e)l(f),n.sortIndex=n.expirationTime,t(c,n);else break;n=r(f)}}function S(e){if(v=!1,w(e),!g){if(null!==r(c))g=!0,M(x);else{var n=r(f);null!==n&&F(S,n.startTime-e)}}}function x(e,t){g=!1,v&&(v=!1,b(C),C=-1),h=!0;var a=m;try{for(w(t),p=r(c);null!==p&&(!(p.expirationTime>t)||e&&!z());){var u=p.callback;if("function"==typeof u){p.callback=null,m=p.priorityLevel;var o=u(p.expirationTime<=t);t=n.unstable_now(),"function"==typeof o?p.callback=o:p===r(c)&&l(c),w(t)}else l(c);p=r(c)}if(null!==p)var i=!0;else{var s=r(f);null!==s&&F(S,s.startTime-t),i=!1}return i}finally{p=null,m=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E=!1,_=null,C=-1,P=5,N=-1;function z(){return!(n.unstable_now()-Ne||125u?(e.sortIndex=a,t(f,e),null===r(c)&&e===r(f)&&(v?(b(C),C=-1):v=!0,F(S,a-u))):(e.sortIndex=o,t(c,e),g||h||(g=!0,M(x))),e},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(e){var n=m;return function(){var t=m;m=n;try{return e.apply(this,arguments)}finally{m=t}}}},9982:(e,n,t)=>{e.exports=t(7463)}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6593],{2551:(e,n,t)=>{var r,l,a,u,o,i,s=t(6540),c=t(9982);function f(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t